LMMS
Loading...
Searching...
No Matches
juce::RangedAudioParameter Class Referenceabstract

#include <juce_RangedAudioParameter.h>

Inheritance diagram for juce::RangedAudioParameter:
juce::AudioProcessorParameterWithID juce::HostedAudioProcessorParameter juce::AudioProcessorParameter juce::AudioParameterBool juce::AudioParameterChoice juce::AudioParameterFloat juce::AudioParameterInt juce::AudioProcessorValueTreeState::Parameter

Public Member Functions

virtual const NormalisableRange< float > & getNormalisableRange () const =0
int getNumSteps () const override
float convertTo0to1 (float v) const noexcept
float convertFrom0to1 (float v) const noexcept
 AudioProcessorParameterWithID (const ParameterID &parameterID, const String &parameterName, const AudioProcessorParameterWithIDAttributes &attributes={})
 AudioProcessorParameterWithID (const ParameterID &parameterID, const String &parameterName, const String &parameterLabel, Category parameterCategory=AudioProcessorParameter::genericParameter)
Public Member Functions inherited from juce::AudioProcessorParameterWithID
 AudioProcessorParameterWithID (const ParameterID &parameterID, const String &parameterName, const AudioProcessorParameterWithIDAttributes &attributes={})
 AudioProcessorParameterWithID (const ParameterID &parameterID, const String &parameterName, const String &parameterLabel, 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
Public Member Functions inherited from juce::HostedAudioProcessorParameter
 AudioProcessorParameter () noexcept=default
 AudioProcessorParameter (int versionHint)
Public Member Functions inherited from juce::AudioProcessorParameter
 AudioProcessorParameter () noexcept=default
 AudioProcessorParameter (int versionHint)
virtual ~AudioProcessorParameter ()
virtual float getValue () const =0
virtual void setValue (float newValue)=0
void setValueNotifyingHost (float newValue)
void beginChangeGesture ()
void endChangeGesture ()
virtual float getDefaultValue () const =0
virtual bool isDiscrete () const
virtual bool isBoolean () const
virtual String getText (float normalisedValue, int) const
virtual float getValueForText (const String &text) const =0
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)

Additional Inherited Members

Public Types inherited from juce::AudioProcessorParameter
enum  Category {
  genericParameter = (0 << 16) | 0 , inputGain = (1 << 16) | 0 , outputGain = (1 << 16) | 1 , inputMeter = (2 << 16) | 0 ,
  outputMeter = (2 << 16) | 1 , compressorLimiterGainReductionMeter = (2 << 16) | 2 , expanderGateGainReductionMeter = (2 << 16) | 3 , analysisMeter = (2 << 16) | 4 ,
  otherMeter = (2 << 16) | 5
}
Public Attributes inherited from juce::AudioProcessorParameterWithID
const String paramID
const String name
const String label
const Category category

Detailed Description

This abstract base class is used by some AudioProcessorParameter helper classes.

See also
AudioParameterFloat, AudioParameterInt, AudioParameterBool, AudioParameterChoice

@tags{Audio}

Member Function Documentation

◆ AudioProcessorParameterWithID() [1/2]

juce::AudioProcessorParameterWithID::AudioProcessorParameterWithID ( const ParameterID & parameterID,
const String & parameterName,
const AudioProcessorParameterWithIDAttributes & attributes = {} )

The creation of this object requires providing a name and ID which will be constant for its lifetime.

Given that AudioProcessorParameterWithID is abstract, you'll probably call this constructor from a derived class constructor, e.g.

MyParameterType (String paramID, String name, String label, bool automatable)
.withAutomatable (automatable))
{
}
Definition juce_AudioProcessorParameterWithID.h:67
const String label
Definition juce_AudioProcessorParameterWithID.h:167
const String name
Definition juce_AudioProcessorParameterWithID.h:164
const String paramID
Definition juce_AudioProcessorParameterWithID.h:161
bool automatable
Definition juce_AudioProcessorParameterWithID.h:182
AudioProcessorParameterWithID(const ParameterID &parameterID, const String &parameterName, const AudioProcessorParameterWithIDAttributes &attributes={})
Definition juce_AudioProcessorParameterWithID.cpp:29
Definition juce_String.h:53
Parameters
parameterIDSpecifies the identifier, and optionally the parameter's version hint.
parameterNameThe user-facing parameter name.
AttributesOther parameter properties.

◆ AudioProcessorParameterWithID() [2/2]

juce::AudioProcessorParameterWithID::AudioProcessorParameterWithID ( const ParameterID & parameterID,
const String & parameterName,
const String & parameterLabel,
Category parameterCategory = AudioProcessorParameter::genericParameter )
inline

The creation of this object requires providing a name and ID which will be constant for its lifetime.

Parameters
parameterIDUsed to uniquely identify the parameter
parameterNameThe user-facing name of the parameter
parameterLabelAn optional label for the parameter's value
parameterCategoryThe semantics of this parameter

◆ convertFrom0to1()

float juce::RangedAudioParameter::convertFrom0to1 ( float v) const
noexcept

Denormalises and snaps a value based on the normalisable range.

◆ convertTo0to1()

float juce::RangedAudioParameter::convertTo0to1 ( float v) const
noexcept

Normalises and snaps a value based on the normalisable range.

◆ getNormalisableRange()

virtual const NormalisableRange< float > & juce::RangedAudioParameter::getNormalisableRange ( ) const
pure virtual

Returns the range of values that the parameter can take.

Implemented in juce::AudioParameterBool, juce::AudioParameterChoice, juce::AudioParameterFloat, and juce::AudioParameterInt.

◆ getNumSteps()

int juce::RangedAudioParameter::getNumSteps ( ) const
overridevirtual

Returns the number of steps for this parameter based on the normalisable range's interval. If you are using lambda functions to define the normalisable range's snapping behaviour then you should override this function so that it returns the number of snapping points.

Reimplemented from juce::AudioProcessorParameter.


The documentation for this class was generated from the following files: