A class that handles macro controlled parameters of its children. More...
Classes | |
struct | MacroControlData |
A MacroControlData object stores information about all parameters that are mapped to one macro control. More... | |
struct | MacroControlledParameterData |
A simple POD object to store information about a macro controlled parameter. More... | |
Public Member Functions | |
void | addControlledParameter (int macroControllerIndex, const String &processorId, int parameterId, const String ¶meterName, NormalisableRange< double > range, bool readOnly=true) |
Adds a parameter. More... | |
void | clearData (int macroIndex) |
Removes all parameters and resets the name. More... | |
MacroControlData * | getMacroControlData (int index) |
Returns the MacroControlData object at the supplied index. More... | |
const MacroControlData * | getMacroControlData (int index) const |
Returns the MacroControlData object at the supplied index. More... | |
int | getMacroControlIndexForProcessorParameter (const Processor *p, int parameter) const |
searches all macroControls and returns the index of the control if the supplied parameter is mapped or -1 if it is not mapped. More... | |
bool | hasActiveParameters (int macroIndex) |
Checks if the macro control has any parameters. More... | |
void | loadMacroValuesFromValueTree (const ValueTree &v) |
Only loads the values of the macros (and doesn't recreate the macro controls. More... | |
MacroControlBroadcaster (ModulatorSynthChain *chain) | |
Creates a new MacroControlBroadcaster with eight Macro slots. More... | |
void | replaceMacroControlData (int index, MacroControlData *newData, ModulatorSynthChain *parentChain) |
this replaces the macro control data object at the specified index with the new one. More... | |
void | setMacroControl (int macroIndex, float newValue, NotificationType notifyEditor=dontSendNotification) |
sets the macro control to the supplied value and sends a notification message if desired. More... | |
Static Public Member Functions | |
static Processor * | findProcessor (Processor *p, const String &idToSearch) |
Small helper function that iterates all child processors and returns the matching Processor with the given ID. More... | |
A class that handles macro controlled parameters of its children.
This is supposed to be a base class of ModulatorSynthChain to encapsulate all macro control handling, so you should not use this class directly.
MacroControlBroadcaster | ( | ModulatorSynthChain * | chain | ) |
Creates a new MacroControlBroadcaster with eight Macro slots.
void addControlledParameter | ( | int | macroControllerIndex, |
const String & | processorId, | ||
int | parameterId, | ||
const String & | parameterName, | ||
NormalisableRange< double > | range, | ||
bool | readOnly = true |
||
) |
Adds a parameter.
macroControllerIndex | the index from 1 to 8 where the parameter should be added. |
processorId | the unique id of the processor. If the ID is not unique, then the first processor is used, which can have undesired effects, so make sure, you rename the processor before mapping a controller! |
parameterId | the parameter id (use the SpecialParameters enum from the Processor) |
parameterName | the name of the control. This is supplied by the name of the component, but it can be useful for eg. scripted controls. |
range | the total range of the parameter. |
readOnly | if the knob can be changed when assigned. |
void clearData | ( | int | macroIndex | ) |
Removes all parameters and resets the name.
Small helper function that iterates all child processors and returns the matching Processor with the given ID.
|
inline |
Returns the MacroControlData object at the supplied index.
|
inline |
Returns the MacroControlData object at the supplied index.
|
inline |
searches all macroControls and returns the index of the control if the supplied parameter is mapped or -1 if it is not mapped.
|
inline |
Checks if the macro control has any parameters.
void loadMacroValuesFromValueTree | ( | const ValueTree & | v | ) |
Only loads the values of the macros (and doesn't recreate the macro controls.
void replaceMacroControlData | ( | int | index, |
MacroControlData * | newData, | ||
ModulatorSynthChain * | parentChain | ||
) |
this replaces the macro control data object at the specified index with the new one.
index | the index of the macro control which will be replaced |
newData | a pointer to the macro control data that should replace the old data |
parentChain | a pointer to the ModulatorSynthChain where the newData resides. This is used to get the correct Processor for the given ID. |
void setMacroControl | ( | int | macroIndex, |
float | newValue, | ||
NotificationType | notifyEditor = dontSendNotification |
||
) |
sets the macro control to the supplied value and sends a notification message if desired.