DISTRHO Plugin Framework
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() [1/2]

ParameterRanges::ParameterRanges ( )
inlinenoexcept

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

◆ ParameterRanges() [2/2]

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

Constructor using custom values.

Member Function Documentation

◆ fixDefault()

void ParameterRanges::fixDefault ( )
inlinenoexcept

Fix the default value within range.

◆ fixValue()

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

Fix a value within range.

◆ getFixedValue()

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

Get a fixed value within range.

◆ getNormalizedValue()

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

Get a value normalized to 0.0<->1.0.

◆ getFixedAndNormalizedValue()

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

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

◆ getUnnormalizedValue()

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

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

Member Data Documentation

◆ def

float ParameterRanges::def

Default value.

◆ min

float ParameterRanges::min

Minimum value.

◆ max

float ParameterRanges::max

Maximum value.


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