Delay is an echo effect. It processes an existing sound source, and outputs a delayed version of that sound. The p5.Delay can produce different effects depending on the delayTime, feedback, filter, and type. In the example below, a feedback of 0.5 (the default value) will produce a looping delay that decreases in volume by 50% each repeat. A filter will cut out the high frequencies so that the delay does not sound as piercing as the original source.
This class extends p5.Effect. Methods amp(), chain(), drywet(), connect(), and disconnect() are available.
Examples
Fields
The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.
The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.
Methods
Add delay to an audio signal according to a set of delay parameters.
Set the delay (echo) time, in seconds. Usually this value will be a floating point number between 0.0 and 1.0.
Feedback occurs when Delay sends its signal back through its input in a loop. The feedback amount determines how much signal to send each time through the loop. A feedback greater than 1.0 is not desirable because it will increase the overall output each time through the loop, creating an infinite feedback loop. The default value is 0.5
Set a lowpass filter frequency for the delay. A lowpass filter will cut off any frequencies higher than the filter frequency.
Choose a preset type of delay. 'pingPong' bounces the signal from the left to the right channel to produce a stereo effect. Any other parameter will revert to the default delay setting.
Set the output level of the delay effect.
Send output to a p5.sound or web audio object
Disconnect all output.