Skip to content

Tracks & Master

Every sound you make in Resonon flows through a track. A track is a channel for audio — think of it like a channel strip in a regular DAW: it hosts one instrument, has its own volume and pan, carries a chain of effects, and sends its output downstream. Several tracks playing together sum at the master, the final output that reaches your speakers.

This chapter builds a track from scratch and gets it playing. Here’s the whole thing — write it into a .non file, select it, and press Cmd+Enter:

use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.load_instrument(Sampler(Kit("CR-78")));
drums << [bd sd bd sd];
PLAY;

A four-on-the-floor beat. Now the line-by-line.

let drums = AudioTrack("drums");

AudioTrack creates a new audio channel. The name — "drums" — identifies the track in printouts, in the live-coding server, and when you render to disk. You don’t import AudioTrack; it’s always available.

A fresh track is silent. It has no instrument yet, so there’s nothing to make sound.

drums.load_instrument(Sampler(Kit("CR-78")));

load_instrument attaches an instrument to the track. Here it’s a Sampler loaded with the built-in CR-78 drum kit — Resonon’s sample engine playing back classic drum-machine samples. A track holds exactly one instrument; loading a new one replaces the old.

The Samplers chapter covers the sample engine in depth, and Plugins shows how to load a VST3 or CLAP instrument instead.

drums << [bd sd bd sd];

The << operator sends a pattern to a track. [bd sd bd sd] is mini-notation: four samples — bass drum, snare, bass drum, snare — spread evenly across one cycle. The track plays that pattern, looping it every cycle, until you send it a new one.

Sending again replaces the pattern outright:

use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.load_instrument(Sampler(Kit("CR-78")));
drums << [bd sd bd sd];
drums << [bd*4]; // replaces the previous pattern
PLAY;

Mini-notation is a language of its own — rests, subdivisions, repeats, chords. The Patterns chapters are the place to learn it.

Two controls live on every track: volume (in decibels) and pan (from -1 fully left to 1 fully right). You set them with <<, the same operator you use for patterns:

use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.load_instrument(Sampler(Kit("CR-78")));
drums << [bd sd bd sd];
drums.volume << -6; // 6 dB quieter
drums.pan << -0.5; // halfway to the left
PLAY;

<< here does more than set a number once — it can also take a moving signal, so volume and pan become automation lanes. That’s the subject of Signals & Automation.

Real arrangements use several tracks, each with its own instrument, pattern, and mix. Give every track a distinct name:

use "std/instruments" { Sampler, Kit };
let kick = AudioTrack("kick");
let snare = AudioTrack("snare");
let hats = AudioTrack("hats");
kick.load_instrument(Sampler(Kit("CR-78")));
snare.load_instrument(Sampler(Kit("CR-78")));
hats.load_instrument(Sampler(Kit("CR-78")));
kick << [bd*4];
snare << [_ sd _ sd];
hats << [hh*8];
PLAY;

Each track is independent — mute one, repan another, swap a pattern — and all three play together.

You never created a master, yet sound still reached your speakers. That’s because every track routes to master by default. master is the final mixing point: all tracks (and any buses) sum there before the audio leaves Resonon. It’s the master fader of the session.

You can ride it like any track, using <<:

use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.load_instrument(Sampler(Kit("CR-78")));
drums << [bd sd bd sd];
master.volume << -2; // trim the whole mix by 2 dB
master.pan << 0; // keep it centered
PLAY;

Three statements drive playback:

  • PLAY; starts the clock and begins playing.
  • PAUSE; halts playback where it is; the next PLAY; resumes from that point.
  • STOP; halts playback, returns to the start of the cycle, and mutes the output.
use "std/instruments" { Sampler, Kit };
let drums = AudioTrack("drums");
drums.load_instrument(Sampler(Kit("CR-78")));
drums << [bd sd bd sd];
PLAY;

In the VSCode extension you don’t usually type these — F5 toggles play/pause and Shift+F5 stops. You’ll reach for the statements mostly in rendered files and scripts.

You can build tracks, load instruments, mix them, and drive transport. Next, go deeper on the instrument that made all that sound.

  • Samplers — drum kits, melodic sampling, and per-sample control
  • Effects — shaping a track’s sound with delays, filters, and reverb
  • Routing, Buses & Sends — wiring tracks together with >> and sends