SUPERB
Examples

Examples

Each example is a short, commented program: the comments explain the Rust and the DAW idea side by side. Everything runs without hardware unless hardware is the point, and every example is registered in Cargo.toml, so cargo run --example <name> is all you need.

Flows

One per flow module, in the order you would use them to make a session.

exampleflowshowsrun
new_sessionsession, track, cliptracks, an audio clip from memory, a MIDI clip, tempo, marker, undo/redo, save and opencargo run --example new_session
play_sessiontransportstart, offline blocks, playhead, seek, loop, stop, rewind; device output with devicescargo run --example play_session
mix_sessiontrack, senda volume drag as one undo step, pan, mute, solo, a bus with sends, routing, meterscargo run --example mix_session
midi_keysmidia monitoring MIDI track, notes and a chord, release, any message; ports with midi-iocargo run --example midi_keys
metronome_count_inmetronomethe click while playing, a one-bar count-in before a recording, the clip starting at the punch-incargo run --example metronome_count_in
record_takerecordarm, punch in, a recording from a synthetic microphone, clips, undo; a real input with devicescargo run --example record_take
export_sessionexportbounce the session and a range; resample with filescargo run --example export_session
bounce_stemsexport, sessionwhere files go (Root, Layout), a bounce into bounces/, a stem set with its manifestcargo run --example bounce_stems
session_stepssession::stepsbuild the mixer from a Memory by hand (strips, a bus, a send, the live controls) and render it through an offline enginecargo run --example session_steps
list_devicesdevicesaudio devices with the default marked; MIDI ports with midi-iocargo run --example list_devices --features devices

Primitives

exampleprimitiveshowsrun
sine_through_graphgraph, mixer, iosine → mixer → WAV with a looping transportcargo run --example sine_through_graph
automation_gain_rampautomationsample-accurate envelope into an AtomicF32cargo run --example automation_gain_ramp
live_graph_editgraph::liveswap graphs while a block loop keeps runningcargo run --example live_graph_edit
transport_tempo_maptransporttempo and meter changes, bars/beats, loop segmentscargo run --example transport_tempo_map
realtime_queuerealtimeSPSC queue and atomics between a UI and an audio threadcargo run --example realtime_queue
midi_routemidi, graphMIDI edges and a sample-accurate queued notecargo run --example midi_route
midi_monitormidi::inputprint hardware MIDI for ten secondscargo run --example midi_monitor --features midi-io
play_sine_deviceio::devicea sine on the default output device, with load statscargo run --example play_sine_device --features devices
decode_bounceio::filesbounce → decode → resample → exportcargo run --example decode_bounce --features files
session_undosession, undoundoable edits to a Memory, JSON save and loadcargo run --example session_undo
clap_host_scanplugins::clapscan and instantiate a CLAP plugin, render offlinecargo run --example clap_host_scan -- [dir ...] [--id …]
measure_loudnessanalysispeak, RMS and true peak; LUFS momentary, short-term, integrated; normalising to -16 LUFS; lining two recordings up; finding silencecargo run --example measure_loudness

The buffers and undo modules have no example of their own: every example above uses PlanarBuffer, and session_undo and new_session are the undo stack in practice.

On this page