-
Notifications
You must be signed in to change notification settings - Fork 0
Home
github-actions[bot] edited this page May 2, 2026
·
2 revisions
Flow is a statically-typed, interpreted programming language designed for music production. It combines general-purpose programming with music-specific syntax and semantics, providing a seamless path from composition to audio export. The interpreter is written in C# targeting .NET 9.
-
Static typing with music-aware types (
Note,Chord,Sequence,Song,Bar,Voice,Track,Buffer, etc.) -
Flow operator (
->) for elegant function chaining and effect pipelines -
Inline note streams (
| C4 D4 E4 F4 |) with durations, dynamics, articulation, ornaments -
Musical context blocks —
tempo,timesig,key,swing,dynamics,pan,gain,rit,accel - Pattern transforms — transpose, invert, retrograde, augment, diminish, humanize, trill, tremolo, vary, and more
-
Chord progressions with voice leading (
progression | I IV V I |) - Built-in synthesizers — piano, brass, sax, flute, organ, bell, strings, drums, sine, and custom wavetables
- Audio effects — reverb, filters, compressor, sidechain, delay, gain, panning, fades
- Song structure — sections, arrangements with repeats, multi-track voices
- Harmony — chord literals, roman numerals, scales, arpeggios
- Generative features — Euclidean rhythms, weighted / seeded random choice, diatonic variation, polyrhythms
- Vocalization — formant-synthesized vowels/syllables and a TTS hook
- Loops, string interpolation, lambdas, closures, higher-order functions
-
Playback — blocking
play, non-blockingstream, loop, preview - Export — WAV (16/24/32-bit) and Standard MIDI Files
- Quick Start — Install, build, and run your first script
- Language Basics — Variables, types, operators, comments, scoping
- Functions — Procedures, lambdas, closures, overloading
-
Flow Operator — The
->pipe operator - Collections — Arrays and list operations
-
Loops —
for,while,break,continue -
String Interpolation —
$"..."syntax
- Note Streams — Inline musical notation
- Musical Context — Tempo, key, time signature, swing, dynamics, pan, gain, rit/accel
- Chords and Harmony — Chord literals, roman numerals, scales
-
Chord Progressions — Voice-led
progression | I IV V I | - Song Structure — Sections, songs, arrangements
- Pattern Transforms — Transpose, invert, retrograde, humanize, trill, tremolo, vary, polyrhythm, tempoRamp
- Dynamics and Expression — Dynamics, articulation, ornaments
-
Generative Music — Euclidean rhythms, random choice,
vary, polyrhythms
- Audio and Synthesis — Buffers, oscillators, envelopes, synthesizers, custom wavetables
- Effects — Reverb, filters, compressor, sidechain, delay, gain, panning
- Voices and Tracks — Multi-track timeline rendering
- Vocalization — Formant-synthesized singing and TTS
- Visualization — ASCII piano-roll and waveform
-
Playback and Export —
play,stream, WAV export, MIDI export, loading WAVs
- Standard Library — Modules and complete function reference
-
Imports and Modules — The
usestatement and module system - Tips and Tricks — Idioms, shorthands, and common pitfalls
- Examples — Complete working programs
use "@std"
use "@audio"
tempo 120 {
timesig 4/4 {
key Cmajor {
section intro {
Sequence melody = | C4q E4q G4q C5q | -> crescendo 0.2 0.7
}
section hook {
Sequence chords = progression | I IV V I |
}
Song mySong = [intro hook*2]
Buffer rendered = (renderSong mySong "piano")
Buffer final = rendered -> reverb 0.3 -> fadeOut 0.5
(exportWav final "my_song.wav")
(writeMidi "my_song.mid" mySong)
(print $"rendered {(getFrames final)} frames")
}
}
}