pub enum ParameterScale {
Linear,
Logarithmic,
Exponential {
curve: f32,
},
Toggle,
Integer,
}Expand description
How a parameter value is scaled between normalized (0-1) and real values.
Variants§
Linear
Linear mapping (default)
real = min + normalized * (max - min)
Logarithmic
Logarithmic scaling (for frequencies, gains)
real = min * (max/min)^normalized
Requires min > 0 and max > min.
Exponential
Exponential curve with configurable shape
curve > 1.0: More resolution at low end
curve < 1.0: More resolution at high end
curve = 1.0: Linear (equivalent to Linear)
Toggle
On/off toggle (normalized < 0.5 = off, >= 0.5 = on)
Denormalizes to min (off) or max (on).
Integer
Discrete integer steps
Values are quantized to integers between min and max.
Trait Implementations§
Source§impl Clone for ParameterScale
impl Clone for ParameterScale
Source§fn clone(&self) -> ParameterScale
fn clone(&self) -> ParameterScale
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ParameterScale
impl Debug for ParameterScale
Source§impl Default for ParameterScale
impl Default for ParameterScale
Source§fn default() -> ParameterScale
fn default() -> ParameterScale
Returns the “default value” for a type. Read more
Source§impl PartialEq for ParameterScale
impl PartialEq for ParameterScale
impl Copy for ParameterScale
impl StructuralPartialEq for ParameterScale
Auto Trait Implementations§
impl Freeze for ParameterScale
impl RefUnwindSafe for ParameterScale
impl Send for ParameterScale
impl Sync for ParameterScale
impl Unpin for ParameterScale
impl UnsafeUnpin for ParameterScale
impl UnwindSafe for ParameterScale
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