Skip to content

Audio Routing

AlgoBooth is built around a professional DJ routing model — the same model used by hardware DJ mixers. Understanding how audio flows through the app will help you get the most out of live performances.

The Two-Channel Architecture

Every pattern in AlgoBooth routes to one of two channels:

ChannelPurposeWho Hears It
CuePreview channel for the performerHeadphones only
MasterAudience outputPA system, recording, stream

This mirrors the workflow of a DJ mixer: you preview (cue) an incoming track in headphones before mixing it in for the audience. In AlgoBooth, you write code in the Cue channel to prepare a new pattern, then transition it into the Master channel when it sounds right.

How Patterns Route to Channels

Each editor pane in AlgoBooth is assigned to a channel:

  • Left editor — Cue channel (default)
  • Right editor — Master channel (default)

When you evaluate code in the left editor (Ctrl+Enter), it plays only through your headphones. The audience hears nothing until you move that pattern to Master.

Channels run independently. Both can play simultaneously — in fact, that is the intended workflow. The Cue runs your upcoming pattern while Master plays the current one for the audience.

The Mix Knob

The mix knob (center of the interface) controls the crossfade between Cue and Master:

  • Full left — Master output only
  • Center — Both channels audible in the main output
  • Full right — Cue output only

The mix knob affects the main stereo output — what the audience hears. Your headphone monitoring mix is separate (see below).

This crossfade is the primary transition mechanism. You can automate it, move it manually, or let AlgoBooth apply a transition curve.

Volume Controls

Each channel has independent volume control:

  • Cue volume — Scales the Cue channel without affecting Master
  • Master volume — Scales the Master channel independently
  • Main output level — Overall output after the crossfade

Gain-staging: keep individual channel volumes near unity (100%) and use gain() within patterns for relative balance between sounds. Reserve the channel volume knobs for live performance adjustments.

Headphone Monitoring

The DJ monitoring workflow requires a separate audio output for headphones. AlgoBooth supports this via your system’s audio routing:

  1. Open Settings and navigate to Audio
  2. Set Headphone Output to your headphone interface or device
  3. Set Master Output to your PA interface

Once configured:

  • The Cue channel plays through headphones
  • The Master channel plays through the PA
  • The mix knob controls what the audience hears independently of your headphones

If you only have one audio output (laptop speakers, single audio interface), Cue and Master will both play through the same device. This works fine for practice — you hear both channels mixed together.

Visual Transition Indicators

AlgoBooth shows visual feedback for the current state of each channel:

  • Green waveform — Pattern evaluating and playing
  • Yellow indicator — Pattern pending (queued for next cycle)
  • Red outline — Evaluation error (last valid pattern is still playing)
  • Fading waveform — Channel transitioning out via crossfade

The visual indicators update in real time, synchronized with the audio. This lets you monitor the state of both channels at a glance without listening to them simultaneously.

Pattern Transitions

A transition moves audio from Cue to Master smoothly. There are several transition modes:

ModeBehavior
CutImmediate switch at the next cycle boundary
FadeCrossfade over a configurable number of cycles
DropMaster fades out then Cue fades in
SpinbackClassic DJ spinback effect before the new pattern enters

To trigger a transition:

  1. Write your new pattern in the Cue editor and evaluate it
  2. Listen in headphones to verify it sounds right
  3. Press the transition shortcut (Ctrl+Shift+Space by default) or drag the mix knob

The transition runs at cycle boundaries, so the timing stays locked to the grid.

Orbit Routing

Within a pattern, you can route individual sounds to different audio buses using orbit(). By default, all sounds go to orbit 1. Each orbit has its own reverb and delay:

// Drums on orbit 1 (dry)
s("bd*4").orbit(1)
// Melody on orbit 2 (with heavy reverb)
note("c3 e3 g3").s("sine").room(0.8).orbit(2)

Orbits all feed into the same channel (Cue or Master) — they are sub-buses within a channel, not separate channel outputs.

Practical Workflow Example

A typical AlgoBooth live set looks like this:

  1. Load opening pattern — Evaluate in Master, move mix knob fully right to let it play
  2. Write next pattern — In the Cue editor, write and iterate your upcoming pattern while listening in headphones
  3. Verify the transition — Use headphones to confirm the Cue sounds good with the Master
  4. Trigger the transition — Crossfade or cut to bring Cue into Master
  5. Swap the editors — The former Cue becomes the new Master; write the next idea in the free editor
  6. Repeat

This cycle — write, preview, transition — is the core loop of a live AlgoBooth performance.