Reference p5.Delay

p5.Delay

A delay effect with parameters for feedback, and delay time.

Examples

Syntax

p5.Delay([delayTime], [feedback])

Parameters

delayTime
Number: The delay time in seconds between 0 and 1. Defaults to 0.250.
feedback
Number: The amount of feedback in the delay line between 0 and 1. Defaults to 0.2.

Fields

leftDelay

The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.

rightDelay

The p5.Delay is built with two Web Audio Delay Nodes, one for each stereo channel.

Methods

process
Process an input signal with a delay effect.
delayTime
Set the delay time in seconds.
feedback
The amount of feedback in the delay line.
filter

Set a lowpass filter frequency for the delay. A lowpass filter will cut off any frequencies higher than the filter frequency.

setType

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.

amp
Adjust the amplitude of the delay effect.
connect

Send output to a p5.sound or web audio object

disconnect

Disconnect all output.

Notice any errors or typos? Please let us know. Please feel free to edit src/Delay.js and open a pull request!

Related References