pub struct ParamF32Handle { /* private fields */ }Expand description
A handle to get and update the value of an auto-smoothed ParamF32 from a UI.
Implementations§
Source§impl ParamF32Handle
impl ParamF32Handle
Sourcepub fn normalized(&self) -> f32
pub fn normalized(&self) -> f32
The normalized value in the range [0.0, 1.0].
Sourcepub fn value(&self) -> f32
pub fn value(&self) -> f32
The (un-normalized) value of this parameter.
Please note that this is calculated from the shared normalized value every time, so avoid calling this every frame if you can.
Sourcepub fn set_normalized(&self, normalized: f32)
pub fn set_normalized(&self, normalized: f32)
Set the normalized value of this parameter in the range [0.0, 1.0].
Please note that this will NOT automatically notify the host of the value change if you are using this inside a plugin spec such as VST. It is intended for you use your own method for achieving this.
Sourcepub fn set_value(&self, value: f32)
pub fn set_value(&self, value: f32)
Set the (un-normalized) value of this parameter.
Please note that this will NOT automatically notify the host of the value change if you are using this inside a plugin spec such as VST. It is intended for you use your own method for achieving this.
Sourcepub fn gradient(&self) -> Gradient
pub fn gradient(&self) -> Gradient
The Gradient mapping used when converting from the normalized value
in the range [0.0, 1.0] to the desired value.
Sourcepub fn unit(&self) -> Unit
pub fn unit(&self) -> Unit
The Unit that signifies how the value displayed to the end user should
differ from the actual value used in DSP.
Sourcepub fn value_to_normalized(&self, value: f32) -> f32
pub fn value_to_normalized(&self, value: f32) -> f32
Convert the given value to the corresponding normalized range [0.0, 1.0]
of this parameter.
Sourcepub fn normalized_to_value(&self, normalized: f32) -> f32
pub fn normalized_to_value(&self, normalized: f32) -> f32
Convert the given normalized value in the range [0.0, 1.0] into the
corresponding value of this parameter.
Get the shared normalized float value.
This can be useful to integrate with various plugin APIs.