audio_graph
DAG-based audio processing graph for DAW applications in Rust. Connects instruments, effects and buses with typed ports and automatic topological scheduling.
Features
- Typed ports — Audio, MIDI and Control ports per node, validated at connection time
- DAG scheduling — Kahn's algorithm computes the correct processing order automatically
- Parallel groups — independent nodes are grouped for concurrent execution (rayon-ready)
- Cycle detection — connecting nodes that would create a feedback loop returns an error
- Dynamic graph — add and remove nodes and connections at runtime
- Lock-free routing — buffer routing between nodes uses no allocations per block
Usage
use ;
use ;
use PortId;
;
let mut graph = new;
let synth = graph.add_node;
let filter = graph.add_node;
graph.connect?;
graph.process_block; // executes in correct topological order
Signal types
| Port type | Buffer type | Use for |
|---|---|---|
Audio |
AudioBuffer (f32, non-interleaved) |
Instrument and effect audio |
Midi |
MidiBuffer (events with sample offset) |
Note and CC events |
Control |
ControlBuffer (f32 per frame) |
Parameter automation |
Part of the DAW crate ecosystem
audio_core_dsp
midi_clock_sync
audio_graph ← you are here
event_queue
mixer
piano_roll
plugin_host
project_io
License
MIT