Skip to content

Getting started

Build from source:

Terminal window
cargo install --path crates/niminal-cli

Save this as saw_lead.nml:

saw_lead.nml
// The basic synth from the spec, playing a short phrase.
tempo 100bpm
instr saw_lead(freq: hz, amp: db = -6db) {
level = env[0 5ms 1 200ms 0.6 | 300ms 0]
osc(saw, freq)
.lpf(cutoff: 2khz, res: 0.2)
.gain(amp) * level
}
saw_lead(freq: a3) for 1beat
at 1beat saw_lead(freq: c4) for 1beat
at 2beats saw_lead(freq: e4, amp: -9db) for 1beat
at 3beats saw_lead(freq: a4) for 2beats

Render it to a WAV file:

Terminal window
niminal render saw_lead.nml --out saw_lead.wav