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

#include <juce_AudioProcessorParameterGroup.h>

Classes

class  AudioProcessorParameterNode

Public Member Functions

 AudioProcessorParameterGroup ()
 AudioProcessorParameterGroup (String groupID, String groupName, String subgroupSeparator)
template<typename ParameterOrGroup>
 AudioProcessorParameterGroup (String groupID, String groupName, String subgroupSeparator, std::unique_ptr< ParameterOrGroup > child)
template<typename ParameterOrGroup, typename... Args>
 AudioProcessorParameterGroup (String groupID, String groupName, String subgroupSeparator, std::unique_ptr< ParameterOrGroup > firstChild, Args &&... remainingChildren)
 AudioProcessorParameterGroup (AudioProcessorParameterGroup &&)
AudioProcessorParameterGroupoperator= (AudioProcessorParameterGroup &&)
 ~AudioProcessorParameterGroup ()
String getID () const
String getName () const
String getSeparator () const
const AudioProcessorParameterGroupgetParent () const noexcept
void setName (String newName)
const AudioProcessorParameterNode *constbegin () const noexcept
const AudioProcessorParameterNode *constend () const noexcept
Array< const AudioProcessorParameterGroup * > getSubgroups (bool recursive) const
Array< AudioProcessorParameter * > getParameters (bool recursive) const
Array< const AudioProcessorParameterGroup * > getGroupsForParameter (AudioProcessorParameter *) const
template<typename ParameterOrGroup>
void addChild (std::unique_ptr< ParameterOrGroup > child)
template<typename ParameterOrGroup, typename... Args>
void addChild (std::unique_ptr< ParameterOrGroup > firstChild, Args &&... remainingChildren)
void swapWith (AudioProcessorParameterGroup &other)

Private Member Functions

void getSubgroups (Array< const AudioProcessorParameterGroup * > &, bool recursive) const
void getParameters (Array< AudioProcessorParameter * > &, bool recursive) const
const AudioProcessorParameterGroupgetGroupForParameter (AudioProcessorParameter *) const
void updateChildParentage ()
void append (std::unique_ptr< AudioProcessorParameter >)
void append (std::unique_ptr< AudioProcessorParameterGroup >)

Private Attributes

String identifier
String name
String separator
OwnedArray< AudioProcessorParameterNodechildren
AudioProcessorParameterGroupparent = nullptr

Detailed Description

A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups.

This class is predominantly write-only; there are methods for adding group members but none for removing them. Ultimately you will probably want to add a fully constructed group to an AudioProcessor.

See also
AudioProcessor::addParameterGroup

@tags{Audio}

Constructor & Destructor Documentation

◆ AudioProcessorParameterGroup() [1/5]

juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( )
default

Creates an empty AudioProcessorParameterGroup with no name or ID.

◆ AudioProcessorParameterGroup() [2/5]

juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( String groupID,
String groupName,
String subgroupSeparator )

Creates an empty AudioProcessorParameterGroup.

Parameters
groupIDA unique identifier for the group. Keep it basic; don't use any special characters like "." and avoid pure integer strings which could collide with legacy parameter IDs.
groupNameThe group's name, which will be displayed in the host.
subgroupSeparatorA separator string to use between the name of this group and the name of any subgroups if this group is flattened. AUv3 and VST3 plug-ins can have multiple layers of nested subgroups, but AU plug-ins cannot have any subgroups.

◆ AudioProcessorParameterGroup() [3/5]

template<typename ParameterOrGroup>
juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( String groupID,
String groupName,
String subgroupSeparator,
std::unique_ptr< ParameterOrGroup > child )
inline

Creates an AudioProcessorParameterGroup with a single child.

Parameters
groupIDA unique identifier for the group. Keep it basic; don't use any special characters like "." and avoid pure integer strings which could collide with legacy parameter IDs.
groupNameThe group's name, which will be displayed in the host.
subgroupSeparatorA separator string to use between the name of this group and the name of any subgroups if this group is flattened. AUv3 and VST3 plug-ins can have multiple layers of nested subgroups, but AU plug-ins cannot have any subgroups.
childAn AudioProcessorParameter or an AudioProcessorParameterGroup to add to the group.

◆ AudioProcessorParameterGroup() [4/5]

template<typename ParameterOrGroup, typename... Args>
juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( String groupID,
String groupName,
String subgroupSeparator,
std::unique_ptr< ParameterOrGroup > firstChild,
Args &&... remainingChildren )
inline

Creates an AudioProcessorParameterGroup with multiple children.

Parameters
groupIDA unique identifier for the group. Keep it basic; don't use any special characters like "." and avoid pure integer strings which could collide with legacy parameter IDs.
groupNameThe group's name, which will be displayed in the host.
subgroupSeparatorA separator string to use between the name of this group and the name of any subgroups if this group is flattened. AUv3 and VST3 plug-ins can have multiple layers of nested subgroups, but AU plug-ins cannot have any subgroups.
firstChildAn AudioProcessorParameter or an AudioProcessorParameterGroup to add to the group.
remainingChildrenA list of more AudioProcessorParameters or AudioProcessorParameterGroups to add to the group.

