Delay
class Core ↳ extends ToneAudioNode<DelayOptions>
Wrapper around Web Audio’s native DelayNode.
return Tone.Offline(() => {
const delay = new Tone.Delay(0.1).toDestination();
// connect the signal to both the delay and the destination
const pulse = new Tone.PulseOscillator().connect(delay).toDestination();
// start and stop the pulse
pulse.start(0).stop(0.01);
}, 0.5, 1);Constructor
Section titled “Constructor”Parameters
new Delay(options?: Partial<DelayOptions>)Parameters
- options
Partial<DelayOptions>optional
Properties
Section titled “Properties”delayTime
Section titled “delayTime”read-only
delayTime: Param<"time">The amount of time the incoming signal is delayed.
const delay = new Tone.Delay().toDestination(); // modulate the delayTime between 0.1 and 1 seconds const delayLFO = new Tone.LFO(0.5, 0.1, 1).start().connect(delay.delayTime); const pulse = new Tone.PulseOscillator().connect(delay).start(); // the change in delayTime causes the pitch to go up and down
read-only
input: DelayNodeThe 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
output: DelayNodeThe output nodes. If the object is a sink, it does not have any output and this.output is undefined.
maxDelay
Section titled “maxDelay”read-only
maxDelay: numberThe maximum delay time. This cannot be changed after the value is passed into the constructor.
Methods
Section titled “Methods”getDefaults()
Section titled “getDefaults()”static
getDefaults(): DelayOptionsReturns all of the default options belonging to the class.
Returns DelayOptions
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()