Public Member Functions | List of all members
MacroControlBroadcaster::MacroControlledParameterData Struct Reference

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...
 
ProcessorgetProcessor ()
 returns the processor that the parameter is connected to. More...
 
const ProcessorgetProcessor () 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 &parameterName_, 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...
 

Detailed Description

A simple POD object to store information about a macro controlled parameter.

Constructor & Destructor Documentation

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.

Member Function Documentation

XmlElement * exportAsXml ( )

Exports all data as xml element which can be added as ValueTreeProperty.

float getNormalizedValue ( double  normalizedSliderInput)

Returns the value of the parameter.

Parameters
normalizedSliderInputthe input from 0.0 to 1.0
Returns
the scaled and inverted (if enabled) value
int getParameter ( ) const
inline

Returns the parameter index that the parameter is controlling.

This is a Processor::SpecialParameter enum value in most cases.

String getParameterName ( ) const
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.

Parameters
getHighLimitif true, it returns the upper limit.
Processor* getProcessor ( )
inline

returns the processor that the parameter is connected to.

This may be nullptr, if the Processor was deleted.

const Processor* getProcessor ( ) const
inline

returns the processor (read only) that the parameter is connected to.

This may be nullptr, if the Processor was deleted.

NormalisableRange<double> getTotalRange ( ) const
inline

Returns the min and max values for the parameter range.

This is determined by the Controls that are connected to the parameter.

bool isInverted ( ) const
inline

Returns true if the parameter range is inverted.

bool isReadOnly ( ) const
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).

void setInverted ( bool  shouldBeInverted)
inline

Inverts the range of the parameter.

void setRangeEnd ( double  max)
inline

set the range end that is used by the macro control.

void setRangeStart ( double  min)
inline

set the range start that is used by the macro control.

void setReadOnly ( bool  shouldBeReadOnly)
inline

Sets the parameter to be read only.

By default it is activated. if not, it can change the whole macro control.

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