Flow
A programming language for making music. Write note streams, chords, and musical-context blocks as code — and hear them the instant you press play.
A pure tone
The hello-world — a one-second A4 sine. Press play to hear it.
use "@audio" (play (createSineTone 440Hz 1.0 0.5))
A note-stream melody
A C-major run, written inline as a note stream at 120 BPM.
use "@audio" use "@composition" tempo 120 { (play | C4q D4q E4q F4q G4q |) }
A chord progression
A ii–V–I in C, played from chord brackets inside a key context.
use "@composition" key Cmajor { (play | [D4 F4 A4]h [G3 B3 D4]h [C4 E4 G4]w |) }
Why Flow
Flow turns musical ideas into code you can hear instantly. It reads like notation, chains like a pipeline, and speaks every genre. Three principles guide the whole language — and each one shows up directly in the syntax.
Ergonomics first
Composer ergonomics beat runtime efficiency and type strictness, every time. Common patterns stay terse and the awkward cases stay possible — you write what you mean musically, not what the machine needs to hear.
Genre-agnostic
Classical, EDM, jazz, pop, metal — one language for all of them. Nothing in Flow is tuned for a single style; chords, scales, grooves and synthesis are neutral building blocks you assemble however the piece wants.
Notation roots
Notes, chords, note streams and musical-context blocks — tempo, key, time signature, swing — are part of the syntax. A score-shaped idea stays score-shaped in code, then renders straight to audio or MIDI.
Note streams
Melodies are first-class. Pitches, durations, rests and chords go inline between bars.
| C4q E4q G4q C5h |
Chords & roman numerals
Inside a key, write the harmony you hear — roman numerals resolve to real chords.
key Cmajor { (play | I vi IV V |) }
The flow operator
Chain transforms left-to-right with -> — transpose, then reverse, then play.
riff -> (transpose +7st) -> (retrograde)
Generative & improv
Hand a chord chart to jam and get a chord-aware solo back, in any style.
(jam over=chords style=#jazz length=8)