pub struct ReaperNormalizedFxParamValue(_);
Expand description
This represents a particular value of an FX parameter in “REAPER-normalized” form.
Please note that this value is not always normalized in the classical sense of being in the unit interval 0.0..=1.0! Mostly it is and this is definitely the frame of reference. But there are situations where it can be > 1.0. Turns out, it can even be a negative value! The meaning depends on the particular FX.
Examples of FX parameters which can take values that are not in the unit interval:
- ReaPitch has a Wet parameter which has a “reasonable” maximum at 6 dB which corresponds to the REAPER-normalized value 1.0. But this reasonable maximum can be exceeded, in which case it can almost reach 2.0.
- TAL Flanger has a Sync Speed parameter which reports the min/max range as 0.0..=1.0 but returns values between 0.0 and 8.0. It reports the range incorrectly.
- Xfer Records LFO Tool has an envelope point control that reports a value that is slightly below zero when dragged all down. That’s probably a bug.
- Because of a bug in REAPER <= 6.12
SetParamNormalized
, it’s possible that certain JS FX parameter values end up as NaN, in Lua console displayed as “-1.#IND”. E.g. happened to JS FX “MIDI Note-On Delay” parameter “Poo”. Bug has been reported.
Justin said that 0.0..=1.0 is the normal VST parameter range but that some ReaPlugs extend that range when it’s convenient (e.g. increasing the range from the initial version of the plug-in or using values greater than 1.0 for volume when using gain etc.). He pointed out that developers should prepare for anything.
We don’t try to “fix” exotic values in medium-level API (e.g. setting negative values to zero automatically) because there might be plug-ins which assign meaning to these special values and then it would be a shame if we can’t set or get them.
Implementations
Trait Implementations
sourceimpl Clone for ReaperNormalizedFxParamValue
impl Clone for ReaperNormalizedFxParamValue
sourcefn clone(&self) -> ReaperNormalizedFxParamValue
fn clone(&self) -> ReaperNormalizedFxParamValue
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for ReaperNormalizedFxParamValue
impl Debug for ReaperNormalizedFxParamValue
sourceimpl Default for ReaperNormalizedFxParamValue
impl Default for ReaperNormalizedFxParamValue
sourcefn default() -> ReaperNormalizedFxParamValue
fn default() -> ReaperNormalizedFxParamValue
sourceimpl From<f64> for ReaperNormalizedFxParamValue
impl From<f64> for ReaperNormalizedFxParamValue
sourceimpl PartialEq<ReaperNormalizedFxParamValue> for ReaperNormalizedFxParamValue
impl PartialEq<ReaperNormalizedFxParamValue> for ReaperNormalizedFxParamValue
sourcefn eq(&self, other: &ReaperNormalizedFxParamValue) -> bool
fn eq(&self, other: &ReaperNormalizedFxParamValue) -> bool
sourceimpl PartialOrd<ReaperNormalizedFxParamValue> for ReaperNormalizedFxParamValue
impl PartialOrd<ReaperNormalizedFxParamValue> for ReaperNormalizedFxParamValue
sourcefn partial_cmp(&self, other: &ReaperNormalizedFxParamValue) -> Option<Ordering>
fn partial_cmp(&self, other: &ReaperNormalizedFxParamValue) -> Option<Ordering>
1.0.0 · sourceconst fn le(&self, other: &Rhs) -> bool
const fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ReaperNormalizedFxParamValue
impl StructuralPartialEq for ReaperNormalizedFxParamValue
Auto Trait Implementations
impl RefUnwindSafe for ReaperNormalizedFxParamValue
impl Send for ReaperNormalizedFxParamValue
impl Sync for ReaperNormalizedFxParamValue
impl Unpin for ReaperNormalizedFxParamValue
impl UnwindSafe for ReaperNormalizedFxParamValue
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more