Skip to content

Send a Track to Hardware Outputs

Output names channels of the audio interface, counting from 0: two for a stereo pair, one for mono. The interface itself is set in preferences, or in the app with Output Device on the Audio tab of the Preferences window.

Route the track to an Output with >>. It replaces the track’s route to session.master, so the track leaves the mix:

// Create the tracks once. setup() runs when the project opens and on Reset Project.
fn setup() {
session.create_track("click");
session.create_track("cue");
}
let click = session.track("click");
let cue = session.track("cue");
click >> Output(2, 3); // the click on channels 2 and 3, not in the mix
cue >> Output(4); // mono, on channel 4

A channel the interface doesn’t have is an error. A track routed to an Output is not in a render’s master.wav either; render(click, n) writes it on its own.

session.master takes an Output too:

session.master >> Output(2, 3); // the whole mix on channels 2 and 3
click >> session.master;