pub struct Graph<T: Transcendental, const BUF_SIZE: usize> {
pub system_clock: Option<Arc<SystemClock>>,
/* 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).
Fields§
§system_clock: Option<Arc<SystemClock>>Optional shared system clock, updated by external sync sources (MIDI, JACK transport).
When set, the I/O callback reads BPM from it and creates ClockTick::with_tempo.
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 (read-only).
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(&mut self, running: Arc<AtomicBool>) -> Result<(), String>
pub fn run(&mut self, running: Arc<AtomicBool>) -> Result<(), String>
Run graph processing through the active node.
Sourcepub fn handle(&self) -> ActorRef<CommandEnum>
pub fn handle(&self) -> ActorRef<CommandEnum>
Obtain an ActorRef for sending commands to this graph.