66 const String& parameterName,
83 [[deprecated (
"Prefer the signature taking an Attributes argument")]]
85 const String& parameterName,
87 const String& parameterLabel,
94 .withStringFromValueFunction (
std::move (stringFromBool))
95 .withValueFromStringFunction (
std::move (boolFromString)))
103 bool get() const noexcept {
return value >= 0.5f; }
106 operator bool() const noexcept {
return get(); }
122 float getValue()
const override;
123 void setValue (
float newValue)
override;
124 float getDefaultValue()
const override;
125 int getNumSteps()
const override;
126 bool isDiscrete()
const override;
127 bool isBoolean()
const override;
128 String getText (
float,
int)
const override;
129 float getValueForText (
const String&)
const override;
133 const float valueDefault;
Properties of an AudioParameterBool.
Provides a class of AudioProcessorParameter that can be used as a boolean value.
bool get() const noexcept
Returns the parameter's current boolean value.
AudioParameterBool(const ParameterID ¶meterID, const String ¶meterName, bool defaultValue, const String ¶meterLabel, std::function< String(bool value, int maximumStringLength)> stringFromBool=nullptr, std::function< bool(const String &text)> boolFromString=nullptr)
Creates a AudioParameterBool with the specified parameters.
const NormalisableRange< float > & getNormalisableRange() const override
Returns the range of values that the parameter can take.
Represents a mapping between an arbitrary range of values and a normalised 0->1 range.
Combines a parameter ID and a version hint.
This abstract base class is used by some AudioProcessorParameter helper classes.
@ valueChanged
Indicates that the UI element's value has changed.