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

Creates a REAPER-normalized FX parameter value.

Returns the wrapped value.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert 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 more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.