pub struct PedalSwitcherProcessor { /* private fields */ }Expand description
Meta-processor wrapping multiple pre-compiled individual pedals.
Delegates process() to the active pedal. Switching is instant —
just an index change, no allocation, no audio gap.
Unlike BoardSwitcherProcessor, forwards bare control labels (no prefix).
Implementations§
Trait Implementations§
Source§impl PedalProcessor for PedalSwitcherProcessor
impl PedalProcessor for PedalSwitcherProcessor
Source§fn set_sample_rate(&mut self, rate: Wave)
fn set_sample_rate(&mut self, rate: Wave)
Set sample rate (call before processing).
Source§fn set_control(&mut self, label: &str, value: Wave)
fn set_control(&mut self, label: &str, value: Wave)
Set a named control parameter (0.0-1.0). Default: no-op.
§fn set_supply_voltage(&mut self, _voltage: f64)
fn set_supply_voltage(&mut self, _voltage: f64)
Set supply voltage in volts (default 9.0).
§fn resolve_port(&self, _name: &str) -> Option<usize>
fn resolve_port(&self, _name: &str) -> Option<usize>
Resolve a port name to its index in the ports slice.
Call once at init to cache indices.
§fn port_count(&self) -> usize
fn port_count(&self) -> usize
Number of declared ports (for allocating the ports slice).
§fn process_ports(&mut self, _ports: &mut [f64])
fn process_ports(&mut self, _ports: &mut [f64])
Process one sample with named port I/O. Read more
§fn list_editable_components(&self) -> Vec<(String, &'static str, f64)>
fn list_editable_components(&self) -> Vec<(String, &'static str, f64)>
List all editable passive components (R, C, L with comp_ids).
Returns (comp_id, kind_str, current_value) for each editable leaf.
§fn set_passive(&mut self, _comp_id: &str, _value: f64) -> bool
fn set_passive(&mut self, _comp_id: &str, _value: f64) -> bool
Set a passive component’s value by comp_id. Returns true if found.
§fn reset_passive(&mut self, _comp_id: &str) -> bool
fn reset_passive(&mut self, _comp_id: &str) -> bool
Reset a passive component to its original value. Returns true if found.
Auto Trait Implementations§
impl Freeze for PedalSwitcherProcessor
impl RefUnwindSafe for PedalSwitcherProcessor
impl Send for PedalSwitcherProcessor
impl Sync for PedalSwitcherProcessor
impl Unpin for PedalSwitcherProcessor
impl UnsafeUnpin for PedalSwitcherProcessor
impl UnwindSafe for PedalSwitcherProcessor
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