◆ AudioProcessorParameterGroup() [5/5]

juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( AudioProcessorParameterGroup && other)

Once a group has been added to an AudioProcessor don't try to mutate it by moving or swapping it - this will crash most hosts.

◆ ~AudioProcessorParameterGroup()

juce::AudioProcessorParameterGroup::~AudioProcessorParameterGroup ( )
default

Destructor.

Member Function Documentation

◆ addChild() [1/2]

template<typename ParameterOrGroup>
void juce::AudioProcessorParameterGroup::addChild ( std::unique_ptr< ParameterOrGroup > child)
inline

Adds a child to the group.

Do not add children to a group which has itself already been added to the AudioProcessor - the new elements will be ignored.

◆ addChild() [2/2]

template<typename ParameterOrGroup, typename... Args>
void juce::AudioProcessorParameterGroup::addChild ( std::unique_ptr< ParameterOrGroup > firstChild,
Args &&... remainingChildren )
inline

Adds multiple parameters or sub-groups to this group.

Do not add children to a group which has itself already been added to the AudioProcessor - the new elements will be ignored.

◆ append() [1/2]

void juce::AudioProcessorParameterGroup::append ( std::unique_ptr< AudioProcessorParameter > newParameter)
private

◆ append() [2/2]

void juce::AudioProcessorParameterGroup::append ( std::unique_ptr< AudioProcessorParameterGroup > newSubGroup)
private

◆ begin()

const AudioProcessorParameterGroup::AudioProcessorParameterNode *const * juce::AudioProcessorParameterGroup::begin ( ) const
noexcept

◆ end()

const AudioProcessorParameterGroup::AudioProcessorParameterNode *const * juce::AudioProcessorParameterGroup::end ( ) const
noexcept

◆ getGroupForParameter()

const AudioProcessorParameterGroup * juce::AudioProcessorParameterGroup::getGroupForParameter ( AudioProcessorParameter * parameter) const
private

◆ getGroupsForParameter()

Array< const AudioProcessorParameterGroup * > juce::AudioProcessorParameterGroup::getGroupsForParameter ( AudioProcessorParameter * parameter) const

Searches this group recursively for a parameter and returns a depth ordered list of the groups it belongs to.

◆ getID()

String juce::AudioProcessorParameterGroup::getID ( ) const

Returns the group's ID.

◆ getName()

String juce::AudioProcessorParameterGroup::getName ( ) const

Returns the group's name.

◆ getParameters() [1/2]

void juce::AudioProcessorParameterGroup::getParameters ( Array< AudioProcessorParameter * > & previousParameters,
bool recursive ) const
private

◆ getParameters() [2/2]

Array< AudioProcessorParameter * > juce::AudioProcessorParameterGroup::getParameters ( bool recursive) const

Returns all the parameters in this group.

Parameters
recursiveIf this is true then this method will fetch all nested parameters using a depth first search.

◆ getParent()

const AudioProcessorParameterGroup * juce::AudioProcessorParameterGroup::getParent ( ) const
noexcept

Returns the parent of the group, or nullptr if this is a top-level group.

◆ getSeparator()

String juce::AudioProcessorParameterGroup::getSeparator ( ) const

Returns the group's separator string.

◆ getSubgroups() [1/2]

void juce::AudioProcessorParameterGroup::getSubgroups ( Array< const AudioProcessorParameterGroup * > & previousGroups,
bool recursive ) const
private

◆ getSubgroups() [2/2]

Array< const AudioProcessorParameterGroup * > juce::AudioProcessorParameterGroup::getSubgroups ( bool recursive) const

Returns all subgroups of this group.

Parameters
recursiveIf this is true then this method will fetch all nested subgroups using a depth first search.

◆ operator=()

AudioProcessorParameterGroup & juce::AudioProcessorParameterGroup::operator= ( AudioProcessorParameterGroup && other)

Once a group has been added to an AudioProcessor don't try to mutate it by moving or swapping it - this will crash most hosts.

◆ setName()

void juce::AudioProcessorParameterGroup::setName ( String newName)

Changes the name of the group. If you do this after the group has been added to an AudioProcessor, call updateHostDisplay() to inform the host of the change. Not all hosts support dynamic group name changes.

◆ swapWith()

void juce::AudioProcessorParameterGroup::swapWith ( AudioProcessorParameterGroup & other)
inline

◆ updateChildParentage()

void juce::AudioProcessorParameterGroup::updateChildParentage ( )
private

Member Data Documentation

◆ children

OwnedArray<AudioProcessorParameterNode> juce::AudioProcessorParameterGroup::children
private

◆ identifier

String juce::AudioProcessorParameterGroup::identifier
private

◆ name

String juce::AudioProcessorParameterGroup::name
private

◆ parent

AudioProcessorParameterGroup* juce::AudioProcessorParameterGroup::parent = nullptr
private

◆ separator

String juce::AudioProcessorParameterGroup::separator
private

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