Skip to content

Tracks & Plugins

Track routing, instrument and effect hosting, and parameter access.

A track in the audio engine for sample playback and routing. Construct with AudioTrack("name").

fn load_instrument(instrument: Instrument or Sampler or SamplerMelodic) -> AudioTrack

Attaches a sampler or instrument to this track.

Parameters:

  • instrument (Instrument | Sampler | SamplerMelodic) — the instrument to attach

Returns: AudioTrack — the track, for chaining

fn get_instrumentFunction

Returns the instrument loaded on this track, or NUL if none.

Returns: Instrument — the loaded instrument, or NUL if none

fn load_effect(effect: Effect) -> AudioTrack

Loads an effect onto this track’s signal chain by slot name. If an effect with the same slot name already exists, it is replaced in-place.

Parameters:

  • effect (Effect) — the effect to load

Returns: AudioTrack — the track, for chaining

fn load_effects(effects: Array) -> AudioTrack

Loads multiple effects at once (each replaces by slot name).

Parameters:

  • effects (Array) — the effects to load

Returns: AudioTrack — the track, for chaining

fn effects() -> Array

Returns an array of all effects in chain order.

Returns: Array — the effects in chain order

fn get_effect(name: String) -> Effect

Gets an effect by its slot name.

Parameters:

  • name (String) — slot name of the effect

Returns: Effect — the effect with that slot name

fn swap_effects(i: Number, j: Number) -> AudioTrack

Swaps two effects in the chain by index.

Parameters:

  • i (Number) — first effect index
  • j (Number) — second effect index

Returns: AudioTrack — the track, for chaining

fn remove_effect(index: Number) -> Effect

Removes an effect from the chain by index.

Parameters:

  • index (Number) — position of the effect to remove

Returns: Effect — the removed effect

fn clear_effects() -> AudioTrack

Removes all effects from the chain.

Returns: AudioTrack — the track, for chaining

fn send_to(destination: AudioTrack, amount: Number) -> AudioTrack

Adds a parallel aux send to the given destination.

Parameters:

  • destination (AudioTrack) — target track or bus
  • amount (Number) — send level (0.0-1.0)

Returns: AudioTrack — the track, for chaining

fn xsend_to(destination: AudioTrack, amount: Number) -> AudioTrack

Crossfade send: routes audio with energy conservation. wet = amount, dry (master) = 1.0 - amount.

Parameters:

  • destination (AudioTrack) — target track or bus
  • amount (Number) — crossfade amount (0.0-1.0)

Returns: AudioTrack — the track, for chaining

fn send(amount: Number)

Returns a SendModifier for use with the >> operator.

Parameters:

  • amount (Number) — send level (0.0-1.0)

Returns: SendModifier — a send modifier usable with >>

fn delete() -> NUL

Deletes the track and releases its resources.

Returns: NUL — nothing

fn routing() -> NUL

Displays detailed routing info for this track. Shows instrument, effects, volume/pan, receives, and routes.

Returns: NUL — nothing; prints the routing

fn volume(value: Number) -> AudioTrack

Sets track volume.

Parameters:

  • value (Number) — volume in dB (0 = unity, -70 = mute, +6 = max boost)

Returns: AudioTrack — the track, for chaining

fn pan(value: Number) -> AudioTrack

Sets track pan.

Parameters:

  • value (Number) — pan position (-1.0 = hard left, 0.0 = center, 1.0 = hard right)

Returns: AudioTrack — the track, for chaining

fn input(source: String) -> AudioTrack

Sets the audio input source for monitoring and recording. Connects the named hardware input to this track. If no audio input stream is active, starts one automatically for the named device.

Parameters:

  • source (String) — input device or channel name (e.g. “MacBook Pro Microphone”)

Returns: AudioTrack — the track, for chaining

fn arm() -> AudioTrack

Arms the track for recording. The track must have an input source set via input() first.

Returns: AudioTrack — the track, for chaining

fn disarm() -> AudioTrack

Disarms the track, stopping recording.

Returns: AudioTrack — the track, for chaining

fn monitor(mode: String) -> AudioTrack

Sets the input monitoring mode.

