Skip to content

Effects Reference

Creates a delay effect with feedback.

Delay() // Defaults: 0.25s time, 0.5 feedback
Delay(time) // Custom time, default feedback
Delay(time, feedback) // Custom time and feedback
ParameterRangeDefaultDescription
Time0.001-2.00.25Delay time in seconds
Feedback0.0-0.990.5Feedback amount

Six filter types share the same interface. All accept cutoff and optional resonance:

Lowpass(cutoff, resonance) // Attenuates above cutoff
Highpass(cutoff, resonance) // Attenuates below cutoff
Bandpass(cutoff, resonance) // Passes band around center
Notch(cutoff, resonance) // Removes band around center
Allpass(cutoff, resonance) // Phase shift at cutoff (phaser building block)
Peak(cutoff, resonance) // Bell-shaped boost at center (EQ)
ParameterRangeDefaultDescription
Cutoff20-200001000Cutoff/center frequency in Hz
Resonance0.707-10.00.707Filter Q (0.707 = Butterworth, flat passband)
Lowpass(800); // Warm, smooth rolloff
Lowpass(1000, 5.0); // Resonant peak at cutoff
Bandpass(800, 8.0); // Narrow resonant band
Notch(60); // Remove 60Hz hum

Stereo reverb using the Freeverb algorithm.

Reverb(room, damp, width, mix)
ParameterRangeDefaultDescription
Room0.0-1.00.5Room size (higher = longer decay)
Damp0.0-1.00.5High-frequency damping
Width0.0-1.01.0Stereo width (0=mono, 1=full)
Mix0.0-1.00.33Dry/wet mix
let hall = Reverb(0.8, 0.3); // Large hall
let room = Reverb(0.4, 0.6, 1.0, 0.2); // Small room, subtle

Stereo plate reverb using the Dattorro algorithm. Lush, diffuse character.

PlateReverb(size, damping, diffusion, predelay, mix)
ParameterRangeDefaultDescription
Size0.0-1.00.5Tank size (higher = longer decay)
Damping0.0-1.00.5High-frequency damping
Diffusion0.0-1.00.7Diffusion density
PreDelay0.0-1.00.0Pre-delay (0-100ms)
Mix0.0-1.00.33Dry/wet mix
let lush = PlateReverb(0.7, 0.4, 0.8);
let dark = PlateReverb(0.8, 0.9, 0.7, 0.02, 0.3);

Warm overdrive using symmetrical (tube-style) soft clipping.

Overdrive(drive, tone)
ParameterRangeDefaultDescription
Drive0.0-1.00.5Distortion intensity
Tone0.0-1.00.7Post-distortion brightness
let warm = Overdrive(0.6, 0.8); // Warm tube saturation
let gentle = Overdrive(0.3); // Subtle warmth

Crunchier distortion using asymmetrical (transistor-style) clipping.

Distortion(drive, tone)
ParameterRangeDefaultDescription
Drive0.0-1.00.5Distortion intensity
Tone0.0-1.00.7Post-distortion brightness
let crunch = Distortion(0.7, 0.5);
let fuzz = Distortion(1.0, 0.3);
dsp effect Name {
input name: stereo|mono; // Optional: declare input ports
output: stereo|mono; // Optional: declare output layout
param name: default range(min, max);
state name: initial;
buffer name(size);
fn process(inputs...) -> (outputs...) {
// DSP code
}
}
let fx = Name(); // Instantiate the effect

dsp effect is a top-level definition statement. The identifier after dsp effect names the effect type. Instantiate it with call syntax (Name()) — this returns a value you can load onto tracks. The name also serves as the slot name for idempotent loading (replacing effects in-place).

DeclarationDescription
input name: stereo;Named stereo input port (2 process params)
input name: mono;Named mono input port (1 process param)
output: stereo;Stereo output (return tuple of 2)
output: mono;Mono output (return single value)

If no I/O declarations are present, the effect defaults to stereo in/out.

Process function parameters are mapped to declared inputs in order. The total parameter count must equal the sum of all input channel counts.

