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:
| Channel | Purpose | Who Hears It |
|---|---|---|
| Cue | Preview channel for the performer | Headphones only |
| Master | Audience output | PA 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:
- Open Settings and navigate to Audio
- Set Headphone Output to your headphone interface or device
- 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:
| Mode | Behavior |
|---|---|
| Cut | Immediate switch at the next cycle boundary |
| Fade | Crossfade over a configurable number of cycles |
| Drop | Master fades out then Cue fades in |
| Spinback | Classic DJ spinback effect before the new pattern enters |
To trigger a transition:
- Write your new pattern in the Cue editor and evaluate it
- Listen in headphones to verify it sounds right
- Press the transition shortcut (
Ctrl+Shift+Spaceby 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:
- Load opening pattern — Evaluate in Master, move mix knob fully right to let it play
- Write next pattern — In the Cue editor, write and iterate your upcoming pattern while listening in headphones
- Verify the transition — Use headphones to confirm the Cue sounds good with the Master
- Trigger the transition — Crossfade or cut to bring Cue into Master
- Swap the editors — The former Cue becomes the new Master; write the next idea in the free editor
- Repeat
This cycle — write, preview, transition — is the core loop of a live AlgoBooth performance.