Tremolo
class Effect ↳ extends StereoEffect<TremoloOptions>
Tremolo modulates the amplitude of an incoming signal using an LFO. The effect is a stereo effect where the modulation phase is inverted in each channel.
// create a tremolo and start it's LFO const tremolo = new Tone.Tremolo(9, 0.75).toDestination().start(); // route an oscillator through the tremolo and start it const oscillator = new Tone.Oscillator().connect(tremolo).start();
Constructor
Section titled “Constructor”new Tremolo(frequency?: Frequency, depth?: number)Parameters
-
frequency
FrequencyoptionalThe rate of the effect.
-
depth
numberoptionalThe depth of the effect.
new Tremolo(options?: Partial<TremoloOptions>)Parameters
- options
Partial<TremoloOptions>optional
Properties
Section titled “Properties”read-only
depth: Signal<"normalRange">The depth of the effect. A depth of 0, has no effect on the amplitude, and a depth of 1 makes the amplitude modulate fully between 0 and 1.
frequency
Section titled “frequency”read-only
frequency: Signal<"frequency">The frequency of the tremolo.
read-only ↳ inherited from StereoEffect
input: GainThe input node or nodes. If the object is a source, it does not have any input and this.input is undefined.
output
Section titled “output”read-only ↳ inherited from StereoEffect
output: CrossFadeThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
read-only ↳ inherited from StereoEffect
wet: Signal<"normalRange">The wet control, i.e. how much of the effected will pass through to the output.
spread
Section titled “spread”spread: numberAmount of stereo spread. When set to 0, both LFO’s will be panned centrally. When set to 180, LFO’s will be panned hard left and right respectively.
Methods
Section titled “Methods”start()
Section titled “start()”start(time?: Time): thisStart the tremolo.
Parameters
- time
Timeoptional
Returns this
stop()
Section titled “stop()”stop(time?: Time): thisStop the tremolo.
Parameters
- time
Timeoptional
Returns this
getDefaults()
Section titled “getDefaults()”static
getDefaults(): TremoloOptionsReturns all of the default options belonging to the class.
Returns TremoloOptions
Inherited members
Section titled “Inherited members”- From
ToneWithContext: context, blockTime, sampleTime, get(), immediate(), now(), set(), toFrequency(), toSeconds(), toTicks() - From
Tone: debug, version, disposed, toString() - From
ToneAudioNode: channelCount, channelCountMode, channelInterpretation, numberOfInputs, numberOfOutputs, chain(), connect(), disconnect(), fan(), toDestination(), toMaster()