DISTRHO Plugin Framework
|
#include <DistrhoDetails.hpp>
Public Member Functions | |
constexpr | ParameterRanges () noexcept |
constexpr | ParameterRanges (const float df, const float mn, const float mx) noexcept |
void | fixDefault () noexcept |
void | fixValue (float &value) const noexcept |
float | getFixedValue (const float value) const noexcept |
float | getNormalizedValue (const float value) const noexcept |
double | getNormalizedValue (const double &value) const noexcept |
float | getFixedAndNormalizedValue (const float value) const noexcept |
double | getFixedAndNormalizedValue (const double value) const noexcept |
float | getUnnormalizedValue (const float value) const noexcept |
double | getUnnormalizedValue (const double value) const noexcept |
Public Attributes | |
float | def |
float | min |
float | max |
Parameter ranges.
This is used to set the default, minimum and maximum values of a parameter.
By default a parameter has 0.0 as minimum, 1.0 as maximum and 0.0 as default.
When changing this struct values you must ensure maximum > minimum and default is within range.
|
inlineconstexprnoexcept |
Default constructor, using 0.0 as default, 0.0 as minimum, 1.0 as maximum.
|
inlineconstexprnoexcept |
Constructor using custom values.
|
inlinenoexcept |
Fix the default value within range.
|
inlinenoexcept |
Fix a value within range.
|
inlinenoexcept |
Get a fixed value within range.
|
inlinenoexcept |
Get a value normalized to 0.0<->1.0.
|
inlinenoexcept |
Get a value normalized to 0.0<->1.0. Overloaded function using double precision values.
|
inlinenoexcept |
Get a value normalized to 0.0<->1.0, fixed within range.
|
inlinenoexcept |
Get a value normalized to 0.0<->1.0, fixed within range. Overloaded function using double precision values.
|
inlinenoexcept |
Get a proper value previously normalized to 0.0<->1.0.
|
inlinenoexcept |
Get a proper value previously normalized to 0.0<->1.0. Overloaded function using double precision values.
float ParameterRanges::def |
Default value.
float ParameterRanges::min |
Minimum value.
float ParameterRanges::max |
Maximum value.