Parameters:

  • mode (String) — “off” (no monitoring), “in” (always monitor), or “auto” (monitor when armed)

Returns: AudioTrack — the track, for chaining

fn take() -> RecordedAudio

Retrieves the most recent recording as a RecordedAudio value.

Returns: RecordedAudio — the latest recording, or NUL if none has been made

fn send_level(target: AudioTrack) -> Number

Returns the send level to the given destination track.

Parameters:

  • target (AudioTrack) — destination track

Returns: Number — the send level to target

fn reset_routing() -> AudioTrack

Resets all routing (sends, receives, input) on this track.

Returns: AudioTrack — the track, for chaining

fn save(path: String) -> AudioTrack

Saves the track’s audio to a file.

Parameters:

  • path (String) — output file path

Returns: AudioTrack — the track, for chaining

fn punch(in_cycle: Number, out_cycle: Number) -> AudioTrack

Sets punch-in and punch-out points for time-bounded recording. Recording activates at in_cycle and deactivates at out_cycle.

Parameters:

  • in_cycle (Number) — cycle at which recording starts
  • out_cycle (Number) — cycle at which recording stops

Returns: AudioTrack — the track, for chaining

fn punch_in(cycle: Number) -> AudioTrack

Sets only the punch-in point. Recording starts at the given cycle and continues until manually stopped.

Parameters:

  • cycle (Number) — cycle at which recording starts

Returns: AudioTrack — the track, for chaining

fn punch_out(cycle: Number) -> AudioTrack

Sets only the punch-out point. Recording starts immediately with RECORD and stops at the given cycle.

Parameters:

  • cycle (Number) — cycle at which recording stops

Returns: AudioTrack — the track, for chaining

fn clear_punch() -> AudioTrack

Clears all punch points from this track.

Returns: AudioTrack — the track, for chaining

fn is_punched() -> Boolean

Returns true if this track has punch points configured.

Returns: Boolean — true if punch points are configured

fn velocity(vel: Number or Signal or Pattern) -> AudioTrack

Sets the velocity for notes played on this track.

Parameters:

  • vel (Number | Signal | Pattern) — velocity value, signal, or pattern

Returns: AudioTrack — the track, for chaining

fn tuning(bend_range: Number) -> AudioTrack

Enable microtonal pitch bend output. Uses the MIDI default ±2 semitone range (works with any synth).

Example:

track.tuning(), track.tuning(48)

Parameters:

  • bend_range (Number) — pitch-bend range in semitones (optional; default ±2)

Returns: AudioTrack — the track, for chaining

fn mpe(range: Number, zone_lo: Number, zone_hi: Number) -> AudioTrack

Enable MPE (per-note channel allocation) for polyphonic microtonal output.

Example:

track.mpe(), track.mpe(24), track.mpe(48, 2, 9)

Parameters:

  • range (Number) — pitch-bend range in semitones (optional, defaults to 48)
  • zone_lo (Number) — low member channel (optional, defaults to 2)
  • zone_hi (Number) — high member channel (optional, defaults to 16)

Returns: AudioTrack — the track, for chaining

fn key(k: Key) -> AudioTrack

Set a track-level key (scale + root) for degree resolution and auto-quantization. Degrees (^1, ^2, …) resolve from this key without .in_key(), and absolute notes are quantized to the nearest scale tone.

Example:

track.key(Key(C4, "major")) or track.key("major", C4)

Parameters:

  • k (Key) — the key to apply to this track

Returns: AudioTrack — the track, for chaining

fn key(scale: String or Scale, root: Note or Number) -> AudioTrack

Set a track-level key from a scale and root (alternative to key(Key)).

Parameters:

  • scale (String | Scale) — scale name or Scale value
  • root (Note | Number) — root note (e.g. C4 or a MIDI number)

Returns: AudioTrack — the track, for chaining

An audio effect processor.

Unified type wrapping three backends:

  • Built-in DSP — created via constructors like Delay(), Lowpass(), or dsp effect blocks. Processing runs as compiled bytecode.
  • CLAP plugin — loaded via Effect("name") when a CLAP bundle is found.
  • VST3 plugin — loaded via Effect("name") when a VST3 bundle is found (or when CLAP is unavailable and VST3 is).

