pub struct BoardSwitcherProcessor { /* private fields */ }Expand description
Meta-processor wrapping multiple pre-compiled pedalboards.
Delegates process() to the active board. Switching is instant —
just an index change, no allocation, no audio gap.
Implementations§
Source§impl BoardSwitcherProcessor
impl BoardSwitcherProcessor
Sourcepub fn new(boards: Vec<PedalboardProcessor>) -> Self
pub fn new(boards: Vec<PedalboardProcessor>) -> Self
Create a new board switcher from a vec of pre-compiled pedalboards.
Trait Implementations§
Source§impl PedalProcessor for BoardSwitcherProcessor
impl PedalProcessor for BoardSwitcherProcessor
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 BoardSwitcherProcessor
impl RefUnwindSafe for BoardSwitcherProcessor
impl Send for BoardSwitcherProcessor
impl Sync for BoardSwitcherProcessor
impl Unpin for BoardSwitcherProcessor
impl UnsafeUnpin for BoardSwitcherProcessor
impl UnwindSafe for BoardSwitcherProcessor
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