A simple POD object to store information about a macro controlled parameter. More...
Public Member Functions | |
| XmlElement * | exportAsXml () |
| Exports all data as xml element which can be added as ValueTreeProperty. More... | |
| float | getNormalizedValue (double normalizedSliderInput) |
| Returns the value of the parameter. More... | |
| int | getParameter () const |
| Returns the parameter index that the parameter is controlling. More... | |
| String | getParameterName () const |
| Returns the parameter name. More... | |
| double | getParameterRangeLimit (bool getHighLimit) const |
| Returns the actual limit of the range. More... | |
| Processor * | getProcessor () |
| returns the processor that the parameter is connected to. More... | |
| const Processor * | getProcessor () const |
| returns the processor (read only) that the parameter is connected to. More... | |
| NormalisableRange< double > | getTotalRange () const |
| Returns the min and max values for the parameter range. More... | |
| bool | isInverted () const |
| Returns true if the parameter range is inverted. More... | |
| bool | isReadOnly () const |
| Checks if the parameter data is read only. More... | |
| MacroControlledParameterData (Processor *p, int parameter_, const String ¶meterName_, NormalisableRange< double > range_, bool readOnly=true) | |
| Creates a new Parameter data object. More... | |
| MacroControlledParameterData (ModulatorSynthChain *chain, XmlElement &xml) | |
| Restores a Parameter object from an exported XML document. More... | |
| bool | operator== (const MacroControlledParameterData &other) const |
| Allows comparison. More... | |
| void | setInverted (bool shouldBeInverted) |
| Inverts the range of the parameter. More... | |
| void | setRangeEnd (double max) |
| set the range end that is used by the macro control. More... | |
| void | setRangeStart (double min) |
| set the range start that is used by the macro control. More... | |
| void | setReadOnly (bool shouldBeReadOnly) |
| Sets the parameter to be read only. More... | |
A simple POD object to store information about a macro controlled parameter.
| MacroControlledParameterData | ( | Processor * | p, |
| int | parameter_, | ||
| const String & | parameterName_, | ||
| NormalisableRange< double > | range_, | ||
| bool | readOnly = true |
||
| ) |
Creates a new Parameter data object.
| MacroControlledParameterData | ( | ModulatorSynthChain * | chain, |
| XmlElement & | xml | ||
| ) |
Restores a Parameter object from an exported XML document.
You have to supply the ModulatorSynthChain to find the Processor with the exported ID.
| XmlElement * exportAsXml | ( | ) |
Exports all data as xml element which can be added as ValueTreeProperty.
| float getNormalizedValue | ( | double | normalizedSliderInput | ) |
Returns the value of the parameter.
| normalizedSliderInput | the input from 0.0 to 1.0 |
|
inline |
Returns the parameter index that the parameter is controlling.
This is a Processor::SpecialParameter enum value in most cases.
|
inline |
Returns the parameter name.
This is the name of the interface control (Processor parameter have no name per se).
| double getParameterRangeLimit | ( | bool | getHighLimit | ) | const |
Returns the actual limit of the range.
| getHighLimit | if true, it returns the upper limit. |
|
inline |
returns the processor that the parameter is connected to.
This may be nullptr, if the Processor was deleted.
|
inline |
returns the processor (read only) that the parameter is connected to.
This may be nullptr, if the Processor was deleted.
|
inline |
Returns the min and max values for the parameter range.
This is determined by the Controls that are connected to the parameter.
|
inline |
Returns true if the parameter range is inverted.
|
inline |
Checks if the parameter data is read only.
| bool operator== | ( | const MacroControlledParameterData & | other | ) | const |
Allows comparison.
This only compares the Processor and the parameter (not the range).
|
inline |
Inverts the range of the parameter.
|
inline |
set the range end that is used by the macro control.
|
inline |
set the range start that is used by the macro control.
|
inline |
Sets the parameter to be read only.
By default it is activated. if not, it can change the whole macro control.