All backends support parameter access, state save/load, and can be loaded onto audio tracks and the master bus. GUI and program methods are backend-specific and emit warnings when called on unsupported backends.

Effects carry a slot name (set via set_name() or assigned automatically from the plugin name). When loaded onto a track with load_effect(), effects with the same slot name replace each other in-place rather than accumulating — this makes re-execution idempotent.

let fx = Effect("ValhallaRoom");
fx.param_set("Mix", 0.3);
drums.load_effect(fx);
let delay = Delay(0.25, 0.5);
drums.load_effect(delay);
fn Effect(name: String, plugin_id: String = NUL) -> Effect

Loads an effect plugin (CLAP or VST3). Searches CLAP plugins first, then VST3. File extensions are added automatically.

Parameters:

  • name (String) — plugin name or full path (e.g. “Valhalla Room”)
  • plugin_id (String) — plugin ID, auto-detected if only one plugin in bundle (optional)

Returns: Effect — the loaded effect plugin

fn name() -> String

Returns the slot name of this effect.

For external plugins this defaults to the plugin’s display name. For built-in effects it defaults to the constructor name (e.g. “Delay”). Can be changed with set_name().

Backends: all.

Delay().name(); // => "Delay"
Effect("ValhallaRoom").name(); // => "ValhallaRoom"

Returns: String — the effect’s slot name

fn param(name: String) -> EffectParam

Returns a parameter reference for the named parameter.

Uses fuzzy case-insensitive matching: exact path first, then substring match on path and display name. Use .get(), .set(), .set_norm() on the returned reference, or pipe it with << for modulation.

Backends: all.

let d = Delay(0.25, 0.5);
d.param("Time").get(); // => 0.25
d.param("Time").set(0.5); // set to 0.5
d.param("Time") << Sine(2).range(0.1, 0.8);

Parameters:

  • name (String) — parameter name (e.g. “Room”, “Mix”, “Cutoff”)

Returns: EffectParam — a parameter reference with .get(), .set(), .set_norm() methods Errors: RuntimeError — if no parameter matches or match is ambiguous

fn param_get(name: String) -> Number

Gets the current value of a parameter by name (shorthand).

Equivalent to .param(name).get(). Returns the value in the parameter’s native range (not normalized).

Backends: all.

let d = Delay(0.25, 0.5);
d.param_get("Time"); // => 0.25
d.param_get("Feedback"); // => 0.5

Parameters:

  • name (String) — parameter name (e.g. “Room”, “Mix”, “Cutoff”)

Returns: Number — the current parameter value in its native range Errors: RuntimeError — if no parameter with the given name exists

fn param_set(name: String, value: Number) -> Effect

Sets a parameter value by name in its native range.

The value is clamped to the parameter’s declared range. For normalized [0,1] input use param_set_norm() instead.

Backends: all.

Delay().param_set("Time", 0.8).param_set("Feedback", 0.3);

Parameters:

  • name (String) — parameter name (e.g. “Room”, “Mix”)
  • value (Number) — new value in the parameter’s native range

Returns: Effect — this, for method chaining Errors: RuntimeError — if no parameter with the given name exists

fn param_set_norm(name: String, value: Number) -> Effect

Sets a parameter value using a normalized [0,1] input.

The normalized value is mapped to the parameter’s native range: actual = min + normalized * (max - min).

Backends: all.

fx.param_set_norm("Mix", 0.5); // set Mix to midpoint of its range

Parameters:

  • name (String) — parameter name (e.g. “Room”, “Mix”)
  • value (Number) — normalized value (0.0 = minimum, 1.0 = maximum)

Returns: Effect — this, for method chaining Errors: RuntimeError — if no parameter with the given name exists

fn params(filter: String?) -> ParamList

Returns a ParamList of all effect parameters.

Prints as a formatted table (headed by the effect name and backend) with columns Parameter, Value, Range, Default. Use .data for the raw array of dicts; each entry has name, value, min, max, default, group, path, and step.

Backends: all.

