DISTRHO Plugin Framework
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | List of all members
ParameterRanges Struct Reference

#include <DistrhoPlugin.hpp>

Public Member Functions

 ParameterRanges () noexcept
 
 ParameterRanges (float df, float mn, 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
 
float getFixedAndNormalizedValue (const float &value) const noexcept
 
float getUnnormalizedValue (const float &value) const noexcept
 

Public Attributes

float def
 
float min
 
float max
 

Detailed Description

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.

Constructor & Destructor Documentation

ParameterRanges::ParameterRanges ( )
inlinenoexcept

Default constructor, using 0.0 as minimum, 1.0 as maximum and 0.0 as default.

ParameterRanges::ParameterRanges ( float  df,
float  mn,
float  mx 
)
inlinenoexcept

Constructor using custom values.

Member Function Documentation

void ParameterRanges::fixDefault ( )
inlinenoexcept

Fix the default value within range.

void ParameterRanges::fixValue ( float &  value) const
inlinenoexcept

Fix a value within range.

float ParameterRanges::getFixedValue ( const float &  value) const
inlinenoexcept

Get a fixed value within range.

float ParameterRanges::getNormalizedValue ( const float &  value) const
inlinenoexcept

Get a value normalized to 0.0<->1.0.

float ParameterRanges::getFixedAndNormalizedValue ( const float &  value) const
inlinenoexcept

Get a value normalized to 0.0<->1.0, fixed within range.

float ParameterRanges::getUnnormalizedValue ( const float &  value) const
inlinenoexcept

Get a proper value previously normalized to 0.0<->1.0.

Member Data Documentation

float ParameterRanges::def

Default value.

float ParameterRanges::min

Minimum value.

float ParameterRanges::max

Maximum value.


The documentation for this struct was generated from the following file: