Delays
Delay effects create copies of a signal offset in time, enabling echoes, rhythmic effects, and spatial depth.
Delay effects create copies of a signal offset in time, enabling echoes, rhythmic effects, and spatial depth.
delay
Delay - Creates a delayed copy of the input signal with feedback.
| Param | Type | Default | Description |
|---|---|---|---|
| in | signal | - | Input signal |
| time | signal | - | Delay time in seconds (0-10) |
| fb | number | - | Feedback amount (0-1) |
| dry | number | 0.0 | Dry signal level |
| wet | number | 1.0 | Wet (delayed) signal level |
A simple delay line with feedback. Use short times (< 50ms) for comb filtering effects, medium times for slapback, and longer times for distinct echoes.
The optional dry and wet parameters control the output mix. Defaults (dry=0, wet=1) output 100% wet signal for backward compatibility. Set dry=1, wet=1 for classic delay pedal behavior.
// Simple echo at quarter note (120 BPM = 0.5s)
osc("saw", 220) |> delay(%, 0.5, 0.4) |> out(%, %) // Classic delay pedal: dry passthrough with wet echoes
osc("saw", 220) |> delay(%, 0.5, 0.4, 1.0, 0.6) |> out(%, %) // Slapback delay for thickening
osc("saw", 110) |> delay(%, 0.08, 0.3, 0.7, 0.5) |> out(%, %) // Ping-pong style stereo delay
osc("saw", 110) |> (delay(%, 0.3, 0.5), delay(%, 0.45, 0.5)) |> out(%, %) delay_ms
Delay (milliseconds) - Same as delay, but with time in milliseconds.
| Param | Type | Default | Description |
|---|---|---|---|
| in | signal | - | Input signal |
| time_ms | signal | - | Delay time in milliseconds (0-10000) |
| fb | number | - | Feedback amount (0-1) |
| dry | number | 0.0 | Dry signal level |
| wet | number | 1.0 | Wet (delayed) signal level |
// 300ms delay
osc("saw", 220) |> delay_ms(%, 300, 0.4) |> out(%, %) // 50/50 mix
osc("saw", 220) |> delay_ms(%, 300, 0.4, 0.5, 0.5) |> out(%, %) delay_smp
Delay (samples) - Same as delay, but with time in samples for precise control.
| Param | Type | Default | Description |
|---|---|---|---|
| in | signal | - | Input signal |
| time_smp | signal | - | Delay time in samples |
| fb | number | - | Feedback amount (0-1) |
| dry | number | 0.0 | Dry signal level |
| wet | number | 1.0 | Wet (delayed) signal level |
Use sample-based delay for comb filtering and Karplus-Strong synthesis effects. The resonant frequency is sample_rate / delay_samples.
// Comb filter at ~480Hz (48000 / 100 = 480)
noise() |> delay_smp(%, 100, 0.9) |> out(%, %) // Karplus-Strong style pluck (109 samples at 48kHz ≈ 440Hz)
noise() * ar(button("pluck"), 0.001, 0.001) |> delay_smp(%, 109, 0.995) |> out(%, %) tap_delay
Tap Delay - Delay with configurable feedback processing chain.
| Param | Type | Default | Description |
|---|---|---|---|
| in | signal | - | Input signal |
| time | signal | - | Delay time in seconds (0-10) |
| fb | number | - | Feedback amount (0-1) |
| processor | closure | - | (x) -> ... feedback processing |
| dry | number | 0.0 | Dry signal level |
| wet | number | 1.0 | Wet (delayed) signal level |
Tap delay allows you to process the feedback signal through any DSP chain (filters, distortion, etc.). This enables classic effects like tape delay (high-frequency rolloff), dub delay (filtering + saturation), and shimmer (pitch shifting).
The optional dry and wet parameters control the output mix. Defaults (dry=0, wet=1) output 100% wet signal for backward compatibility.
// Dub-style delay with lowpass filter in feedback
osc("saw", 110) |> tap_delay(%, 0.375, 0.7, (x) -> lp(x, 1500)) |> out(%, %) // Degrading tape delay with dry/wet mix
osc("saw", 110) |> tap_delay(%, 0.4, 0.65, (x) ->
lp(x, 3000) |> saturate(%, 0.1),
0.3, 0.7
) |> out(%, %) // Classic delay pedal: full dry signal with softer echoes
osc("saw", 110) |> tap_delay(%, 0.375, 0.7, (x) -> lp(x, 1500), 1.0, 0.5) |> out(%, %) tap_delay_ms
Tap Delay (milliseconds) - Same as tap_delay, but with time in milliseconds.
| Param | Type | Default | Description |
|---|---|---|---|
| in | signal | - | Input signal |
| time_ms | signal | - | Delay time in milliseconds (0-10000) |
| fb | number | - | Feedback amount (0-1) |
| processor | closure | - | (x) -> ... feedback processing |
| dry | number | 0.0 | Dry signal level |
| wet | number | 1.0 | Wet (delayed) signal level |
// 300ms delay with feedback filtering
osc("saw", 110) |> tap_delay_ms(%, 300, 0.7, (x) -> lp(x, 1000)) |> out(%, %) // 300ms delay with mix control
osc("saw", 110) |> tap_delay_ms(%, 300, 0.7, (x) -> lp(x, 1000), 0.5, 0.5) |> out(%, %) tap_delay_smp
Tap Delay (samples) - Same as tap_delay, but with time in samples.
| Param | Type | Default | Description |
|---|---|---|---|
| in | signal | - | Input signal |
| time_smp | signal | - | Delay time in samples |
| fb | number | - | Feedback amount (0-1) |
| processor | closure | - | (x) -> ... feedback processing |
| dry | number | 0.0 | Dry signal level |
| wet | number | 1.0 | Wet (delayed) signal level |
Use sample-based tap delay for comb filtering with feedback processing.
// Resonant comb filter with dampening
noise() |> tap_delay_smp(%, 100, 0.95, (x) -> lp(x, 2000)) |> out(%, %) // Comb filter with dry/wet blend
noise() |> tap_delay_smp(%, 100, 0.95, (x) -> lp(x, 2000), 0.3, 0.7) |> out(%, %)