pub struct VoiceControl { /* private fields */ }Expand description
Lock-free shared control handle for a single voice.
Mirrors the atomic-value pattern used by crate::io::ExternalInput: the
owner (PolyPatch, or any external driver) writes the current control
values, while the in-graph VoiceInput node reads them from inside the
voice patch on its next tick. Interior mutability (via AtomicU64 bit-
packed f64s) is what lets the same values be shared with a node that has
been moved (boxed) into a Patch.
Implementations§
Source§impl VoiceControl
impl VoiceControl
Sourcepub fn set_trigger(&self, v: f64)
pub fn set_trigger(&self, v: f64)
Set trigger request (assert 1.0 for one sample to fire a pulse).
Sourcepub fn set_velocity(&self, v: f64)
pub fn set_velocity(&self, v: f64)
Set velocity.
Trait Implementations§
Source§impl Debug for VoiceControl
impl Debug for VoiceControl
Auto Trait Implementations§
impl !Freeze for VoiceControl
impl RefUnwindSafe for VoiceControl
impl Send for VoiceControl
impl Sync for VoiceControl
impl Unpin for VoiceControl
impl UnsafeUnpin for VoiceControl
impl UnwindSafe for VoiceControl
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