fx.params(); // all parameters
fx.params("freq"); // only parameters containing "freq"
fx.params().data; // raw array of parameter dicts

Parameters:

  • filter (String) — only include parameters whose name contains this substring (optional)

Returns: ParamList — parameter data (columns: Parameter, Value, Range, Default)

fn supports_gui() -> Boolean

Returns whether this effect supports a graphical user interface.

Built-in DSP effects always return false. CLAP and VST3 plugins return true if the plugin provides a GUI.

Backends: all (DSP always returns false).

Delay().supports_gui(); // => false
Effect("ValhallaRoom").supports_gui(); // => true

Returns: Boolean — true if show_gui() will open a window

fn show_gui() -> NUL

Opens the plugin GUI window.

For CLAP/VST3 plugins with GUI support, opens the plugin’s native editor window. For built-in DSP effects, prints a warning and returns NUL (no error).

Backends: CLAP, VST3. Warns on DSP.

let fx = Effect("ValhallaRoom");
fx.show_gui();

Returns: NUL Errors: RuntimeError — if the plugin does not support GUI (CLAP/VST3 only) RuntimeError — if running in headless mode

fn hide_gui() -> NUL

Closes the plugin GUI window.

For CLAP/VST3 plugins, closes the native editor window if open. For built-in DSP effects, prints a warning and returns NUL.

Backends: CLAP, VST3. Warns on DSP.

fx.hide_gui();

Returns: NUL

fn save_state(path: String) -> Effect

Saves the effect’s state to a preset file.

For CLAP/VST3 plugins, saves the full binary plugin state (includes all internal state beyond just parameter values). For built-in DSP effects, saves parameter values only.

The file format is a Resonon preset file (.preset extension recommended).

Backends: all.

fx.save_state("presets/warm_reverb.preset");

Parameters:

  • path (String) — file path for the preset

Returns: Effect — this, for method chaining

fn load_state(path: String) -> Effect

Loads a preset file into the effect.

Restores the effect’s state from a file previously created by save_state(). The preset’s plugin name must match this effect’s plugin name.

Backends: all.

fx.load_state("presets/warm_reverb.preset");

Parameters:

  • path (String) — file path of the preset to load

Returns: Effect — this, for method chaining Errors: RuntimeError — if the file doesn’t exist or the plugin name mismatches

fn set_name(name: String) -> Effect

Sets the slot name used for idempotent loading.

When an effect is loaded onto a track or master with load_effect(), the slot name determines identity: effects with the same slot name replace each other in-place (preserving chain position) rather than accumulating. This makes re-execution idempotent.

Backends: all.

Delay(0.25).set_name("echo");
drums.load_effect(Delay(0.5).set_name("echo")); // replaces, not duplicates

Parameters:

  • name (String) — the new slot name

Returns: Effect — a new Effect value with the updated slot name

fn connect_input(name: String, source: AudioTrack) -> Effect

Connects a named sidechain input port to a source audio track.

Some effects (e.g. compressors) have sidechain input ports that accept audio from another track. This method sets up that routing in the audio graph. The source track must be processed before the effect’s track (enforced by topological sort).

Backends: CLAP, VST3 (DSP effects typically have no sidechain ports).

let comp = Effect("TDR Kotelnikov");
comp.connect_input("sidechain", kick_track);
bass.load_effect(comp);

Parameters:

  • name (String) — the sidechain input port name (e.g. “sidechain”)
  • source (AudioTrack) — the track whose output feeds this port

Returns: Effect — this, for method chaining Errors: RuntimeError — if the effect has no port with the given name

fn programs() -> Array

Lists all program/preset names built into the plugin.

Only VST3 plugins expose factory programs. For CLAP and built-in DSP effects, prints a warning and returns an empty array.

Backends: VST3. Warns on CLAP, DSP.

let fx = Effect("Diva");
fx.programs(); // => #["Init", "Juno Saw", "Warm Pad", ...]

Returns: Array — array of program name strings, e.g. #["Init", "Warm", "Bright"]

fn set_program(index: Number) -> Effect

Selects a factory program/preset by index.

Only VST3 plugins support program selection. For CLAP and built-in DSP effects, prints a warning and returns the effect unchanged.

