JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::RangedAudioParameterAttributes< Derived, Value > Class Template Reference

#include <juce_RangedAudioParameter.h>

Inheritance diagram for juce::RangedAudioParameterAttributes< Derived, Value >:
Collaboration diagram for juce::RangedAudioParameterAttributes< Derived, Value >:

Public Types

using Category = AudioProcessorParameter::Category
 
using StringFromValue = std::function< String(Value, int)>
 
using ValueFromString = std::function< Value(const String &)>
 

Public Member Functions

const JUCE_NODISCARD auto & getAudioProcessorParameterWithIDAttributes () const
 Gets attributes that would also apply to an AudioProcessorParameterWithID. More...
 
const JUCE_NODISCARD auto & getStringFromValueFunction () const
 An optional lambda function that converts a non-normalised value to a string with a maximum length. More...
 
const JUCE_NODISCARD auto & getValueFromStringFunction () const
 An optional lambda function that parses a string and converts it into a non-normalised value. More...
 
JUCE_NODISCARD auto withAutomatable (bool x) const
 See AudioProcessorParameter::isAutomatable() More...
 
JUCE_NODISCARD auto withCategory (Category x) const
 See AudioProcessorParameterWithIDAttributes::withCategory() More...
 
JUCE_NODISCARD auto withInverted (bool x) const
 See AudioProcessorParameter::isOrientationInverted() More...
 
JUCE_NODISCARD auto withLabel (String x) const
 See AudioProcessorParameterWithIDAttributes::withLabel() More...
 
JUCE_NODISCARD auto withMeta (bool x) const
 See AudioProcessorParameter::isMetaParameter() More...
 
JUCE_NODISCARD auto withStringFromValueFunction (StringFromValue x) const
 An optional lambda function that converts a non-normalised value to a string with a maximum length. More...
 
JUCE_NODISCARD auto withValueFromStringFunction (ValueFromString x) const
 An optional lambda function that parses a string and converts it into a non-normalised value. More...
 

Private Types

using This = RangedAudioParameterAttributes
 

Private Member Functions

auto & asDerived () const
 

Private Attributes

AudioProcessorParameterWithIDAttributes attributes
 
StringFromValue stringFromValue
 
ValueFromString valueFromString
 

Detailed Description

template<typename Derived, typename Value>
class juce::RangedAudioParameterAttributes< Derived, Value >

Holds common attributes of audio parameters.

CRTP is used here because we want the Attributes types for each parameter (Float, Bool, Choice, Int) to be distinct and extensible in the future. i.e. the identifiers AudioParameterFloatAttributes and RangedAudioParameterAttributes<float> should not be interchangable because we might need to add float-specific attributes in the future. Users should not refer directly to RangedAudioParameterAttributes.

Member Typedef Documentation

◆ Category

template<typename Derived , typename Value >
using juce::RangedAudioParameterAttributes< Derived, Value >::Category = AudioProcessorParameter::Category

◆ StringFromValue

template<typename Derived , typename Value >
using juce::RangedAudioParameterAttributes< Derived, Value >::StringFromValue = std::function<String (Value, int)>

◆ This

template<typename Derived , typename Value >
using juce::RangedAudioParameterAttributes< Derived, Value >::This = RangedAudioParameterAttributes
private

◆ ValueFromString

template<typename Derived , typename Value >
using juce::RangedAudioParameterAttributes< Derived, Value >::ValueFromString = std::function<Value (const String&)>

Member Function Documentation

◆ asDerived()

◆ getAudioProcessorParameterWithIDAttributes()

template<typename Derived , typename Value >
const JUCE_NODISCARD auto& juce::RangedAudioParameterAttributes< Derived, Value >::getAudioProcessorParameterWithIDAttributes ( ) const
inline

Gets attributes that would also apply to an AudioProcessorParameterWithID.

◆ getStringFromValueFunction()

template<typename Derived , typename Value >
const JUCE_NODISCARD auto& juce::RangedAudioParameterAttributes< Derived, Value >::getStringFromValueFunction ( ) const
inline

An optional lambda function that converts a non-normalised value to a string with a maximum length.

This may be used by hosts to display the parameter's value.

◆ getValueFromStringFunction()

template<typename Derived , typename Value >
const JUCE_NODISCARD auto& juce::RangedAudioParameterAttributes< Derived, Value >::getValueFromStringFunction ( ) const
inline

An optional lambda function that parses a string and converts it into a non-normalised value.

Some hosts use this to allow users to type in parameter values.

◆ withAutomatable()

template<typename Derived , typename Value >
JUCE_NODISCARD auto juce::RangedAudioParameterAttributes< Derived, Value >::withAutomatable ( bool  x) const
inline

◆ withCategory()

◆ withInverted()

template<typename Derived , typename Value >
JUCE_NODISCARD auto juce::RangedAudioParameterAttributes< Derived, Value >::withInverted ( bool  x) const
inline

◆ withLabel()

◆ withMeta()

template<typename Derived , typename Value >
JUCE_NODISCARD auto juce::RangedAudioParameterAttributes< Derived, Value >::withMeta ( bool  x) const
inline

◆ withStringFromValueFunction()

template<typename Derived , typename Value >
JUCE_NODISCARD auto juce::RangedAudioParameterAttributes< Derived, Value >::withStringFromValueFunction ( StringFromValue  x) const
inline

An optional lambda function that converts a non-normalised value to a string with a maximum length.

This may be used by hosts to display the parameter's value.

Referenced by juce::AudioProcessorValueTreeStateParameterAttributes::withStringFromValueFunction().

◆ withValueFromStringFunction()

template<typename Derived , typename Value >
JUCE_NODISCARD auto juce::RangedAudioParameterAttributes< Derived, Value >::withValueFromStringFunction ( ValueFromString  x) const
inline

An optional lambda function that parses a string and converts it into a non-normalised value.

Some hosts use this to allow users to type in parameter values.

Referenced by juce::AudioProcessorValueTreeStateParameterAttributes::withValueFromStringFunction().

Member Data Documentation

◆ attributes

◆ stringFromValue

◆ valueFromString


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