Programming Languages & Live Coding
Cagire: The Step Sequencer Where Every Beat Is a Forth Script
Most sequencers arrange notes in a grid. Cagire arranges little programs instead — each step is a Forth script that runs at beat time, synthesizing sound, sampling, applying effects, or doing nothing at all.
- Cagire ships with its own audio engine, Doux: oscillators, sample players, filters, reverb, delay, distortion — no external synthesizer needed.
- Scripts are written in Forth, a concatenative language read one word at a time, from right to left, where every word is a small piece of behavior that composes with the next.
- A second language, Arf, lives between curly braces for writing custom DSP when the built-in primitives are not enough.
The idea flips the normal step-sequencer model on its head. In a conventional grid, each cell stores a note number and a velocity, and the sequencer plays them in order. In Cagire, each cell stores a tiny program. When the sequencer reaches the step, it runs that program. One step might synthesize a sawtooth tone, filter it, choose a gain, occasionally "crush" the signal, and decay it to silence — all in a single line that looks like saw snd < c4 eb3 g3 > note [ .5 .8 ] choose gain ( 8 crush ) sometimes 0.5 decay.
The choice of Forth is the design's spine. Forth was created in the 1970s for embedded and low-resource systems and has never really left them: it is tiny, fast, stack-based, and transparent — you can see exactly what every word does because the whole language is built from small, composable verbs. That makes it unusually well suited to live coding, the practice of writing and performing code in front of an audience, where the reward is in doing it rather than in a finished product.
Cagire is free and open source (AGPL-3.0), built by one developer, and ships with a full interactive manual inside the app — every example runnable on the spot. It belongs to a small but growing family of instruments that treat code not as a tool for making music but as the instrument itself.