Backends: VST3. Warns on CLAP, DSP.

let fx = Effect("Diva");
fx.set_program(2); // select the third factory preset

Parameters:

  • index (Number) — zero-based program index

Returns: Effect — this, for method chaining Errors: RuntimeError — if the index is out of range (VST3 only)

fn backend() -> String

Returns the plugin backend type (“CLAP”, “VST3”, or “built-in”).

Returns: String — the backend type

A reference to a single effect parameter, obtained via .param("name"). Supports .get(), .set(), .set_norm() and modulation via <<.

fn get() -> Number

Gets the current value of this parameter.

delay.param("Time").get(); // => 0.25

Returns: Number — the current value in the parameter’s native range

fn set(args: unknown) -> EffectParam

Sets this parameter’s value.

Accepts a Number (static set), Signal (modulation), or breakpoint arrays (automation lane).

delay.param("Time").set(0.5);
delay.param("Time").set(Sine(4).range(0.1, 0.8));
delay.param("Time").set(#[0, 200], #[4, 4000]);

Parameters:

  • value... — Number, Signal, or variadic [beat, value] breakpoint arrays

Returns: EffectParam — this reference, for chaining

fn set_norm(value: Number) -> EffectParam

Sets this parameter using a normalized [0,1] value.

delay.param("Time").set_norm(0.5);

Parameters:

  • value (Number) — 0.0 = minimum, 1.0 = maximum

Returns: EffectParam — this reference, for chaining

Type class for Instrument values — wraps .params() in ParamList.

fn Instrument(name: String, plugin_id: String = NUL) -> Instrument

Loads an instrument plugin (CLAP or VST3). Searches CLAP plugins first, then VST3. File extensions are added automatically.

Parameters:

  • name (String) — plugin name or full path (e.g. “Surge XT”)
  • plugin_id (String) — plugin ID, auto-detected if only one plugin in bundle (optional)

Returns: Instrument — the loaded instrument plugin

fn name() -> String

Returns the instrument name.

Returns: String — the instrument name

fn param(name: String) -> InstrumentParam

Returns a parameter reference by name.

Parameters:

  • name (String) — parameter name (e.g. “Cutoff”, “Mix”, “gain”)

Returns: InstrumentParam — a parameter reference with .get(), .set(), .set_norm()

fn param_get(name: String) -> Number

Gets a parameter value by name (shorthand for .param(name).get()).

Parameters:

  • name (String) — parameter name (e.g. “Cutoff”, “Mix”, “gain”)

Returns: Number — the current parameter value

fn param_set(name: String, value: Number) -> Instrument

Sets a parameter value by name.

Parameters:

  • name (String) — parameter name (e.g. “Cutoff”, “Mix”)
  • value (Number) — new value in the parameter’s native range

Returns: Instrument — the instrument, for chaining

fn param_set_norm(name: String, value: Number) -> Instrument

Sets a parameter value using a normalized [0,1] input.

Parameters:

  • name (String) — parameter name (e.g. “Cutoff”, “Mix”)
  • value (Number) — normalized value (0.0 to 1.0)

Returns: Instrument — the instrument, for chaining

fn params(filter: String?) -> ParamList

Returns a ParamList of all instrument parameters.

Prints as a formatted table (headed by the instrument name and backend) with columns Parameter, Value, Range, Default. Use .data for the raw array of dicts; each entry has name, value, min, max, default, group, path, and step.

Backends: all.

inst.params(); // all parameters
inst.params("freq"); // only parameters containing "freq"
inst.params().data; // raw array of parameter dicts

Parameters:

  • filter (String) — only include parameters whose name contains this substring (optional)

Returns: ParamList — parameter data (columns: Parameter, Value, Range, Default)

fn backend() -> String

Returns the plugin backend type (“CLAP”, “VST3”, or “built-in”).

Returns: String — the backend type

fn supports_gui() -> Boolean

Returns true if the plugin supports a GUI window.

Returns: Boolean — true if a GUI window is supported

fn show_gui() -> NUL

Opens the plugin GUI window.

Returns: NUL — nothing

fn hide_gui() -> NUL

Closes the plugin GUI window.

Returns: NUL — nothing

fn save_state(path: String) -> Instrument

Saves the plugin state to a preset file.

Parameters:

  • path (String) — file path for the preset

Returns: Instrument — the instrument, for chaining

fn load_state(path: String) -> Instrument

Loads a preset file into the plugin.

Parameters:

  • path (String) — file path of the preset to load

Returns: Instrument — the instrument, for chaining

fn programs() -> Array

Returns the list of plugin program names.

Returns: Array — the program names as Strings

fn set_program(index: Number) -> Instrument

Switches to a program by index.

Parameters:

  • index (Number) — program index

Returns: Instrument — the instrument, for chaining

fn set_name(name: String) -> Instrument

Renames the instrument’s slot name.

Parameters:

  • name (String) — new slot name

Returns: Instrument — a new instrument with the updated name

A reference to a single instrument parameter, obtained via .param("name"). Supports .get(), .set(), .set_norm() and modulation via <<.

fn get() -> Number

Gets the current value of this parameter.

Returns: Number — the current value in the parameter’s native range

fn set(args: unknown) -> InstrumentParam

Sets this parameter’s value.

Accepts a Number (static set), Signal (modulation), or breakpoint arrays (automation lane).

Parameters:

  • value... — Number, Signal, or variadic [beat, value] breakpoint arrays

Returns: InstrumentParam — this reference, for chaining

fn set_norm(value: Number) -> InstrumentParam

Sets this parameter using a normalized [0,1] value.

Parameters:

  • value (Number) — 0.0 = minimum, 1.0 = maximum

Returns: InstrumentParam — this reference, for chaining

The master output bus. Always present, cannot be deleted. Has its own effect chain and fader (volume/pan). Access via the global master variable.

fn load_effect(effect: Effect) -> Master

Loads an effect onto the master bus by slot name. If an effect with the same slot name already exists, it is replaced in-place.

Parameters:

  • effect (Effect) — the effect to load

Returns: Master — the master bus, for chaining

fn load_effects(effects: Array) -> Master

Loads multiple effects at once (each replaces by slot name).

Parameters:

  • effects (Array) — the effects to load

Returns: Master — the master bus, for chaining

fn effects() -> Array

Returns an array of all effects in chain order.

Returns: Array — the effects in chain order

fn get_effect(name: String) -> Effect

Gets an effect by its slot name.

Parameters:

  • name (String) — slot name of the effect

Returns: Effect — the effect with that slot name

fn swap_effects(i: Number, j: Number) -> Master

Swaps two effects in the chain by index.

Parameters:

  • i (Number) — first effect index
  • j (Number) — second effect index

Returns: Master — the master bus, for chaining

fn remove_effect(index: Number) -> Effect

Removes an effect from the chain by index.

Parameters:

  • index (Number) — position of the effect to remove

Returns: Effect — the removed effect

fn clear_effects() -> Master

Removes all effects from the chain.

Returns: Master — the master bus, for chaining

fn volume(value: Number) -> Master

Sets master volume. Clears any existing volume modulation.

Parameters:

  • value (Number) — volume in dB (0 = unity, -70 = mute, +6 = max boost)

Returns: Master — the master bus, for chaining

fn pan(value: Number) -> Master

Sets master pan. Clears any existing pan modulation.

Parameters:

  • value (Number) — pan position (-1.0 = hard left, 0.0 = center, 1.0 = hard right)

Returns: Master — the master bus, for chaining

A reference to the master bus fader parameter, obtained via master.volume or master.pan. Supports .get(), .set(), .set_norm() and modulation via <<.

fn get() -> Number

Gets the current master fader value.

master.volume.get(); // => 0.0
master.pan.get(); // => 0.0

Returns: Number — volume in dB (0 = unity, -70 = mute), or pan (-1.0 to 1.0)

fn set(args: unknown) -> MasterParam

Sets this master fader’s value.

Accepts a Number (static set), Signal (modulation), Pattern (converted to modulation signal), or breakpoint arrays (automation lane).

master.volume.set(-6);
master.pan.set(Sine(2).range(-0.5, 0.5));
master.volume.set(#[0, -12], #[4, 0]);

Parameters:

  • value... — Number, Signal, Pattern, or variadic [beat, value] breakpoint arrays

Returns: MasterParam — this reference, for chaining

fn set_norm(value: Number) -> MasterParam

Sets this master fader using a normalized [0,1] value.

Volume: 0.0 = -70 dB (mute), 1.0 = +6 dB (max boost). Pan: 0.0 = hard left, 0.5 = center, 1.0 = hard right.

master.volume.set_norm(0.5);

Parameters:

  • value (Number) — 0.0 = minimum, 1.0 = maximum

Returns: MasterParam — this reference, for chaining

Wraps an array of parameter dicts from .params(). Prints as an aligned table; provides .data for programmatic access.

fn new(entries: Array)
fn __str__Function
fn filter(name: String) -> ParamList

Filters parameters by name substring, returns a new ParamList.

Parameters:

  • name (String) — substring to match against parameter names

Returns: ParamList — a new list of the matching parameters

fn length() -> Number

Returns the number of parameters.

Returns: Number — the parameter count

fn get(index: Number) -> Dict

Returns the parameter dict at the given index.

Parameters:

  • index (Number) — zero-based position

Returns: Dict — the parameter entry at index

Wraps an array of plugin dicts from plugin_scan(). Prints as an aligned table; provides .data for programmatic access.

fn new(entries: Array)
fn __str__Function
fn filter(name: String) -> PluginList

Filters plugins by name substring, returns a new PluginList.

Parameters:

  • name (String) — substring to match against plugin names

Returns: PluginList — a new list of the matching plugins

fn length() -> Number

Returns the number of plugins.

Returns: Number — the plugin count

fn get(index: Number) -> Dict

Returns the plugin dict at the given index.

Parameters:

  • index (Number) — zero-based position

Returns: Dict — the plugin entry at index

Captured audio data from audio_record(). Provides methods to inspect and save recorded audio.

fn save(path: String) -> RecordedAudio

Saves the recording to a WAV file.

Parameters:

  • path (String) — output file path

Returns: RecordedAudio — this, for method chaining

fn duration() -> Number

Returns the duration of the recording in seconds.

Returns: Number — the duration in seconds

fn samples() -> Number

Returns the total number of samples in the recording.

Returns: Number — the total sample count

fn sample_rate() -> Number

Returns the sample rate of the recording.

Returns: Number — the sample rate in Hz

fn left() -> Array

Returns the left channel as an array of sample values.

Returns: Array — the left-channel sample values

fn right() -> Array

Returns the right channel as an array of sample values.

Returns: Array — the right-channel sample values

fn mono() -> Array

Returns a mono mixdown as an array of sample values.

Returns: Array — the mono mixdown sample values

A reference to an audio track’s fader parameter, obtained via track.volume or track.pan. Supports .get(), .set(), .set_norm() and modulation via <<.

fn get() -> Number

Gets the current fader value.

track.volume.get(); // => 0.0
track.pan.get(); // => 0.0

Returns: Number — volume in dB (0 = unity, -70 = mute), or pan (-1.0 to 1.0)

fn set(args: unknown) -> TrackParam

Sets this fader’s value.

Accepts a Number (static set), Signal (modulation), Pattern (converted to modulation signal), or breakpoint arrays (automation lane).

track.volume.set(-6);
track.pan.set(Sine(2).range(-0.5, 0.5));
track.volume.set(#[0, -12], #[4, 0]);

Parameters:

  • value... — Number, Signal, Pattern, or variadic [beat, value] breakpoint arrays

Returns: TrackParam — this reference, for chaining

fn set_norm(value: Number) -> TrackParam

Sets this fader using a normalized [0,1] value.

Volume: 0.0 = -70 dB (mute), 1.0 = +6 dB (max boost). Pan: 0.0 = hard left, 0.5 = center, 1.0 = hard right.

track.volume.set_norm(0.5);

Parameters:

  • value (Number) — 0.0 = minimum, 1.0 = maximum

Returns: TrackParam — this reference, for chaining