LMMS
Loading...
Searching...
No Matches
juce::AudioProcessorParameterWithID Class Reference

#include <juce_AudioProcessorParameterWithID.h>

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

Public Member Functions

 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 int getNumSteps () const
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)

Public Attributes

const String paramID
const String name
const String label
const Category category

Private Attributes

bool meta = false
bool automatable = true
bool inverted = false

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
}

Detailed Description

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

See also
AudioParameterFloat, AudioParameterInt, AudioParameterBool, AudioParameterChoice

@tags{Audio}

Constructor & Destructor 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
AudioProcessorParameterWithID(const ParameterID &parameterID, const String &parameterName, const AudioProcessorParameterWithIDAttributes &attributes={})
Definition juce_AudioProcessorParameterWithID.cpp:29
const String paramID
Definition juce_AudioProcessorParameterWithID.h:161
bool automatable
Definition juce_AudioProcessorParameterWithID.h:182
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

Member Function Documentation

◆ getCategory()

AudioProcessorParameter::Category juce::AudioProcessorParameterWithID::getCategory ( ) const
overridevirtual

Returns the parameter's category.

Reimplemented from juce::AudioProcessorParameter.

◆ getLabel()

String juce::AudioProcessorParameterWithID::getLabel ( ) const
overridevirtual

Some parameters may be able to return a label string for their units. For example "Hz" or "%".

Implements juce::AudioProcessorParameter.

◆ getName()

String juce::AudioProcessorParameterWithID::getName ( int maximumStringLength) const
overridevirtual

Returns the name to display for this parameter, which should be made to fit within the given string length.

Implements juce::AudioProcessorParameter.

◆ getParameterID()

String juce::AudioProcessorParameterWithID::getParameterID ( ) const
inlineoverridevirtual

Returns an ID that is unique to this parameter.

Parameter indices are unstable across plugin versions, which means that the parameter found at a particular index in one version of a plugin might move to a different index in the subsequent version.

Unlike the parameter index, the ID returned by this function should be somewhat stable (depending on the format of the plugin), so it is more suitable for storing/recalling automation data.

Implements juce::HostedAudioProcessorParameter.

◆ isAutomatable()

bool juce::AudioProcessorParameterWithID::isAutomatable ( ) const
inlineoverridevirtual

Returns true if the host can automate this parameter. By default, this returns true.

Reimplemented from juce::AudioProcessorParameter.

◆ isMetaParameter()

bool juce::AudioProcessorParameterWithID::isMetaParameter ( ) const
inlineoverridevirtual

Should return true if this parameter is a "meta" parameter. A meta-parameter is a parameter that changes other params. It is used by some hosts (e.g. AudioUnit hosts). By default this returns false.

Reimplemented from juce::AudioProcessorParameter.

◆ isOrientationInverted()

bool juce::AudioProcessorParameterWithID::isOrientationInverted ( ) const
inlineoverridevirtual

This can be overridden to tell the host that this parameter operates in the reverse direction. (Not all plugin formats or hosts will actually use this information).

Reimplemented from juce::AudioProcessorParameter.

Member Data Documentation

◆ automatable

bool juce::AudioProcessorParameterWithID::automatable = true
private

◆ category

const Category juce::AudioProcessorParameterWithID::category

Provides access to the parameter's category.

◆ inverted

bool juce::AudioProcessorParameterWithID::inverted = false
private

◆ label

const String juce::AudioProcessorParameterWithID::label

Provides access to the parameter's label.

◆ meta

bool juce::AudioProcessorParameterWithID::meta = false
private

◆ name

const String juce::AudioProcessorParameterWithID::name

Provides access to the parameter's name.

◆ paramID

const String juce::AudioProcessorParameterWithID::paramID

Provides access to the parameter's ID string.


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