Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::dsp::graph::GraphNodeCollection Class Reference

Manages the collection of graph nodes. More...

#include <src/dsp/graph_node.h>

Public Member Functions

nframes_t get_max_route_playback_latency () const
 Returns the max playback latency of the trigger nodes.
void update_latencies ()
 Updates the latencies of all nodes.
void set_initial_and_terminal_nodes ()
 Updates the initial and terminal nodes based on graph_nodes_.
void finalize_nodes ()
 Sets the initial/terminal nodes.
GraphNodefind_node_for_processable (const IProcessable &processable) const

Data Fields

std::vector< std::unique_ptr< GraphNode > > graph_nodes_
 All nodes in the graph.
std::vector< std::reference_wrapper< GraphNode > > trigger_nodes_
 A subset of graph_nodes_ that are trigger nodes.
std::vector< std::reference_wrapper< GraphNode > > terminal_nodes_
 A subset of graph_nodes_ that are terminal nodes.
std::unique_ptr< InitialProcessorinitial_processor_

Detailed Description

Manages the collection of graph nodes.

This class holds a main collection of graph nodes, as well as subsets of those nodes that are initial trigger nodes and terminal nodes.

Definition at line 297 of file graph_node.h.

Member Function Documentation

◆ finalize_nodes()

void zrythm::dsp::graph::GraphNodeCollection::finalize_nodes ( )
inline

Sets the initial/terminal nodes.

To be called when all nodes have been added.

Definition at line 322 of file graph_node.h.

◆ get_max_route_playback_latency()

nframes_t zrythm::dsp::graph::GraphNodeCollection::get_max_route_playback_latency ( ) const

Returns the max playback latency of the trigger nodes.

Note
Requires calling update_latencies() first.

Field Documentation

◆ graph_nodes_

std::vector<std::unique_ptr<GraphNode> > zrythm::dsp::graph::GraphNodeCollection::graph_nodes_

All nodes in the graph.

Definition at line 330 of file graph_node.h.

◆ initial_processor_

std::unique_ptr<InitialProcessor> zrythm::dsp::graph::GraphNodeCollection::initial_processor_

Definition at line 347 of file graph_node.h.

◆ terminal_nodes_

std::vector<std::reference_wrapper<GraphNode> > zrythm::dsp::graph::GraphNodeCollection::terminal_nodes_

A subset of graph_nodes_ that are terminal nodes.

Terminal nodes are nodes without outgoing edges.

Definition at line 345 of file graph_node.h.

◆ trigger_nodes_

std::vector<std::reference_wrapper<GraphNode> > zrythm::dsp::graph::GraphNodeCollection::trigger_nodes_

A subset of graph_nodes_ that are trigger nodes.

Trigger nodes are nodes without incoming edges. They run concurrently at the start of each cycle to kick off processing.

Definition at line 338 of file graph_node.h.


The documentation for this class was generated from the following file: