Parameter

Plugin parameter. Implement the Observer pattern for UI support. Note: Recursive mutexes are needed here because getNormalized() could need locking an already taken mutex.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

addListener
void addListener(IParameterListener listener)

Adds a parameter listener.

beginParamEdit
void beginParamEdit()

Warns the host that a parameter will be edited. Should only ever be called from the UI thread.

endParamEdit
void endParamEdit()

Warns the host that a parameter has finished being edited. Should only ever be called from the UI thread.

getForHost
double getForHost()
getNormalized
double getNormalized()
getNormalizedDefault
double getNormalizedDefault()
index
int index()
isDiscrete
bool isDiscrete()
label
string label()
name
string name()
normalizedValueFromString
bool normalizedValueFromString(const(char)[] valueString, double result)
removeListener
void removeListener(IParameterListener listener)

Removes a parameter listener.

setClientReference
void setClientReference(Client client)

Parameters are owned by a client, this is used to make them refer back to it.

setFromHost
void setFromHost(double hostValue)

From a normalized double [0..1], set the parameter value.

setNormalized
void setNormalized(double hostValue)

From a normalized double, set the parameter value. No guarantee at all that getNormalized will return the same, because this value is rounded to fit.

stringFromNormalizedValue
void stringFromNormalizedValue(double normalizedValue, char* buffer, size_t len)
toStringN
void toStringN(char* buffer, size_t numBytes)

Display parameter (without label). This always adds a terminal zero within numBytes.

Meta