DeclarationDescription
buffer name(size);Allocate a fixed-size array of size f64 values in the effect’s state

Buffer elements are accessed with name[index] and assigned with name[index] = value. All values initialize to zero. Indices wrap with modulo. Buffers persist across calls to process.

Connect another track’s audio output to a named sidechain port on an effect. Works with both custom DSP effects and external VST3/CLAP plugins that have sidechain buses.

comp.connect_input("sidechain", bass);
ArgumentTypeDescription
port_nameStringName of the input port (declared input for DSP effects, or the plugin’s sidechain bus name for VST3/CLAP)
source_trackAudioTrackTrack whose audio feeds this port

Returns the effect for chaining. Mono ports auto-downmix stereo sources to (L + R) / 2.

dsp effect SidechainComp {
input main: stereo;
input sidechain: mono;
output: stereo;
param threshold: 0.5 range(0, 1);
param ratio: 4.0 range(1, 20);
state env: 0.0;
fn process(main_l, main_r, sc) -> (out_l, out_r) {
let level = abs(sc);
let target = max(level - threshold, 0.0) * (1.0 - 1.0 / ratio);
if target > env {
env = env + (target - env) * 0.01;
} else {
env = env + (target - env) * 0.001;
}
let gain = 1.0 / (1.0 + env);
return (main_l * gain, main_r * gain);
}
}
let comp = SidechainComp();
let drums = AudioTrack("drums");
let bass = AudioTrack("bass");
drums.load_effect(comp);
comp.connect_input("sidechain", bass);

Effect parameters support the << operator for both static values and signal modulation:

