All Classes Namespaces Functions Variables Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
MacroControlBroadcaster::MacroControlData Struct Reference

Public Member Functions

 MacroControlData (int index)
 MacroControlData (ModulatorSynthChain *chain, XmlElement *xml)
float getCurrentValue () const
float getDisplayValue () const
void setValue (float newValue)
bool isDanglingProcessor (int parameterIndex)
void clearDanglingProcessors ()
void removeAllParametersWithProcessor (Processor *p)
XmlElement * exportAsXml ()
bool hasParameter (Processor *p, int parameterIndex)
void addParameter (Processor *p, int parameterId, const String &parameterName, NormalisableRange< double > range, bool readOnly=true)
void removeParameter (int parameterIndex)
void removeParameter (const String &parameterName, const Processor *processor=nullptr)
MacroControlledParameterDatagetParameter (int parameterIndex)
MacroControlledParameterDatagetParameterWithProcessorAndIndex (Processor *p, int parameterIndex)
MacroControlledParameterDatagetParameterWithProcessorAndName (Processor *p, const String &parameterName)
String getMacroName () const
void setMacroName (const String &name)
int getNumParameters () const
void setMidiController (int newControllerNumber)

Detailed Description

A MacroControlData object stores information about all parameters that are mapped to one macro control.

Constructor & Destructor Documentation

MacroControlData ( int  index)

Creates an empty data object.

MacroControlData ( ModulatorSynthChain chain,
XmlElement *  xml 

Creates a new data object from an XmlElement.

The chain is used to find the child processor with the given id.

Member Function Documentation

void addParameter ( Processor p,
int  parameterId,
const String &  parameterName,
NormalisableRange< double >  range,
bool  readOnly = true 

adds the parameter to the parameter list and renames the macro if it is the only parameter.

void clearDanglingProcessors ( )

Removes all parameters with deleted processors.

XmlElement * exportAsXml ( )

Exports the data as XML.

float getCurrentValue ( ) const

Returns the last value.

float getDisplayValue ( ) const

returns the display value (which takes the first mapped parameter and applies the value to its range).

String getMacroName ( ) const

Returns the macro name.

int getNumParameters ( ) const

Returns the number of mapped parameters.

MacroControlledParameterData* getParameter ( int  parameterIndex)

returns the parameter at the supplied index.

MacroControlledParameterData* getParameterWithProcessorAndIndex ( Processor p,
int  parameterIndex 

Searches the parameters for a match with the processor and index.

MacroControlledParameterData* getParameterWithProcessorAndName ( Processor p,
const String &  parameterName 

Searches the parameters for a match with the processor and parameter name.

bool hasParameter ( Processor p,
int  parameterIndex 

checks if the parameter exists.

bool isDanglingProcessor ( int  parameterIndex)

Checks if the processor of the parameter still exists.

void removeAllParametersWithProcessor ( Processor p)

Removes all parameters that control a certain processor.

void removeParameter ( int  parameterIndex)

Removes the parameter.

void removeParameter ( const String &  parameterName,
const Processor processor = nullptr 

Removes the parameter with the name.

void setMacroName ( const String &  name)

Sets the macro name that is displayed beyond the knob.

void setMidiController ( int  newControllerNumber)

sets the MidiController number that controls this macro when loaded as main chain.

void setValue ( float  newValue)

sets the value of the macro controller.

newValuethe value from 0 to 127 (the knob range).

This iterates all parameters that this controller is connected to and sets the attribute. It also saves the parameter so that other objects have access to the current value (useful if using scripting)

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