pub enum NodeId {
Show 43 variants
Nop,
Amp(u8),
Mix3(u8),
Mux9(u8),
SMap(u8),
Map(u8),
Quant(u8),
CQnt(u8),
TSeq(u8),
Code(u8),
Rust1x1(u8),
Sampl(u8),
Sin(u8),
BOsc(u8),
VOsc(u8),
BowStri(u8),
MidiP(u8),
MidiCC(u8),
ExtA(u8),
ExtB(u8),
ExtC(u8),
ExtD(u8),
ExtE(u8),
ExtF(u8),
Inp(u8),
Out(u8),
FbWr(u8),
FbRd(u8),
Scope(u8),
Ad(u8),
Adsr(u8),
TsLFO(u8),
RndWk(u8),
Delay(u8),
AllP(u8),
Comb(u8),
Noise(u8),
FormFM(u8),
SFilter(u8),
FVaFilt(u8),
BiqFilt(u8),
PVerb(u8),
Test(u8),
}
Expand description
This enum is a collection of all implemented modules (aka nodes)
that are implemented. The associated u8
index is the so called
instance of the corresponding Node type.
This is the primary way in this library to refer to a specific node in the node graph that is managed by crate::NodeConfigurator and executed by crate::NodeExecutor.
To see how to actually use this, refer to the documentation of crate::Cell, where you will find an example.
Variants
Nop
Amp(u8)
Mix3(u8)
Mux9(u8)
SMap(u8)
Map(u8)
Quant(u8)
CQnt(u8)
TSeq(u8)
Code(u8)
Rust1x1(u8)
Sampl(u8)
Sin(u8)
BOsc(u8)
VOsc(u8)
BowStri(u8)
MidiP(u8)
MidiCC(u8)
ExtA(u8)
ExtB(u8)
ExtC(u8)
ExtD(u8)
ExtE(u8)
ExtF(u8)
Inp(u8)
Out(u8)
FbWr(u8)
FbRd(u8)
Scope(u8)
Ad(u8)
Adsr(u8)
TsLFO(u8)
RndWk(u8)
Delay(u8)
AllP(u8)
Comb(u8)
Noise(u8)
FormFM(u8)
SFilter(u8)
FVaFilt(u8)
BiqFilt(u8)
PVerb(u8)
Test(u8)
Implementations
sourceimpl NodeId
impl NodeId
pub fn to_instance(&self, instance: usize) -> NodeId
pub fn graph_fun(&self) -> Option<GraphFun>
pub fn eq_variant(&self, other: &NodeId) -> bool
pub fn from_node_info(ni: &NodeInfo) -> NodeId
pub fn label(&self) -> &'static str
pub fn name(&self) -> &'static str
pub fn from_str(name: &str) -> Self
pub fn ui_type(&self) -> UIType
pub fn ui_category(&self) -> UICategory
sourcepub fn init_phase(&self) -> f32
pub fn init_phase(&self) -> f32
Consistently initialize the phase for oscillators. This does some fixed phase offset for the first 3 instances, which is usually relied on by the automated tests.
sourcepub fn atom_param_by_idx(&self, idx: usize) -> Option<ParamId>
pub fn atom_param_by_idx(&self, idx: usize) -> Option<ParamId>
This maps the atom index of the node to the absolute ParamId in the GUI (and in the crate::matrix::Matrix). The Atom/Param duality is a bit weird because they share the same ID namespace for the UI. But in the actual backend, they are split. So the actual splitting happens in the crate::matrix::Matrix.
pub fn inp_param_by_idx(&self, idx: usize) -> Option<ParamId>
pub fn param_by_idx(&self, idx: usize) -> Option<ParamId>
pub fn inp_param(&self, name: &str) -> Option<ParamId>
pub fn inp(&self, name: &str) -> Option<u8>
pub fn inp_name_by_idx(&self, idx: u8) -> Option<&'static str>
pub fn out_name_by_idx(&self, idx: u8) -> Option<&'static str>
pub fn out(&self, name: &str) -> Option<u8>
pub fn instance(&self) -> usize
Trait Implementations
sourceimpl Ord for NodeId
impl Ord for NodeId
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialOrd<NodeId> for NodeId
impl PartialOrd<NodeId> for NodeId
sourcefn partial_cmp(&self, other: &NodeId) -> Option<Ordering>
fn partial_cmp(&self, other: &NodeId) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for NodeId
impl Eq for NodeId
impl StructuralEq for NodeId
impl StructuralPartialEq for NodeId
Auto Trait Implementations
impl RefUnwindSafe for NodeId
impl Send for NodeId
impl Sync for NodeId
impl Unpin for NodeId
impl UnwindSafe for NodeId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.