pub struct AudioGraph {
pub nodes: HashMap<String, Node>,
pub connections: Vec<Connection>,
pub master_node: String,
}Expand description
The complete audio graph
Fields§
§nodes: HashMap<String, Node>All nodes (channels/tracks)
connections: Vec<Connection>All connections between nodes
master_node: StringMaster node (final mixer) - always “$master”
Implementations§
Source§impl AudioGraph
impl AudioGraph
pub fn new() -> Self
Sourcepub fn add_node(
&mut self,
name: String,
alias: Option<String>,
effects: Option<Value>,
)
pub fn add_node( &mut self, name: String, alias: Option<String>, effects: Option<Value>, )
Add a node to the graph
Sourcepub fn add_connection(&mut self, connection: Connection)
pub fn add_connection(&mut self, connection: Connection)
Add a connection to the graph
Sourcepub fn from_routing_setup(routing_setup: &RoutingSetup) -> Self
pub fn from_routing_setup(routing_setup: &RoutingSetup) -> Self
Build the graph from routing configuration
Sourcepub fn get_outgoing_routes(&self, node_name: &str) -> Vec<&Connection>
pub fn get_outgoing_routes(&self, node_name: &str) -> Vec<&Connection>
Get outgoing routes from a node
Sourcepub fn get_incoming_ducks(&self, node_name: &str) -> Vec<&Connection>
pub fn get_incoming_ducks(&self, node_name: &str) -> Vec<&Connection>
Get ducks affecting a node
Sourcepub fn get_incoming_sidechains(&self, node_name: &str) -> Vec<&Connection>
pub fn get_incoming_sidechains(&self, node_name: &str) -> Vec<&Connection>
Get sidechains affecting a node
Sourcepub fn node_names(&self) -> Vec<String>
pub fn node_names(&self) -> Vec<String>
Get all node names
Sourcepub fn debug_print(&self)
pub fn debug_print(&self)
Print debug information about the audio graph
Trait Implementations§
Source§impl Clone for AudioGraph
impl Clone for AudioGraph
Source§fn clone(&self) -> AudioGraph
fn clone(&self) -> AudioGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AudioGraph
impl Debug for AudioGraph
Auto Trait Implementations§
impl Freeze for AudioGraph
impl RefUnwindSafe for AudioGraph
impl Send for AudioGraph
impl Sync for AudioGraph
impl Unpin for AudioGraph
impl UnwindSafe for AudioGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more