pub struct ExternalInput { /* private fields */ }Available on crate feature
alloc only.Expand description
External input source - reads from an atomic value set by another thread
This module allows values from external sources (MIDI, OSC, GUI, etc.) to be brought into the patch graph in a lock-free manner.
Implementations§
Source§impl ExternalInput
impl ExternalInput
Sourcepub fn new(value: Arc<AtomicF64>, kind: SignalKind) -> Self
pub fn new(value: Arc<AtomicF64>, kind: SignalKind) -> Self
Create a new external input with the specified signal kind
Sourcepub fn cv_bipolar(value: Arc<AtomicF64>) -> Self
pub fn cv_bipolar(value: Arc<AtomicF64>) -> Self
Create for bipolar CV
Trait Implementations§
Source§impl GraphModule for ExternalInput
impl GraphModule for ExternalInput
Source§fn tick(&mut self, _inputs: &PortValues, outputs: &mut PortValues)
fn tick(&mut self, _inputs: &PortValues, outputs: &mut PortValues)
Process one sample given port values
Source§fn set_sample_rate(&mut self, _: f64)
fn set_sample_rate(&mut self, _: f64)
Set sample rate
Source§fn process_block(
&mut self,
inputs: &BlockPortValues,
outputs: &mut BlockPortValues,
frames: usize,
)
fn process_block( &mut self, inputs: &BlockPortValues, outputs: &mut BlockPortValues, frames: usize, )
Process a block of samples (optional optimization). Read more
Source§fn breaks_feedback_cycle(&self) -> bool
fn breaks_feedback_cycle(&self) -> bool
Whether this module breaks a feedback cycle in the patch graph. Read more
Source§fn serialize_state(&self) -> Option<Value>
fn serialize_state(&self) -> Option<Value>
Serialize module state (alloc feature only)
Source§fn deserialize_state(&mut self, _state: &Value) -> Result<(), String>
fn deserialize_state(&mut self, _state: &Value) -> Result<(), String>
Deserialize module state (alloc feature only)
Source§fn introspect(&self) -> Option<&dyn ModuleIntrospection>
fn introspect(&self) -> Option<&dyn ModuleIntrospection>
Downcast this module to its
ModuleIntrospection view, if it exposes one. Read moreSource§fn introspect_mut(&mut self) -> Option<&mut dyn ModuleIntrospection>
fn introspect_mut(&mut self) -> Option<&mut dyn ModuleIntrospection>
Mutable companion to
introspect, used to set internal parameters.Auto Trait Implementations§
impl Freeze for ExternalInput
impl RefUnwindSafe for ExternalInput
impl Send for ExternalInput
impl Sync for ExternalInput
impl Unpin for ExternalInput
impl UnsafeUnpin for ExternalInput
impl UnwindSafe for ExternalInput
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