let d = Delay(0.25, 0.5);
drums.load_effect(d);
// Static values
d.Time << 0.1;
d.Feedback << 0.8;
// Signal modulation
d.Time << Sine(2).range(0.1, 0.4);
filter.Cutoff << Sine(1).range_exp(200, 4000); // Exponential for frequency
// Automation breakpoints via .modulate()
d.Feedback.modulate(#[0, 0.3], #[4, 0.9]);
d.Time.modulate(#[0, 0.1], #[2, 0.4, "exp"], #[4, 0.1]);

Curve types: "linear", "exp", "ease-in", "ease-out", "ease-in-out", "ease", "bezier(x1,y1,x2,y2)".

Effects use named slots for idempotent loading. Each effect carries a slot name (defaults to the constructor name). load_effect replaces any existing effect with the same slot name instead of accumulating duplicates.

let drums = AudioTrack("drums");
drums.load_effect(Delay(0.25, 0.5)); // Slot: "Delay"
drums.load_effect(Delay(0.5, 0.3)); // Replaces "Delay" slot
drums.load_effects(#[Lowpass(800), Reverb(0.5, 0.3)]);
// Custom slot names for multiple effects of the same type
drums.load_effect(Delay(0.125, 0.2, "short_echo"));
drums.load_effect(Delay(0.5, 0.4, "long_echo"));
drums.get_effect("short_echo"); // Get by slot name
drums.effects(); // List loaded effects
drums.swap_effects(0, 1); // Swap effect order
drums.remove_effect(0); // Remove and return effect
drums.clear_effects(); // Remove all effects
master.load_effect(PlateReverb(0.7, 0.4, 0.8));
master.load_effects(#[Lowpass(8000), Delay(0.25, 0.3)]);
master.get_effect("PlateReverb");
master.effects();
master.swap_effects(0, 1);
master.remove_effect(0);
master.clear_effects();
MethodArgsReturnsDescription
.send_to(dest, amount)AudioTrack/Master, Number/Signal/PatternAudioTrackAdditive send (dry stays at 1.0)
.xsend_to(dest, amount)AudioTrack, Number/Signal/PatternAudioTrackCrossfade send (dry = 1.0 - amount)
.send(amount)Number/Signal/PatternSendCreate Send value for >> chains
.send_level(dest)AudioTrack/MasterSendParamSend param ref for automation
.reset_routing()AudioTrackClear routes, restore default master route
.routing()NulPrint track routing info

Routes a copy of audio to another track. The dry signal continues to its normal destination at full level.

drums.send_to(reverb_bus, 0.3); // 30% to reverb
drums.send_to(delay_bus, Sine(4).range(0.1, 0.5)); // Signal-modulated

Exclusive send — routes audio while reducing the dry signal. Dry level becomes 1.0 - amount.

drums.xsend_to(drum_bus, 1.0); // All signal to bus, nothing to master
drums.xsend_to(wet_bus, 0.7); // 70% wet, 30% dry

Creates a Send value for use in >> chains:

drums >> reverb_bus.send(0.3) >> master;

Returns a SendParam reference for an existing send, for use with automation:

drums.send_to(reverb_bus, 0.3);
let rev_send = drums.send_level(reverb_bus);
rev_send << automation(#[0, 0.3], #[8, 0.8]);

Clears all routes and send modulations, restoring the default master route at 1.0. Chainable:

drums.reset_routing();
drums.reset_routing().send_to(reverb_bus, 0.5);

Prints routing info for the track:

drums.routing();

Prints the routing graph. Called with no arguments for the full graph, or with track arguments for specific tracks:

routing() // Full graph
routing(drums) // Per-track
routing(drums, bass) // Multiple tracks

Loads a CLAP or VST3 effect plugin.

Effect(name) // Load by bundle name
Effect(name, plugin_id) // Load with explicit plugin ID

Loads a CLAP or VST3 instrument plugin.

Instrument(name) // Load by bundle name
Instrument(name, plugin_id) // Load with explicit plugin ID

Methods available on plugin effects and instruments:

MethodDescription
.name()Get plugin name
.params()Print all parameters as a table (with range, default, value)
.params(filter)Print parameters matching a filter substring
.param(path)Get parameter value
.set_param(path, value)Set parameter value (chainable)
.set_param_norm(path, value)Set parameter using normalized 0–1 value (chainable)
.save_state(path)Save plugin state to file (chainable)
.load_state(path)Load plugin state from file (chainable)
.supports_gui()Check if the plugin supports a GUI (returns Boolean)
.show_gui()Open the plugin GUI window
.hide_gui()Close the plugin GUI window
let synth = Instrument("My Synth");
synth.params(); // prints parameter table
synth.param("clap/0"); // 0.5
synth.set_param("clap/0", 0.8)
.set_param("clap/1", 0.3);
synth.set_param_norm("clap/0", 0.5); // set using normalized 0-1 value
// Save and restore plugin state
synth.save_state("presets/my_patch.preset");
synth.load_state("presets/my_patch.preset");
// Plugin GUI
if synth.supports_gui() {
synth.show_gui(); // Opens the plugin's native GUI window
}
synth.hide_gui(); // Close the GUI window
FunctionOutput RangeDescription
Sine(n) / Sine2(n)0-1 / -1 to 1Sine wave
Saw(n) / Saw2(n)0-1 / -1 to 1Sawtooth wave
Tri(n) / Tri2(n)0-1 / -1 to 1Triangle wave
Square(n) / Square2(n)0-1 / -1 to 1Square wave
Rand(n)0-1Random noise
Perlin(n)0-1Smooth Perlin noise

All accept: no arg (1 cycle/cycle), number (N cycles/cycle), or hz(n) (absolute frequency).

MethodDescription
range(min, max)Map output to [min, max] (linear)
range_exp(min, max)Map output to [min, max] (exponential)
retrigger(mode)Phase reset: "cycle", "beat", or "free"
in_seconds()Convert automation timebase to seconds
at(time, value, curve)Add breakpoint to automation
smooth(time_ms)One-pole lowpass smoothing (removes zipper noise)
let lfo = Sine(4).range(0.2, 0.8);
filter.Cutoff << Sine(1).range_exp(20, 20000); // Exponential for frequency
Sine(4).retrigger("beat"); // Reset phase every beat
Cc(74).smooth(50); // 50ms smoothing on CC input

The master constant represents the main audio output. All audio must route to master to be heard.

drums >> master;

Tracks without explicit routing go to master automatically.