Skip to content

Language overview

The orchestra is niminal’s DSP and composition language: typed parameters, named arguments, opcodes you can chain, and a score model any client can write.

This reference follows the language spec. Read it in order, or jump to what you need:

Section Topics
Syntax Comments, bindings, UFCS, control flow
Units and rates Hz, dB, beats; init, control and audio
Envelopes env[...], sustain, curves, ADSR
Instruments instr, mono, voices, out, parameters
Opcodes and functions User opcodes, fn, scheduling
Routing Buses, execution order, delay, latency, layouts
Samples and spectral Tables, kits, playback, FFT
Patterns Mini-notation, grids, pattern transforms
Performance Tracks, clips, scenes, live commands
Score model Events, lanes, sections (wire format)
Reserved words Names the language keeps
Built-in opcodes Core opcode library (v1)

A minimal instrument:

instr pluck(freq: hz, amp: db = -6db, bright: 0..1 = 0.5) {
level = env[0 2ms 1 600ms.exp 0]
osc(saw, freq)
.lpf(cutoff: freq * (2 + bright * 6), res: 0.3, model: ladder)
.gain(amp) * level
}