|
| | Parameter (const ParameterID ¶meterID, const String ¶meterName, NormalisableRange< float > valueRange, float defaultValue, const AudioProcessorValueTreeStateParameterAttributes &attributes={}) |
| | Parameter (const ParameterID ¶meterID, const String ¶meterName, const String &labelText, NormalisableRange< float > valueRange, float defaultParameterValue, std::function< String(float)> valueToTextFunction, std::function< float(const String &)> textToValueFunction, bool isMetaParameter=false, bool isAutomatableParameter=true, bool isDiscrete=false, AudioProcessorParameter::Category parameterCategory=AudioProcessorParameter::genericParameter, bool isBoolean=false) |
| float | getDefaultValue () const override |
| int | getNumSteps () const override |
| bool | isDiscrete () const override |
| bool | isBoolean () const override |
| | AudioParameterFloat (const ParameterID ¶meterID, const String ¶meterName, NormalisableRange< float > normalisableRange, float defaultValue, const AudioParameterFloatAttributes &attributes={}) |
| | AudioParameterFloat (const ParameterID ¶meterID, const String ¶meterName, NormalisableRange< float > normalisableRange, float defaultValue, const String ¶meterLabel, Category parameterCategory=AudioProcessorParameter::genericParameter, std::function< String(float value, int maximumStringLength)> stringFromValue=nullptr, std::function< float(const String &text)> valueFromString=nullptr) |
| | AudioParameterFloat (const ParameterID ¶meterID, const String ¶meterName, float minValue, float maxValue, float defaultValue) |
| | ~AudioParameterFloat () override |
| float | get () const noexcept |
| | operator float () const noexcept |
| AudioParameterFloat & | operator= (float newValue) |
| const NormalisableRange< float > & | getNormalisableRange () const override |
| int | getNumSteps () const override |
| float | convertTo0to1 (float v) const noexcept |
| float | convertFrom0to1 (float v) const noexcept |
| | AudioProcessorParameterWithID (const ParameterID ¶meterID, const String ¶meterName, const AudioProcessorParameterWithIDAttributes &attributes={}) |
| | AudioProcessorParameterWithID (const ParameterID ¶meterID, const String ¶meterName, const String ¶meterLabel, Category parameterCategory=AudioProcessorParameter::genericParameter) |
| | AudioProcessorParameterWithID (const ParameterID ¶meterID, const String ¶meterName, const AudioProcessorParameterWithIDAttributes &attributes={}) |
| | AudioProcessorParameterWithID (const ParameterID ¶meterID, const String ¶meterName, const String ¶meterLabel, Category parameterCategory=AudioProcessorParameter::genericParameter) |
| String | getName (int) const override |
| String | getLabel () const override |
| Category | getCategory () const override |
| String | getParameterID () const override |
| bool | isMetaParameter () const override |
| bool | isAutomatable () const override |
| bool | isOrientationInverted () const override |
| | AudioProcessorParameter () noexcept=default |
| | AudioProcessorParameter (int versionHint) |
| | AudioProcessorParameter () noexcept=default |
| | AudioProcessorParameter (int versionHint) |
| virtual | ~AudioProcessorParameter () |
| void | setValueNotifyingHost (float newValue) |
| void | beginChangeGesture () |
| void | endChangeGesture () |
| int | getParameterIndex () const noexcept |
| virtual String | getCurrentValueAsText () const |
| virtual StringArray | getAllValueStrings () const |
| int | getVersionHint () const |
| void | addListener (Listener *newListener) |
| void | removeListener (Listener *listener) |
| void | sendValueChangedMessageToListeners (float newValue) |
A parameter class that maintains backwards compatibility with deprecated AudioProcessorValueTreeState functionality.
Previous calls to
RangedAudioParameter * createAndAddParameter(const String ¶meterID, const String ¶meterName, const String &labelText, NormalisableRange< float > valueRange, float defaultValue, std::function< String(float)> valueToTextFunction, std::function< float(const String &)> textToValueFunction, bool isMetaParameter=false, bool isAutomatableParameter=true, bool isDiscrete=false, AudioProcessorParameter::Category parameterCategory=AudioProcessorParameter::genericParameter, bool isBoolean=false)
Definition juce_AudioProcessorValueTreeState.cpp:279
can be replaced with
Definition juce_AudioProcessorValueTreeState.h:453
Parameter(const ParameterID ¶meterID, const String ¶meterName, NormalisableRange< float > valueRange, float defaultValue, const AudioProcessorValueTreeStateParameterAttributes &attributes={})
Definition juce_AudioProcessorValueTreeState.cpp:31
However, a much better approach is to use the AudioProcessorValueTreeState constructor directly
YourAudioProcessor()
: apvts (*this, &
undoManager,
"PARAMETERS", { std::make_unique<Parameter> (paramID1, paramName1, ...),
std::make_unique<Parameter> (paramID2, paramName2, ...),
... })
UndoManager *const undoManager
Definition juce_AudioProcessorValueTreeState.h:417
| int juce::AudioProcessorValueTreeState::Parameter::getNumSteps |
( |
| ) |
const |
|
overridevirtual |
Returns the number of steps that this parameter's range should be quantised into.
If you want a continuous range of values, don't override this method, and allow the default implementation to return AudioProcessor::getDefaultNumParameterSteps().
If your parameter is boolean, then you may want to make this return 2.
The value that is returned may or may not be used, depending on the host. If you want the host to display stepped automation values, rather than a continuous interpolation between successive values, you should override isDiscrete to return true.
- See also
- isDiscrete
Reimplemented from juce::AudioParameterFloat.
| bool juce::AudioProcessorValueTreeState::Parameter::isBoolean |
( |
| ) |
const |
|
overridevirtual |
Returns whether the parameter represents a boolean switch, typically with "On" and "Off" states.
This information may or may not be used, depending on the host. If you want the host to display a switch, rather than a two item dropdown menu, override this method to return true. You also need to override isDiscrete() to return true and getNumSteps() to return 2.
- See also
- isDiscrete getNumSteps
Reimplemented from juce::AudioProcessorParameter.
| bool juce::AudioProcessorValueTreeState::Parameter::isDiscrete |
( |
| ) |
const |
|
overridevirtual |
Returns whether the parameter uses discrete values, based on the result of getNumSteps, or allows the host to select values continuously.
This information may or may not be used, depending on the host. If you want the host to display stepped automation values, rather than a continuous interpolation between successive values, override this method to return true.
- See also
- getNumSteps
Reimplemented from juce::AudioProcessorParameter.