rill-graph
Real-time audio graph with block processing, topological sort, and
the [SignalEngine] — a real-time safe graph engine.
Key components
SignalGraph— immutable DAG container, topology is fixed at build timeGraphBuilder— the only way to build a graph (Source→Processor→Sink)- Kahn's algorithm — topological sort with cycle detection
SignalEngine<T, BUF_SIZE>— drives the graph:process_tick(tick)— clock boundary: drains commands (anti-ack on overwrite), runspre_process(feedback mix), applies parameter changesprocess_block(tick)— convenience:process_tick+ topo-order node processing + snapshot + propagatespawn()— consumes the engine and runs it in a dedicated audio threadrunning_flag()—Arc<AtomicBool>for cooperative shutdown
- Two-thread architecture — audio thread (hard RT) runs the engine,
control thread (soft RT) runs
PatchbayManagervia queues - Zero-copy routing — 1:1 и fan-out соединения читают напрямую из буфера
upstream-порта (
Port::upstream_buffer). Копирование только при fan-in и feedback. - SIMD-friendly — фиксированное положение буфера в памяти на всё время жизни графа.
- Port routing — соединения и буферы обратной связи хранятся на портах
- Feedback support — deferred feedback via
port.pre_process/port.snapshot_feedback - Port types —
Audio,Control,Clock,Feedback,Param
Dependencies
rill-core—SignalNode,Source/Processor/Sinktraits,ClockTick,CommandQueue,TelemetryQueue
Links
- Repository: https://github.com/DigitalRats/rill
- Documentation: https://docs.rs/rill-graph