pub struct ParamHandle {
pub value: Arc<AtomicF64>,
pub map: ParamMap,
}Expand description
A live control: the atomic the audio thread reads, plus the knob mapping.
Fields§
§value: Arc<AtomicF64>Shared with the running patch — writing it changes the sound on the next sample, no recompilation.
map: ParamMapNormalized-to-volts mapping.
Implementations§
Source§impl ParamHandle
impl ParamHandle
Sourcepub fn set_normalized(&self, x: f64)
pub fn set_normalized(&self, x: f64)
Write a knob value in the site’s own units — 0..1 for a continuous
knob, a category index for the two live categorical sites (see
ParamMap::clamp_input, which is why this is no longer a bare
clamp(0.0, 1.0)).
Trait Implementations§
Source§impl Clone for ParamHandle
impl Clone for ParamHandle
Source§fn clone(&self) -> ParamHandle
fn clone(&self) -> ParamHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ParamHandle
impl RefUnwindSafe for ParamHandle
impl Send for ParamHandle
impl Sync for ParamHandle
impl Unpin for ParamHandle
impl UnsafeUnpin for ParamHandle
impl UnwindSafe for ParamHandle
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