69 const String& parameterName,
90 [[deprecated (
"Prefer the signature taking an Attributes argument")]]
92 const String& parameterName,
96 const String& parameterLabel,
105 .withStringFromValueFunction (
std::move (stringFromInt))
106 .withValueFromStringFunction (
std::move (intFromString)))
117 operator int() const noexcept {
return get(); }
138 float getValue()
const override;
139 void setValue (
float newValue)
override;
140 float getDefaultValue()
const override;
141 int getNumSteps()
const override;
142 String getText (
float,
int)
const override;
143 float getValueForText (
const String&)
const override;
147 const float defaultValue;
Properties of an AudioParameterInt.
Provides a class of AudioProcessorParameter that can be used as an integer value with a given range.
int get() const noexcept
Returns the parameter's current value as an integer.
AudioParameterInt(const ParameterID ¶meterID, const String ¶meterName, int minValue, int maxValue, int defaultValueIn, const String ¶meterLabel, std::function< String(int value, int maximumStringLength)> stringFromInt=nullptr, std::function< int(const String &text)> intFromString=nullptr)
Creates a AudioParameterInt with the specified parameters.
const NormalisableRange< float > & getNormalisableRange() const override
Returns the range of values that the parameter can take.
Range< int > getRange() const noexcept
Returns the parameter's range.
Represents a mapping between an arbitrary range of values and a normalised 0->1 range.
Combines a parameter ID and a version hint.
A general-purpose range object, that simply represents any linear range with a start and end point.
This abstract base class is used by some AudioProcessorParameter helper classes.
@ valueChanged
Indicates that the UI element's value has changed.
int roundToInt(const FloatType value) noexcept
Fast floating-point-to-integer conversion.