Effects
Echo, reverb, chorus and saturation.
On this page
Echo, reverb, chorus and saturation.
audioDelay
Add an echo to an audio buffer
audioDelay( audio, time=0.35, feedback=0.4, mix=0.35, pingPong=false, tail )
| Argument | Type | Default | |
|---|---|---|---|
audio | any | required | The audio buffer. |
time | double | 0.35 | Seconds between repeats, 0.001 to 5. Use timeline.beat( 0.75 ) for a dotted eighth. Defaults to 0.35. |
feedback | double | 0.4 | How much of each repeat comes back, 0 for a single echo up to 0.95. Defaults to 0.4. |
mix | double | 0.35 | Dry/wet balance, 0 is only the input and 1 is only the echoes. Defaults to 0.35. |
pingPong | boolean | false | Bounce the repeats between the left and right side. Needs stereo input. Defaults to false. |
tail | double | optional | Seconds added at the end for the repeats to ring out. By default they run until 60 dB down, at most 10 seconds. |
Returns A new, longer audio buffer.
audioReverb
Add reverb to an audio buffer
audioReverb( audio, room=0.5, damp=0.5, mix=0.3, tail )
| Argument | Type | Default | |
|---|---|---|---|
audio | any | required | A mono or stereo audio buffer. A stereo input gets a stereo-spread tail, mono stays mono. |
room | double | 0.5 | The size of the room from 0 (small) to 1 (very large). Defaults to 0.5. |
damp | double | 0.5 | High frequency absorption from 0 (bright) to 1 (dark and soft). Defaults to 0.5. |
mix | double | 0.3 | Dry/wet balance, 0 is only the input and 1 is only the reverb. Defaults to 0.3. On sustained sounds a large room builds up level, so lower the mix for big rooms. |
tail | double | optional | Seconds added at the end for the reverb to die away. By default it is picked from the room size, 0.5 to 6.5 seconds. |
Returns A new, longer audio buffer.
audioChorus
Thicken and widen an audio buffer with a chorus
audioChorus( audio, rate=0.8, depth=0.003, mix=0.5 )
| Argument | Type | Default | |
|---|---|---|---|
audio | any | required | The audio buffer. On stereo input the two sides swing a quarter cycle apart for width. |
rate | double | 0.8 | How fast the delay swings, in Hz, 0.01 to 20. Defaults to 0.8. |
depth | double | 0.003 | How far the delay swings, in seconds, 0 to 0.01. Defaults to 0.003. |
mix | double | 0.5 | Dry/wet balance, 0 is only the input. Defaults to 0.5. |
Returns A new audio buffer of the same length.
audioSaturate
Round off peaks with a warm limiting curve
audioSaturate( audio, drive=2.2, level=0.9 )
| Argument | Type | Default | |
|---|---|---|---|
audio | any | required | The audio buffer. It is scaled to full scale first, so the result does not depend on its input level. |
drive | double | 2.2 | How hard to push into the curve, above 0. About 2 is gentle and 5 is heavy. Defaults to 2.2. |
level | double | 0.9 | The final peak level from 0 to 1. Defaults to 0.9. |
Returns A new audio buffer.