24#include <juce_audio_processors/juce_audio_processors.h>
47 using Range = juce::NormalisableRange<float>;
59 static Range freqRange(
float min = 20.0f,
float max = 20'000.0f,
float interval = 1.0f)
61 const auto geometricMean = sqrtf(min * max);
62 const auto skew = logf(0.5) / logf((geometricMean - min) / (max - min));
63 return Range{ min, max, interval, skew };
Used to add a floating point parameter to a plugin.
Definition ParamFloat.h:45
juce::NormalisableRange< float > Range
Used to specify the parameter's range. See the JUCE docs for details.
Definition ParamFloat.h:47
Attributes attributes
The parameter's attributes, e.g. a label.
Definition ParamFloat.h:56
juce::String name
The parameter's name, displayed in the DAW's automation.
Definition ParamFloat.h:53
juce::AudioParameterFloatAttributes Attributes
Used to specify the parameter's attributes, e.g. a label. See the JUCE docs for details.
Definition ParamFloat.h:50
juce::ParameterID id
The parameter's unique ID, used to identify it in the DAW.
Definition ParamFloat.h:52
Range range
The parameter's range, including optional step size and skew factor.
Definition ParamFloat.h:54
static Range freqRange(float min=20.0f, float max=20 '000.0f, float interval=1.0f)
Returns a range with a skew factor that is suitable for logarithmic frequency sliders in audio.
Definition ParamFloat.h:59
float defaultVal
The parameter's default value.
Definition ParamFloat.h:55
auto create() const
Creates a juce::AudioParameterFloat object from the given parameters.
Definition ParamFloat.h:67