![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_IParameter.h>
The base interface for all normalizable plug-in parameters.
This class is an outside interface for an arbitrarily typed parameter. The subclasses of this generic interface hold the parameter's state and conversion functionality.
Public Member Functions | |
virtual | ~AAX_IParameter () |
Virtual destructor. More... | |
virtual AAX_IParameterValue * | CloneValue () const =0 |
Clone the parameter's value to a new AAX_IParameterValue object. More... | |
Identification methods | |
virtual AAX_CParamID | Identifier () const =0 |
Returns the parameter's unique identifier. More... | |
virtual void | SetName (const AAX_CString &name)=0 |
Sets the parameter's display name. More... | |
virtual const AAX_CString & | Name () const =0 |
Returns the parameter's display name. More... | |
virtual void | AddShortenedName (const AAX_CString &name)=0 |
Sets the parameter's shortened display name. More... | |
virtual const AAX_CString & | ShortenedName (int32_t iNumCharacters) const =0 |
Returns the parameter's shortened display name. More... | |
virtual void | ClearShortenedNames ()=0 |
Clears the internal list of shortened display names. More... | |
Automation methods | |
virtual bool | Automatable () const =0 |
Returns true if the parameter is automatable, false if it is not. More... | |
virtual void | SetAutomationDelegate (AAX_IAutomationDelegate *iAutomationDelegate)=0 |
Sets the automation delegate (if one is required) More... | |
virtual void | Touch ()=0 |
Signals the automation system that a control has been touched. More... | |
virtual void | Release ()=0 |
Signals the automation system that a control has been released. More... | |
Taper methods | |
virtual void | SetNormalizedValue (double newNormalizedValue)=0 |
Sets a parameter value using it's normalized representation. More... | |
virtual double | GetNormalizedValue () const =0 |
Returns the normalized representation of the parameter's current real value. More... | |
virtual void | SetNormalizedDefaultValue (double normalizedDefault)=0 |
Sets the parameter's default value using its normalized representation. More... | |
virtual double | GetNormalizedDefaultValue () const =0 |
Returns the normalized representation of the parameter's real default value. More... | |
virtual void | SetToDefaultValue ()=0 |
Restores the state of this parameter to its default value. More... | |
virtual void | SetNumberOfSteps (uint32_t numSteps)=0 |
Sets the number of discrete steps for this parameter. More... | |
virtual uint32_t | GetNumberOfSteps () const =0 |
Returns the number of discrete steps used by the parameter. More... | |
virtual uint32_t | GetStepValue () const =0 |
Returns the current step for the current value of the parameter. More... | |
virtual double | GetNormalizedValueFromStep (uint32_t iStep) const =0 |
Returns the normalized value for a given step. More... | |
virtual uint32_t | GetStepValueFromNormalizedValue (double normalizedValue) const =0 |
Returns the step value for a normalized value of the parameter. More... | |
virtual void | SetStepValue (uint32_t iStep)=0 |
Returns the current step for the current value of the parameter. More... | |
Display methods | |
This functionality is most often used by GUIs, but can also be useful for state serialization. | |
virtual bool | GetValueString (AAX_CString *valueString) const =0 |
Serializes the parameter value into a string. More... | |
virtual bool | GetValueString (int32_t iMaxNumChars, AAX_CString *valueString) const =0 |
Serializes the parameter value into a string, size hint included. More... | |
virtual bool | GetNormalizedValueFromBool (bool value, double *normalizedValue) const =0 |
Converts a bool to a normalized parameter value. More... | |
virtual bool | GetNormalizedValueFromInt32 (int32_t value, double *normalizedValue) const =0 |
Converts an integer to a normalized parameter value. More... | |
virtual bool | GetNormalizedValueFromFloat (float value, double *normalizedValue) const =0 |
Converts a float to a normalized parameter value. More... | |
virtual bool | GetNormalizedValueFromDouble (double value, double *normalizedValue) const =0 |
Converts a double to a normalized parameter value. More... | |
virtual bool | GetNormalizedValueFromString (const AAX_CString &valueString, double *normalizedValue) const =0 |
Converts a given string to a normalized parameter value. More... | |
virtual bool | GetBoolFromNormalizedValue (double normalizedValue, bool *value) const =0 |
Converts a normalized parameter value to a bool representing the corresponding real value. More... | |
virtual bool | GetInt32FromNormalizedValue (double normalizedValue, int32_t *value) const =0 |
Converts a normalized parameter value to an integer representing the corresponding real value. More... | |
virtual bool | GetFloatFromNormalizedValue (double normalizedValue, float *value) const =0 |
Converts a normalized parameter value to a float representing the corresponding real value. More... | |
virtual bool | GetDoubleFromNormalizedValue (double normalizedValue, double *value) const =0 |
Converts a normalized parameter value to a double representing the corresponding real value. More... | |
virtual bool | GetStringFromNormalizedValue (double normalizedValue, AAX_CString &valueString) const =0 |
Converts a normalized parameter value to a string representing the corresponding real value. More... | |
virtual bool | GetStringFromNormalizedValue (double normalizedValue, int32_t iMaxNumChars, AAX_CString &valueString) const =0 |
Converts a normalized parameter value to a string representing the corresponding real, size hint included. value. More... | |
virtual bool | SetValueFromString (const AAX_CString &newValueString)=0 |
Converts a string to a real parameter value and sets the parameter to this value. More... | |
Typed accessors | |
virtual bool | GetValueAsBool (bool *value) const =0 |
Retrieves the parameter's value as a bool. More... | |
virtual bool | GetValueAsInt32 (int32_t *value) const =0 |
Retrieves the parameter's value as an int32_t. More... | |
virtual bool | GetValueAsFloat (float *value) const =0 |
Retrieves the parameter's value as a float. More... | |
virtual bool | GetValueAsDouble (double *value) const =0 |
Retrieves the parameter's value as a double. More... | |
virtual bool | GetValueAsString (AAX_IString *value) const =0 |
Retrieves the parameter's value as a string. More... | |
virtual bool | SetValueWithBool (bool value)=0 |
Sets the parameter's value as a bool. More... | |
virtual bool | SetValueWithInt32 (int32_t value)=0 |
Sets the parameter's value as an int32_t. More... | |
virtual bool | SetValueWithFloat (float value)=0 |
Sets the parameter's value as a float. More... | |
virtual bool | SetValueWithDouble (double value)=0 |
Sets the parameter's value as a double. More... | |
virtual bool | SetValueWithString (const AAX_IString &value)=0 |
Sets the parameter's value as a string. More... | |
virtual void | SetType (AAX_EParameterType iControlType)=0 |
Sets the type of this parameter. More... | |
virtual AAX_EParameterType | GetType () const =0 |
Returns the type of this parameter as an AAX_EParameterType. More... | |
virtual void | SetOrientation (AAX_EParameterOrientation iOrientation)=0 |
Sets the orientation of this parameter. More... | |
virtual AAX_EParameterOrientation | GetOrientation () const =0 |
Returns the orientation of this parameter. More... | |
virtual void | SetTaperDelegate (AAX_ITaperDelegateBase &inTaperDelegate, bool inPreserveValue)=0 |
Sets the parameter's taper delegate. More... | |
virtual void | SetDisplayDelegate (AAX_IDisplayDelegateBase &inDisplayDelegate)=0 |
Sets the parameter's display delegate. More... | |
Host interface methods | |
virtual void | UpdateNormalizedValue (double newNormalizedValue)=0 |
Sets the parameter's state given a normalized value. More... | |
|
inlinevirtual |
Virtual destructor.
|
pure virtual |
Clone the parameter's value to a new AAX_IParameterValue object.
The returned object is independent from the AAX_IParameter. For example, changing the state of the returned object will not result in a change to the original AAX_IParameter.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
Referenced by AAX_CMonolithicParameters::GenerateCoefficients().
|
pure virtual |
Returns the parameter's unique identifier.
This unique ID is used by the Parameter Manager and by outside applications to uniquely identify and target control messages. This value may not be changed after the parameter has been constructed.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
Referenced by AAX_CMonolithicParameters::AddSynchronizedParameter(), and AAX_CMonolithicParameters::GenerateCoefficients().
|
pure virtual |
Sets the parameter's display name.
This name is used for display only, it is not used for indexing or identifying the parameter This name may be changed after the parameter has been created, but display name changes may not be recognized by all AAX hosts.
[in] | name | Display name that will be assigned to the parameter |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the parameter's display name.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's shortened display name.
This name is used for display only, it is not used for indexing or identifying the parameter These names show up when the host asks for shorter length parameter names for display on Control Surfaces or other string length constrained situations.
[in] | name | Shortened display names that will be assigned to the parameter |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the parameter's shortened display name.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Clears the internal list of shortened display names.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns true if the parameter is automatable, false if it is not.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
Referenced by AAX_CMonolithicParameters::AddSynchronizedParameter().
|
pure virtual |
Sets the automation delegate (if one is required)
[in] | iAutomationDelegate | A reference to the parameter manager's automation delegate interface |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Signals the automation system that a control has been touched.
Call this method in response to GUI events that begin editing, such as a mouse down. After this method has been called you are free to call SetNormalizedValue() as much as you need, e.g. in order to respond to subsequent mouse moved events. Call Release() to free the parameter for updates from other controls.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Signals the automation system that a control has been released.
Call this method in response to GUI events that complete editing, such as a mouse up. Once this method has been called you should not call SetNormalizedValue() again until after the next call to Touch().
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets a parameter value using it's normalized representation.
For more information regarding normalized values, see Parameter Manager
[in] | newNormalizedValue | New value (normalized) to which the parameter will be set |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the normalized representation of the parameter's current real value.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's default value using its normalized representation.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the normalized representation of the parameter's real default value.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Restores the state of this parameter to its default value.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets the number of discrete steps for this parameter.
Stepped parameter values are useful for discrete parameters and for "jumping" events such as mouse wheels, page up/down, etc. The parameter's step size is used to specify the coarseness of those changes.
[in] | numSteps | The number of steps that the parameter will use |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the number of discrete steps used by the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the current step for the current value of the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the normalized value for a given step.
See SetNumberOfSteps() for more information about parameter steps.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the step value for a normalized value of the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the current step for the current value of the parameter.
See SetNumberOfSteps() for more information about parameter steps.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Serializes the parameter value into a string.
[out] | valueString | A string representing the parameter's real value |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Serializes the parameter value into a string, size hint included.
[in] | iMaxNumChars | A size hint for the size of the string being requested. Useful for control surfaces and other limited area text fields. (make sure that size of desired string also has room for null termination) |
[out] | valueString | A string representing the parameter's real value |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Converts a bool to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts an integer to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a float to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a double to a normalized parameter value.
[in] | value | A value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with value |
true | The value conversion was successful |
false | The value conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a given string to a normalized parameter value.
[in] | valueString | A string representing a possible real value for the parameter |
[out] | normalizedValue | The normalized parameter value associated with valueString |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implemented in AAX_CParameter< T >, and AAX_CStatelessParameter.
|
pure virtual |
Converts a normalized parameter value to a bool representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to bool was successful |
false | The conversion to bool was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a normalized parameter value to an integer representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to int32_t was successful |
false | The conversion to int32_t was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a normalized parameter value to a float representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to float was successful |
false | The conversion to float was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a normalized parameter value to a double representing the corresponding real value.
[in] | normalizedValue | The normalized value to convert |
[out] | value | The converted value. Set only if conversion is successful. |
true | The conversion to double was successful |
false | The conversion to double was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Converts a normalized parameter value to a string representing the corresponding real value.
[in] | normalizedValue | A normalized parameter value |
[out] | valueString | A string representing the parameter value associated with normalizedValue |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Converts a normalized parameter value to a string representing the corresponding real, size hint included. value.
[in] | normalizedValue | A normalized parameter value |
[in] | iMaxNumChars | A size hint for the size of the string being requested. Useful for control surfaces and other limited area text fields. (make sure that size of desired string also has room for null termination) |
[out] | valueString | A string representing the parameter value associated with normalizedValue |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Converts a string to a real parameter value and sets the parameter to this value.
[in] | newValueString | A string representing the parameter's new real value |
true | The string conversion was successful |
false | The string conversion was unsuccessful |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Retrieves the parameter's value as a bool.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to bool was successful |
false | The conversion to bool was unsuccessful |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Retrieves the parameter's value as an int32_t.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to int32_t was successful |
false | The conversion to int32_t was unsuccessful |
Implemented in AAX_CParameter< T >, and AAX_CStatelessParameter.
|
pure virtual |
Retrieves the parameter's value as a float.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to float was successful |
false | The conversion to float was unsuccessful |
Implemented in AAX_CParameter< T >, and AAX_CStatelessParameter.
|
pure virtual |
Retrieves the parameter's value as a double.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to double was successful |
false | The conversion to double was unsuccessful |
Implemented in AAX_CParameter< T >, and AAX_CStatelessParameter.
|
pure virtual |
Retrieves the parameter's value as a string.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion to string was successful |
false | The conversion to string was unsuccessful |
Implemented in AAX_CParameter< T >, AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's value as a bool.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from bool was successful |
false | The conversion from bool was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's value as an int32_t.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from int32_t was successful |
false | The conversion from int32_t was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's value as a float.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from float was successful |
false | The conversion from float was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's value as a double.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from double was successful |
false | The conversion from double was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's value as a string.
[out] | value | The parameter's real value. Set only if conversion is successful. |
true | The conversion from string was successful |
false | The conversion from string was unsuccessful |
Implemented in AAX_CStatelessParameter, AAX_CParameter< T >, and AAX_CParameter< T >.
|
pure virtual |
Sets the type of this parameter.
See GetType for use cases
[in] | iControlType | The parameter's new type as an AAX_EParameterType |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the type of this parameter as an AAX_EParameterType.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets the orientation of this parameter.
[in] | iOrientation | The parameter's new orientation |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Returns the orientation of this parameter.
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.
|
pure virtual |
Sets the parameter's taper delegate.
[in] | inTaperDelegate | A reference to the parameter's new taper delegate |
[in] | inPreserveValue |
Implemented in AAX_CParameter< T >, and AAX_CStatelessParameter.
|
pure virtual |
Sets the parameter's display delegate.
[in] | inDisplayDelegate | A reference to the parameter's new display delegate |
Implemented in AAX_CParameter< T >, and AAX_CStatelessParameter.
|
pure virtual |
Sets the parameter's state given a normalized value.
This is the second half of the parameter setting operation that is initiated with a call to SetValue(). Parameters should not be set directly using this method; instead, use SetValue().
[in] | newNormalizedValue | Normalized value that will be used to set the parameter's new state |
Implemented in AAX_CStatelessParameter, and AAX_CParameter< T >.