A subclass of RangedAudioParameter that can act as an alias for another audio parameter, used in the parameter routing system.
More...
#include <GenericParameter.h>
A subclass of RangedAudioParameter that can act as an alias for another audio parameter, used in the parameter routing system.
GenericParameter is an external or DAW-facing parameter that can be linked with any RangedAudioParameter using its link() function. Once linked, the GenericParameter will take on the name, value, range, etc. from the linked parameter and send this info to the host.
- See also
- KParameter
◆ GenericParameter()
| krotos::GenericParameter::GenericParameter |
( |
const String & | paramID, |
|
|
const String & | paramName, |
|
|
int | idx ) |
Constructor.
- Parameters
-
| paramID | A unique parameter ID. |
| paramName | The display name of the parameter when it is not attached to a KParmaeter. |
◆ getDefaultValue()
| float krotos::GenericParameter::getDefaultValue |
( |
| ) |
const |
|
override |
◆ getIndex()
| int krotos::GenericParameter::getIndex |
( |
| ) |
const |
◆ getLabel()
| String krotos::GenericParameter::getLabel |
( |
| ) |
const |
|
override |
◆ getName()
| String krotos::GenericParameter::getName |
( |
int | maximumStringLength | ) |
const |
|
override |
◆ getNormalisableRange()
| const NormalisableRange< float > & krotos::GenericParameter::getNormalisableRange |
( |
| ) |
const |
|
override |
◆ getText()
| String krotos::GenericParameter::getText |
( |
float | normalisedValue, |
|
|
int | maximumStringLength ) const |
|
override |
◆ getValue()
| float krotos::GenericParameter::getValue |
( |
| ) |
const |
|
override |
Get the current normalised value.
◆ getValueForText()
| float krotos::GenericParameter::getValueForText |
( |
const String & | text | ) |
const |
|
override |
◆ isLinked()
| bool krotos::GenericParameter::isLinked |
( |
| ) |
|
Checks if this parameter is currently linked to a RangedAudioParameter.
◆ isMetaParameter()
| bool krotos::GenericParameter::isMetaParameter |
( |
| ) |
const |
|
override |
◆ link()
| void krotos::GenericParameter::link |
( |
RangedAudioParameter * | paramToAttach | ) |
|
Links this parameter to a RangedAudioParameter, updating the name, range, etc. to that of the newly attached parameter, and begins propagating changes to and from the KParameter.
If this GenericParameter instance is already attached to another KParameter, this function will terminate the old connection before attaching the new KParameter.
◆ setValue()
| void krotos::GenericParameter::setValue |
( |
float | newValue | ) |
|
|
override |
Set the normalised value. Don't call this directly, use setValueNotifyingHost() instead.
◆ unlink()
| void krotos::GenericParameter::unlink |
( |
| ) |
|
Unlinks this object from its currently linked parameter.
◆ m_currentParameter
| RangedAudioParameter* krotos::GenericParameter::m_currentParameter {nullptr} |
|
private |
◆ m_idx
| const int krotos::GenericParameter::m_idx |
|
private |
◆ m_normalisedValue
| std::atomic<float> krotos::GenericParameter::m_normalisedValue |
|
private |
◆ m_range
| const NormalisableRange<float> krotos::GenericParameter::m_range {0.0f, 1.0f} |
|
private |
The documentation for this class was generated from the following files: