pub struct AudioNode {Show 16 fields
pub id: NodeId,
pub node_type: AudioNodeType,
pub label: String,
pub enabled: bool,
pub x: f32,
pub y: f32,
pub phase: f32,
pub filter: BiquadFilter,
pub envelope: AdsrEnvelope,
pub lfo_state: Lfo,
pub delay_line: DelayLine,
pub reverb: Reverb,
pub chorus: Chorus,
pub compressor: Compressor,
pub last_peak: f32,
pub last_rms: f32,
/* private fields */
}Expand description
A node in the audio processing graph.
Fields§
§id: NodeId§node_type: AudioNodeType§label: String§enabled: bool§x: f32§y: f32§phase: f32§filter: BiquadFilter§envelope: AdsrEnvelope§lfo_state: Lfo§delay_line: DelayLine§reverb: Reverb§chorus: Chorus§compressor: Compressor§last_peak: f32§last_rms: f32Implementations§
Source§impl AudioNode
impl AudioNode
pub fn new(id: NodeId, node_type: AudioNodeType) -> Self
Sourcepub fn initialize(&mut self)
pub fn initialize(&mut self)
Initialize node state from its type parameters.
Sourcepub fn process(&mut self, inputs: &[&AudioBuffer]) -> AudioBuffer
pub fn process(&mut self, inputs: &[&AudioBuffer]) -> AudioBuffer
Process one buffer. inputs contains buffers from upstream nodes.
Sourcepub fn note_on(&mut self, _freq: f32, _velocity: f32)
pub fn note_on(&mut self, _freq: f32, _velocity: f32)
Note on event (triggers envelope, resets oscillator phase if desired).
pub fn note_off(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AudioNode
impl RefUnwindSafe for AudioNode
impl Send for AudioNode
impl Sync for AudioNode
impl Unpin for AudioNode
impl UnsafeUnpin for AudioNode
impl UnwindSafe for AudioNode
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