UNPKG

1.53 kBTypeScriptView Raw
1import { Effect, EffectOptions } from "./Effect.js";
2import { ToneOscillatorType } from "../source/oscillator/OscillatorInterface.js";
3import { Frequency, NormalRange, Seconds } from "../core/type/Units.js";
4import { Signal } from "../signal/Signal.js";
5import { Param } from "../core/context/Param.js";
6export interface VibratoOptions extends EffectOptions {
7 maxDelay: Seconds;
8 frequency: Frequency;
9 depth: NormalRange;
10 type: ToneOscillatorType;
11}
12/**
13 * A Vibrato effect composed of a Tone.Delay and a Tone.LFO. The LFO
14 * modulates the delayTime of the delay, causing the pitch to rise and fall.
15 * @category Effect
16 */
17export declare class Vibrato extends Effect<VibratoOptions> {
18 readonly name: string;
19 /**
20 * The delay node used for the vibrato effect
21 */
22 private _delayNode;
23 /**
24 * The LFO used to control the vibrato
25 */
26 private _lfo;
27 /**
28 * The frequency of the vibrato
29 */
30 readonly frequency: Signal<"frequency">;
31 /**
32 * The depth of the vibrato.
33 */
34 readonly depth: Param<"normalRange">;
35 /**
36 * @param frequency The frequency of the vibrato.
37 * @param depth The amount the pitch is modulated.
38 */
39 constructor(frequency?: Frequency, depth?: NormalRange);
40 constructor(options?: Partial<VibratoOptions>);
41 static getDefaults(): VibratoOptions;
42 /**
43 * Type of oscillator attached to the Vibrato.
44 */
45 get type(): ToneOscillatorType;
46 set type(type: ToneOscillatorType);
47 dispose(): this;
48}