Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Track Tools

Create and control audio and MIDI tracks.

Creating Tracks

create_audio_track

Create a new audio track.

ParameterTypeDescription
indexinteger?Position (-1 = end)

Returns: Track index of the new track.

create_midi_track

Create a new MIDI track.

ParameterTypeDescription
indexinteger?Position (-1 = end)

Returns: Track index of the new track.

create_return_track

Create a new return track.

delete_track

Delete a track.

ParameterTypeDescription
track_indexintegerTrack to delete

duplicate_track

Duplicate a track with all its clips and devices.

ParameterTypeDescription
track_indexintegerTrack to duplicate

Track Info

list_tracks

Get information about all tracks.

Returns: Array of track info objects.

get_track_name

Get a track's name.

ParameterTypeDescription
track_indexintegerTrack index

set_track_name

Set a track's name.

ParameterTypeDescription
track_indexintegerTrack index
namestringNew name

Volume & Pan

get_track_volume

Get track volume (0.0 - 1.0).

set_track_volume

Set track volume.

ParameterTypeDescription
track_indexintegerTrack index
volumefloatVolume (0.0 - 1.0)

get_track_pan

Get track pan (-1.0 left to 1.0 right).

set_track_pan

Set track pan.

ParameterTypeDescription
track_indexintegerTrack index
panfloatPan (-1.0 to 1.0)

Mute, Solo, Arm

get_track_mute / set_track_mute

Get or set track mute state.

get_track_solo / set_track_solo

Get or set track solo state.

get_track_arm / set_track_arm

Get or set track arm state (for recording).

arm_track

Convenience method to arm a track.

ParameterTypeDescription
track_indexintegerTrack index

Sends

get_track_send

Get send level to a return track.

ParameterTypeDescription
track_indexintegerSource track
send_indexintegerReturn track index

set_track_send

Set send level.

ParameterTypeDescription
track_indexintegerSource track
send_indexintegerReturn track index
valuefloatSend level (0.0 - 1.0)

Routing

get_track_input_routing / set_track_input_routing

Control where track receives input from.

get_track_output_routing / set_track_output_routing

Control where track sends output to.

Common Workflows

Create a Synth Track

1. create_midi_track()           // Creates at index N
2. load_default_instrument()     // Loads Drift synth
3. set_track_name(N, "Lead")     // Name it

Set Up Sends

1. create_return_track()         // Create return
2. load_audio_effect("Reverb")   // Add reverb to return
3. set_track_send(0, 0, 0.5)     // Send from track 0