pub struct Graph<T: Transcendental, const BUF_SIZE: usize> { /* private fields */ }Expand description
Immutable signal graph with static DAG topology.
Once built the graph cannot be modified. The graph owns no processing
logic — it is a pure topology description. Processing is driven by
port-level methods (pre_process, snapshot_feedback, propagate)
called from external code (e.g. a real-time signal callback or an
offline renderer).
Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> Graph<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Graph<T, BUF_SIZE>
Sourcepub fn nodes(&self) -> &[NodeVariant<T, BUF_SIZE>]
pub fn nodes(&self) -> &[NodeVariant<T, BUF_SIZE>]
Borrow the node array.
Sourcepub fn nodes_mut(&mut self) -> &mut [NodeVariant<T, BUF_SIZE>]
pub fn nodes_mut(&mut self) -> &mut [NodeVariant<T, BUF_SIZE>]
Mutably borrow the node array.
Sourcepub fn current_tick(&self) -> ClockTick
pub fn current_tick(&self) -> ClockTick
Return the current clock tick.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Return the number of nodes in the graph.
Sourcepub fn topo_order(&self) -> &[usize]
pub fn topo_order(&self) -> &[usize]
Return the topological ordering of node indices.
Sourcepub fn resources(&self) -> &[GraphResource]
pub fn resources(&self) -> &[GraphResource]
Access the named resources (tape loops, etc.) allocated for this graph.
Sourcepub fn run(&self, running: Arc<AtomicBool>) -> Result<(), String>
pub fn run(&self, running: Arc<AtomicBool>) -> Result<(), String>
Run the audio backend until running becomes false.
For blocking backends (ALSA, PipeWire) this blocks inside
backend.run(). For non-blocking backends (CPAL, JACK) it
parks after setup. An external signal must unpark the thread
after setting running to false.
Sourcepub fn handle(&self) -> Option<ActorRef<SetParameter>>
pub fn handle(&self) -> Option<ActorRef<SetParameter>>
Obtain an ActorRef for sending commands to this graph.
The returned handle holds a weak reference — when the Graph is
dropped, all subsequent send calls route to dead letters.
Returns None if no audio backend was configured (no queue created).
Trait Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> ActorCell for Graph<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> ActorCell for Graph<T, BUF_SIZE>
Source§fn receive(&mut self, msg: SetParameter)
fn receive(&mut self, msg: SetParameter)
Process a single parameter command by writing to the target node.