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.

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.