JUCE  v5.4.1-191-g0ab5e696f
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::AudioProcessorParameterGroup Class Reference

A class encapsulating a group of AudioProcessorParameters and nested AudioProcessorParameterGroups. More...

#include <juce_AudioProcessorParameterGroup.h>

Collaboration diagram for juce::AudioProcessorParameterGroup:

Classes

class  AudioProcessorParameterNode
 A child of an AudioProcessorParameterGroup. More...
 

Public Member Functions

 AudioProcessorParameterGroup (const String &groupID, const String &groupName, const String &subgroupSeparator)
 Creates an empty AudioProcessorParameterGroup. More...
 
template<typename ChildType >
 AudioProcessorParameterGroup (const String &groupID, const String &groupName, const String &subgroupSeparator, std::unique_ptr< ChildType > child)
 Creates an AudioProcessorParameterGroup with a single child. More...
 
template<typename ChildType , typename... Args>
 AudioProcessorParameterGroup (const String &groupID, const String &groupName, const String &subgroupSeparator, std::unique_ptr< ChildType > firstChild, Args &&... remainingChildren)
 Creates an AudioProcessorParameterGroup with multiple children. More...
 
template<typename ChildType >
void addChild (std::unique_ptr< ChildType > child)
 Adds a child to the group. More...
 
template<typename ChildType , typename... Args>
void addChild (std::unique_ptr< ChildType > firstChild, Args &&... remainingChildren)
 Adds multiple children to the group. More...
 
const AudioProcessorParameterNode ** begin () const noexcept
 
const AudioProcessorParameterNode ** end () const noexcept
 
Array< const AudioProcessorParameterGroup * > getGroupsForParameter (AudioProcessorParameter *parameter) const
 Searches this group recursively for a parameter and returns a depth ordered list of the groups it belongs to. More...
 
String getID () const
 Returns the group's ID. More...
 
String getName () const
 Returns the group's name. More...
 
Array< AudioProcessorParameter * > getParameters (bool recursive) const
 Returns all the parameters in this group. More...
 
const AudioProcessorParameterGroupgetParent () const noexcept
 Returns the parent of the group, or nullptr if this is a top-levle group. More...
 
String getSeparator () const
 Returns the group's separator string. More...
 
Array< const AudioProcessorParameterGroup * > getSubgroups (bool recursive) const
 Returns all subgroups of this group. More...
 
void swapWith (AudioProcessorParameterGroup &other) noexcept
 Swaps the content of this group with another. More...
 

Private Member Functions

const AudioProcessorParameterGroupgetGroupForParameter (AudioProcessorParameter *parameter) const
 
void getParameters (Array< AudioProcessorParameter *> &previousParameters, bool recursive) const
 
void getSubgroups (Array< const AudioProcessorParameterGroup *> &previousGroups, bool recursive) const
 

Private Attributes

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

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

{Audio}

Constructor & Destructor Documentation

◆ AudioProcessorParameterGroup() [1/3]

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

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() [2/3]

template<typename ChildType >
juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( const String groupID,
const String groupName,
const String subgroupSeparator,
std::unique_ptr< ChildType >  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.

References addChild().

◆ AudioProcessorParameterGroup() [3/3]

template<typename ChildType , typename... Args>
juce::AudioProcessorParameterGroup::AudioProcessorParameterGroup ( const String groupID,
const String groupName,
const String subgroupSeparator,
std::unique_ptr< ChildType >  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.

References addChild().

Member Function Documentation

◆ addChild() [1/2]

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

Adds a child to the group.

References children.

Referenced by addChild(), and AudioProcessorParameterGroup().

◆ addChild() [2/2]

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

Adds multiple children to the group.

References addChild().

◆ begin()

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

References children.

◆ end()

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

References children.

◆ getGroupForParameter()

◆ getGroupsForParameter()

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

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

References getGroupForParameter(), juce::AudioProcessorParameterGroup::AudioProcessorParameterNode::group, and juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::insert().

◆ getID()

String juce::AudioProcessorParameterGroup::getID ( ) const
inline

Returns the group's ID.

References identifier.

◆ getName()

String juce::AudioProcessorParameterGroup::getName ( ) const
inline

Returns the group's name.

References name.

◆ getParameters() [1/2]

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

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.

◆ getParameters() [2/2]

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

◆ getParent()

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

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

References juce::AudioProcessorParameterGroup::AudioProcessorParameterNode::parent.

◆ getSeparator()

String juce::AudioProcessorParameterGroup::getSeparator ( ) const
inline

Returns the group's separator string.

References separator.

◆ getSubgroups() [1/2]

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

Returns all subgroups of this group.

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

◆ getSubgroups() [2/2]

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

◆ swapWith()

void juce::AudioProcessorParameterGroup::swapWith ( AudioProcessorParameterGroup other)
inlinenoexcept

Swaps the content of this group with another.

References children, and juce::AudioProcessorParameterGroup::AudioProcessorParameterNode::group.

Member Data Documentation

◆ children

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

◆ identifier

const String juce::AudioProcessorParameterGroup::identifier
private

Referenced by getID().

◆ name

const String juce::AudioProcessorParameterGroup::name
private

Referenced by getName().

◆ parent

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

◆ separator

const String juce::AudioProcessorParameterGroup::separator
private

Referenced by getSeparator().


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