All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Classes | Public Member Functions | Static Public Member Functions | List of all members
MacroControlBroadcaster Class Reference
Inheritance diagram for MacroControlBroadcaster:
ModulatorSynthChain

Classes

struct  MacroControlData
 
struct  MacroControlledParameterData
 

Public Member Functions

 MacroControlBroadcaster (ModulatorSynthChain *chain)
 
void setMacroControl (int macroIndex, float newValue, NotificationType notifyEditor=dontSendNotification)
 
int getMacroControlIndexForProcessorParameter (const Processor *p, int parameter) const
 
void addControlledParameter (int macroControllerIndex, const String &processorId, int parameterId, const String &parameterName, NormalisableRange< double > range, bool readOnly=true)
 
MacroControlDatagetMacroControlData (int index)
 
const MacroControlDatagetMacroControlData (int index) const
 
void loadMacroValuesFromValueTree (const ValueTree &v)
 
void clearData (int macroIndex)
 
bool hasActiveParameters (int macroIndex)
 
void replaceMacroControlData (int index, MacroControlData *newData, ModulatorSynthChain *parentChain)
 

Static Public Member Functions

static ProcessorfindProcessor (Processor *p, const String &idToSearch)
 

Detailed Description

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.

Constructor & Destructor Documentation

Creates a new MacroControlBroadcaster with eight Macro slots.

Member Function Documentation

void addControlledParameter ( int  macroControllerIndex,
const String &  processorId,
int  parameterId,
const String &  parameterName,
NormalisableRange< double >  range,
bool  readOnly = true 
)

Adds a parameter.

Parameters
macroControllerIndexthe index from 1 to 8 where the parameter should be added.
processorIdthe 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!
parameterIdthe parameter id (use the SpecialParameters enum from the Processor)
parameterNamethe name of the control. This is supplied by the name of the widget component, but it can be useful for eg. scripted controls.
rangethe total range of the parameter.
readOnlyif the knob can be changed when assigned.
void clearData ( int  macroIndex)

Removes all parameters and resets the name.

Processor * findProcessor ( Processor p,
const String &  idToSearch 
)
static

Small helper function that iterates all child processors and returns the matching Processor with the given ID.

MacroControlData* getMacroControlData ( int  index)
inline

Returns the MacroControlData object at the supplied index.

const MacroControlData* getMacroControlData ( int  index) const
inline

Returns the MacroControlData object at the supplied index.

int getMacroControlIndexForProcessorParameter ( const Processor p,
int  parameter 
) const
inline

searches all macroControls and returns the index of the control if the supplied parameter is mapped or -1 if it is not mapped.

bool hasActiveParameters ( int  macroIndex)
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.

Parameters
indexthe index of the macro control which will be replaced
newDataa pointer to the macro control data that should replace the old data
parentChaina 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.

©2017 HISE. This documentation is autogenerated from the HISE source code using Doxygen.