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

Public Member Functions

 MacroControlledParameterData (Processor *p, int parameter_, const String &parameterName_, NormalisableRange< double > range_, bool readOnly=true)
 MacroControlledParameterData (ModulatorSynthChain *chain, XmlElement &xml)
bool operator== (const MacroControlledParameterData &other) const
void setInverted (bool shouldBeInverted)
void setReadOnly (bool shouldBeReadOnly)
bool isReadOnly () const
bool isInverted () const
NormalisableRange< double > getTotalRange () const
double getParameterRangeLimit (bool getHighLimit) const
float getNormalizedValue (double normalizedSliderInput)
void setRangeStart (double min)
void setRangeEnd (double max)
ProcessorgetProcessor ()
const ProcessorgetProcessor () const
int getParameter () const
String getParameterName () const
XmlElement * exportAsXml ()

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.

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

Returns the parameter index that the parameter is controlling. This is a Processor::SpecialParameter enum value in most cases.

String getParameterName ( ) const

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.

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

returns the processor that the parameter is connected to. This may be nullptr, if the Processor was deleted.

const Processor* getProcessor ( ) const

returns the processor (read only) that the parameter is connected to. This may be nullptr, if the Processor was deleted.

NormalisableRange<double> getTotalRange ( ) const

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

Returns true if the parameter range is inverted.

bool isReadOnly ( ) const

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)

Inverts the range of the parameter.

void setRangeEnd ( double  max)

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

void setRangeStart ( double  min)

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

void setReadOnly ( bool  shouldBeReadOnly)

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.