std/effects
Import: use "std/effects";
Effect constructors for use with track.set_effects(#[...]).
Filters
Section titled “Filters”The built-in filter effect: one state-variable filter whose FilterType chooses the response (lowpass, highpass, bandpass, notch, allpass or peak). It goes onto a track’s chain with track.set_effects(#[...]).
FilterType
Section titled “FilterType”The response of a Filter: the steps of its Type parameter, in order.
FilterType.lowpass— Passes the frequencies below the cutoff.FilterType.highpass— Passes the frequencies above the cutoff.FilterType.bandpass— Passes a band around the cutoff; Resonance makes it narrower.FilterType.notch— Removes a band around the cutoff; Resonance makes it narrower.FilterType.allpass— Passes every frequency and shifts the phase around the cutoff.FilterType.peak— A bell: Gain at the cutoff, Resonance sets the width.
Filter
Section titled “Filter”fn Filter(name: String, type: FilterType? = NUL, cutoff: Number? = NUL, resonance: Number? = NUL, gain: Number? = NUL) -> EffectCreates a filter effect: one state-variable filter whose Type chooses the response, as Live’s Auto Filter does.
drums.set_effects(#[Filter("lp", FilterType.lowpass, 800)]);bass.set_effects(#[Filter("bell", FilterType.peak, 250, 1.0, -6)]);Parameters:
name(String) — slot name (identity in a track’s effect chain)type(FilterType?, optional) — the response (default: FilterType.lowpass)cutoff(Number?, optional) — cutoff frequency in Hz; the center of a band or a bellresonance(Number?, optional) — resonance (Q)gain(Number?, optional) — gain at the cutoff in dB; onlyFilterType.peakuses it
Returns: Effect — a built-in filter
Device parameters:
| Name | Range | Default |
|---|---|---|
Type | FilterType | FilterType.lowpass |
Cutoff | 20–20000 | 1000 |
Resonance | 0.1–30 | 0.707 |
Gain | -24–24 | 0 |
The built-in delay effect: a stereo feedback delay for echo and slapback textures. It goes onto a track’s chain with track.set_effects(#[...]).
fn Delay(name: String, time: Number? = NUL, feedback: Number? = NUL) -> EffectCreates a feedback delay, half dry and half wet by default, its time in seconds. A change of Time glides, as a tape delay does: the echoes bend in pitch. On a return track, set Mix to 1.0: the source track already plays the dry signal.
drums.set_effects(#[Delay("echo", 0.25, 0.5)]);delay_bus.set_effects(#[Delay("echo", 0.125).set_parameter("Mix", 1.0)]);Parameters:
name(String) — slot name (identity in a track’s effect chain)time(Number?, optional) — delay time in secondsfeedback(Number?, optional) — feedback amount
Returns: Effect — a built-in delay
Device parameters:
| Name | Range | Default |
|---|---|---|
Time | 0.001–2 | 0.25 |
Feedback | 0–0.99 | 0.5 |
Mix | 0–1 | 0.5 |
Reverb
Section titled “Reverb”Reverb effects. Freeverb (room) and Dattorro (plate) algorithms.
PlateReverb
Section titled “PlateReverb”fn PlateReverb(name: String, size: Number? = NUL, damping: Number? = NUL, diffusion: Number? = NUL, predelay: Number? = NUL, mix: Number? = NUL) -> EffectCreates a plate reverb effect (Dattorro algorithm).
drums.set_effects(#[PlateReverb("plate", 0.7, 0.3, 0.8)]);Parameters:
name(String) — slot name (identity in a track’s effect chain)size(Number?, optional) — tank sizedamping(Number?, optional) — high-frequency dampingdiffusion(Number?, optional) — diffusion amountpredelay(Number?, optional) — pre-delay time in seconds (default: 0.0, range: 0.0–0.1)mix(Number?, optional) — dry/wet mix
Returns: Effect — a built-in plate reverb effect
Device parameters:
| Name | Range | Default |
|---|---|---|
Size | 0–1 | 0.5 |
Damping | 0–1 | 0.5 |
Diffusion | 0–1 | 0.7 |
PreDelay | 0–0.1 | 0 |
Mix | 0–1 | 0.33 |
Reverb
Section titled “Reverb”fn Reverb(name: String, room: Number? = NUL, damp: Number? = NUL, width: Number? = NUL, mix: Number? = NUL) -> EffectCreates a reverb effect (Freeverb algorithm).
drums.set_effects(#[Reverb("verb", 0.7, 0.3)]);drums.set_effects(#[Reverb("short", 0.5, 0.5, 1.0, 0.2)]);Parameters:
name(String) — slot name (identity in a track’s effect chain)room(Number?, optional) — room sizedamp(Number?, optional) — high-frequency dampingwidth(Number?, optional) — stereo widthmix(Number?, optional) — dry/wet mix
Returns: Effect — a built-in reverb effect
Device parameters:
| Name | Range | Default |
|---|---|---|
Room | 0–1 | 0.5 |
Damp | 0–1 | 0.5 |
Width | 0–1 | 1 |
Mix | 0–1 | 0.33 |
Distortion
Section titled “Distortion”Built-in saturation effects — waveshaping drive for warmth and grit.
Distortion
Section titled “Distortion”fn Distortion(name: String, drive: Number? = NUL, tone: Number? = NUL) -> EffectCreates a distortion effect (asymmetrical/transistor-style clipping).
Uses tanh for positive half-cycles and soft clipping for negative, producing odd and even harmonics. Includes DC blocker and tone filter.
Parameter names, for parameter() and set_parameter(): Drive, Tone, Level, Mix.
bass.set_effects(#[Distortion("dist", 0.6, 0.4)]);Parameters:
name(String) — slot name (identity in a track’s effect chain)drive(Number?, optional) — distortion intensitytone(Number?, optional) — post-distortion brightness
Returns: Effect — a built-in distortion effect
Device parameters:
| Name | Range | Default |
|---|---|---|
Drive | 0–1 | 0.5 |
Tone | 0–1 | 0.7 |
Level | 0–1 | 0.5 |
Mix | 0–1 | 1 |
Overdrive
Section titled “Overdrive”fn Overdrive(name: String, drive: Number? = NUL, tone: Number? = NUL) -> EffectCreates an overdrive effect (symmetrical/tube-style tanh clipping).
Includes a DC-blocking filter before clipping and a one-pole tone filter after.
Parameter names, for parameter() and set_parameter(): Drive, Tone, Level, Mix.
bass.set_effects(#[Overdrive("drive", 0.3, 0.5)]);Parameters:
name(String) — slot name (identity in a track’s effect chain)drive(Number?, optional) — distortion intensitytone(Number?, optional) — post-distortion brightness
Returns: Effect — a built-in overdrive effect
Device parameters:
| Name | Range | Default |
|---|---|---|
Drive | 0–1 | 0.5 |
Tone | 0–1 | 0.7 |
Level | 0–1 | 0.5 |
Mix | 0–1 | 1 |