![]() |
AAX SDK
2.4.1
Avid Audio Extensions Development Kit
|
#include <AAX_CMonolithicParameters.h>
Extension of the AAX_CEffectParameters class for monolithic VIs and effects.
This extension to AAX_CEffectParameters adds some conveniences for Virtual Instrument (VI) plug-ins and for other plug-ins that use a monolithic processing object, i.e. an object that combines state data with the audio render routine in a single object.
Public Member Functions | |
AAX_CMonolithicParameters (void) | |
~AAX_CMonolithicParameters (void) AAX_OVERRIDE | |
![]() | |
AAX_CEffectParameters (void) | |
~AAX_CEffectParameters (void) AAX_OVERRIDE | |
AAX_CEffectParameters & | operator= (const AAX_CEffectParameters &other) |
AAX_Result | Initialize (IACFUnknown *iController) AAX_OVERRIDE |
Main data model initialization. Called when plug-in instance is first instantiated. More... | |
AAX_Result | Uninitialize (void) AAX_OVERRIDE |
Main data model uninitialization. More... | |
AAX_Result | NotificationReceived (AAX_CTypeID inNotificationType, const void *inNotificationData, uint32_t inNotificationDataSize) AAX_OVERRIDE |
Notification Hook. More... | |
AAX_Result | GetNumberOfParameters (int32_t *oNumControls) const AAX_OVERRIDE |
CALL: Retrieves the total number of plug-in parameters. More... | |
AAX_Result | GetMasterBypassParameter (AAX_IString *oIDString) const AAX_OVERRIDE |
CALL: Retrieves the ID of the plug-in's Master Bypass parameter. More... | |
AAX_Result | GetParameterIsAutomatable (AAX_CParamID iParameterID, AAX_CBoolean *oAutomatable) const AAX_OVERRIDE |
CALL: Retrieves information about a parameter's automatable status. More... | |
AAX_Result | GetParameterNumberOfSteps (AAX_CParamID iParameterID, int32_t *oNumSteps) const AAX_OVERRIDE |
CALL: Retrieves the number of discrete steps for a parameter. More... | |
AAX_Result | GetParameterName (AAX_CParamID iParameterID, AAX_IString *oName) const AAX_OVERRIDE |
CALL: Retrieves the full name for a parameter. More... | |
AAX_Result | GetParameterNameOfLength (AAX_CParamID iParameterID, AAX_IString *oName, int32_t iNameLength) const AAX_OVERRIDE |
CALL: Retrieves an abbreviated name for a parameter. More... | |
AAX_Result | GetParameterDefaultNormalizedValue (AAX_CParamID iParameterID, double *oValue) const AAX_OVERRIDE |
CALL: Retrieves default value of a parameter. More... | |
AAX_Result | SetParameterDefaultNormalizedValue (AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE |
CALL: Sets the default value of a parameter. More... | |
AAX_Result | GetParameterType (AAX_CParamID iParameterID, AAX_EParameterType *oParameterType) const AAX_OVERRIDE |
CALL: Retrieves the type of a parameter. More... | |
AAX_Result | GetParameterOrientation (AAX_CParamID iParameterID, AAX_EParameterOrientation *oParameterOrientation) const AAX_OVERRIDE |
CALL: Retrieves the orientation that should be applied to a parameter's controls. More... | |
AAX_Result | GetParameter (AAX_CParamID iParameterID, AAX_IParameter **oParameter) AAX_OVERRIDE |
CALL: Retrieves an arbitrary setting within a parameter. More... | |
AAX_Result | GetParameterIndex (AAX_CParamID iParameterID, int32_t *oControlIndex) const AAX_OVERRIDE |
CALL: Retrieves the index of a parameter. More... | |
AAX_Result | GetParameterIDFromIndex (int32_t iControlIndex, AAX_IString *oParameterIDString) const AAX_OVERRIDE |
CALL: Retrieves the ID of a parameter. More... | |
AAX_Result | GetParameterValueInfo (AAX_CParamID iParameterID, int32_t iSelector, int32_t *oValue) const AAX_OVERRIDE |
CALL: Retrieves a property of a parameter. More... | |
AAX_Result | GetParameterValueFromString (AAX_CParamID iParameterID, double *oValue, const AAX_IString &iValueString) const AAX_OVERRIDE |
CALL: Converts a value string to a value. More... | |
AAX_Result | GetParameterStringFromValue (AAX_CParamID iParameterID, double iValue, AAX_IString *oValueString, int32_t iMaxLength) const AAX_OVERRIDE |
CALL: Converts a normalized parameter value into a string representing its corresponding real value. More... | |
AAX_Result | GetParameterValueString (AAX_CParamID iParameterID, AAX_IString *oValueString, int32_t iMaxLength) const AAX_OVERRIDE |
CALL: Retrieves the value string associated with a parameter's current value. More... | |
AAX_Result | GetParameterNormalizedValue (AAX_CParamID iParameterID, double *oValuePtr) const AAX_OVERRIDE |
CALL: Retrieves a parameter's current value. More... | |
AAX_Result | SetParameterNormalizedValue (AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE |
CALL: Sets the specified parameter to a new value. More... | |
AAX_Result | SetParameterNormalizedRelative (AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE |
CALL: Sets the specified parameter to a new value relative to its current value. More... | |
AAX_Result | TouchParameter (AAX_CParamID iParameterID) AAX_OVERRIDE |
"Touches" (locks) a parameter in the automation system to a particular control in preparation for updates More... | |
AAX_Result | ReleaseParameter (AAX_CParamID iParameterID) AAX_OVERRIDE |
Releases a parameter from a "touched" state. More... | |
AAX_Result | UpdateParameterTouch (AAX_CParamID iParameterID, AAX_CBoolean iTouchState) AAX_OVERRIDE |
Sets a "touched" state on a parameter. More... | |
AAX_Result | UpdateParameterNormalizedRelative (AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE |
Updates a single parameter's state to its current value, as a difference with the parameter's previous value. More... | |
AAX_Result | GetNumberOfChunks (int32_t *oNumChunks) const AAX_OVERRIDE |
Retrieves the number of chunks used by this plug-in. More... | |
AAX_Result | GetChunkIDFromIndex (int32_t iIndex, AAX_CTypeID *oChunkID) const AAX_OVERRIDE |
Retrieves the ID associated with a chunk index. More... | |
AAX_Result | GetChunkSize (AAX_CTypeID iChunkID, uint32_t *oSize) const AAX_OVERRIDE |
Get the size of the data structure that can hold all of a chunk's information. More... | |
AAX_Result | GetChunk (AAX_CTypeID iChunkID, AAX_SPlugInChunk *oChunk) const AAX_OVERRIDE |
Fills a block of data with chunk information representing the plug-in's current state. More... | |
AAX_Result | SetChunk (AAX_CTypeID iChunkID, const AAX_SPlugInChunk *iChunk) AAX_OVERRIDE |
Restores a set of plug-in parameters based on chunk information. More... | |
AAX_Result | CompareActiveChunk (const AAX_SPlugInChunk *iChunkP, AAX_CBoolean *oIsEqual) const AAX_OVERRIDE |
Determine if a chunk represents settings that are equivalent to the plug-in's current state. More... | |
AAX_Result | GetNumberOfChanges (int32_t *oNumChanges) const AAX_OVERRIDE |
Retrieves the number of parameter changes made since the plug-in's creation. More... | |
AAX_Result | GetCurveData (AAX_CTypeID iCurveType, const float *iValues, uint32_t iNumValues, float *oValues) const AAX_OVERRIDE |
Generate a set of output values based on a set of given input values. More... | |
AAX_Result | GetCurveDataMeterIds (AAX_CTypeID iCurveType, uint32_t *oXMeterId, uint32_t *oYMeterId) const AAX_OVERRIDE |
Indicates which meters correspond to the X and Y axes of the EQ or Dynamics graph. More... | |
AAX_Result | GetCurveDataDisplayRange (AAX_CTypeID iCurveType, float *oXMin, float *oXMax, float *oYMin, float *oYMax) const AAX_OVERRIDE |
Determines the range of the graph shown by the plug-in. More... | |
AAX_Result | UpdatePageTable (uint32_t inTableType, int32_t inTablePageSize, IACFUnknown *iHostUnknown, IACFUnknown *ioPageTableUnknown) const AAX_OVERRIDE AAX_FINAL |
Allow the plug-in to update its page tables. More... | |
AAX_Result | GetCustomData (AAX_CTypeID iDataBlockID, uint32_t inDataSize, void *oData, uint32_t *oDataWritten) const AAX_OVERRIDE |
An optional interface hook for getting custom data from another module. More... | |
AAX_Result | SetCustomData (AAX_CTypeID iDataBlockID, uint32_t inDataSize, const void *iData) AAX_OVERRIDE |
An optional interface hook for setting custom data for use by another module. More... | |
AAX_Result | DoMIDITransfers () AAX_OVERRIDE |
MIDI update callback. More... | |
AAX_Result | UpdateMIDINodes (AAX_CFieldIndex inFieldIndex, AAX_CMidiPacket &iPacket) AAX_OVERRIDE |
MIDI update callback. More... | |
AAX_Result | UpdateControlMIDINodes (AAX_CTypeID nodeID, AAX_CMidiPacket &iPacket) AAX_OVERRIDE |
MIDI update callback for control MIDI nodes. More... | |
AAX_Result | RenderAudio_Hybrid (AAX_SHybridRenderInfo *ioRenderInfo) AAX_OVERRIDE |
Hybrid audio render function. More... | |
AAX_IController * | Controller () |
Access to the Effect controller. More... | |
const AAX_IController * | Controller () const |
const access to the Effect controller More... | |
AAX_ITransport * | Transport () |
Access to the Transport object. More... | |
const AAX_ITransport * | Transport () const |
const access to the Transport object More... | |
AAX_IAutomationDelegate * | AutomationDelegate () |
Access to the Effect's automation delegate. More... | |
const AAX_IAutomationDelegate * | AutomationDelegate () const |
const access to the Effect's automation delegate More... | |
![]() | |
ACF_DECLARE_STANDARD_UNKNOWN () ACFMETHOD(InternalQueryInterface)(const acfIID &riid | |
AAX_DELETE (AAX_IEffectParameters &operator=(const AAX_IEffectParameters &)) | |
Auxiliary UI methods | |
Auxiliary UI methods | |
Hybrid audio methods | |
MIDI methods | |
Initialization and uninitialization | |
AAX host and plug-in event notification | |
Parameter information | |
These methods are used by the AAX host to retrieve information about the plug-in's data model.
| |
Parameter setters and getters | |
These methods are used by the AAX host and by the plug-in's UI to retrieve and modify the values of the plug-in's parameters.
| |
Automated parameter helpers | |
These methods are used to lock and unlock automation system 'resources' when updating automatable parameters.
| |
Asynchronous parameter update methods | |
These methods are called by the AAX host when parameter values have been updated. They are called by the host and can be triggered by other plug-in modules via calls to AAX_IParameter's These methods are responsible for updating parameter values. Do not call these methods directly! To ensure proper synchronization and to avoid problematic dependency chains, other methods (e.g. SetParameterNormalizedValue()) and components (e.g. AAX_IEffectGUI) should always call a | |
State reset handlers | |
Chunk methods | |
These methods are used to save and restore collections of plug-in state information, known as chunks. Chunks are used by the host when saving or restoring presets and session settings and when providing "compare" functionality for plug-ins. The default implementation of these methods in AAX_CEffectParameters supports a single chunk that includes state information for all of the plug-in's registered parameters. Override all of these methods to add support for additional chunks in your plug-in, for example if your plug-in contains any persistent state that is not encapsulated by its set of registered parameters.
For reference, see also: | |
Thread methods | |
Auxiliary UI methods | |
Custom data methods | |
These functions exist as a proxiable way to move data between different modules (e.g. AAX_IEffectParameters and AAX_IEffectGUI.) Using these, the GUI can query any data through GetCustomData() with a plug-in defined
| |
MIDI methods | |
![]() | |
virtual BEGIN_ACFINTERFACE ACFRESULT ACFMETHODCALLTYPE | QueryInterface (const acfIID &iid, void **ppOut)=0 |
Returns pointers to supported interfaces. More... | |
virtual acfUInt32 ACFMETHODCALLTYPE | AddRef (void)=0 |
Increments reference count. More... | |
virtual acfUInt32 ACFMETHODCALLTYPE | Release (void)=0 |
Decrements reference count. More... | |
Protected Types | |
typedef std::pair< AAX_CParamID const, const AAX_IParameterValue * > | TParamValPair |
Protected Member Functions | |
Real-time functions | |
Virtual functions called on the real-time thread | |
virtual void | RenderAudio (AAX_SInstrumentRenderInfo *ioRenderInfo, const TParamValPair *inSynchronizedParamValues[], int32_t inNumSynchronizedParamValues) |
Configuration methods | |
void | AddSynchronizedParameter (const AAX_IParameter &inParameter) |
![]() | |
AAX_Result | SetTaperDelegate (AAX_CParamID iParameterID, AAX_ITaperDelegateBase &iTaperDelegate, bool iPreserveValue) |
AAX_Result | SetDisplayDelegate (AAX_CParamID iParameterID, AAX_IDisplayDelegateBase &iDisplayDelegate) |
bool | IsParameterTouched (AAX_CParamID iParameterID) const |
bool | IsParameterLinkReady (AAX_CParamID inParameterID, AAX_EUpdateSource inSource) const |
virtual AAX_Result | EffectInit (void) |
Initialization helper routine. Called from AAX_CEffectParameters::Initialize. More... | |
virtual AAX_Result | UpdatePageTable (uint32_t, int32_t, AAX_IPageTable &) const |
void | FilterParameterIDOnSave (AAX_CParamID controlID) |
CALL: Indicates the indices of parameters that should not be saved in the default AAX_CEffectParameters chunk. More... | |
void | BuildChunkData (void) const |
Clears out the current chunk in Chunk Parser and adds all of the new values. Used by default implementations of GetChunk() and GetChunkSize(). More... | |
Convenience Layer Methods | |
| |
AAX_Result | UpdateParameterNormalizedValue (AAX_CParamID iParamID, double aValue, AAX_EUpdateSource inSource) AAX_OVERRIDE |
Updates a single parameter's state to its current value. More... | |
AAX_Result | GenerateCoefficients () AAX_OVERRIDE |
Generates and dispatches new coefficient packets. More... | |
AAX_Result | ResetFieldData (AAX_CFieldIndex iFieldIndex, void *oData, uint32_t iDataSize) const AAX_OVERRIDE |
Called by the host to reset a private data field in the plug-in's algorithm. More... | |
AAX_Result | TimerWakeup () AAX_OVERRIDE |
Periodic wakeup callback for idle-time operations. More... | |
static AAX_Result | StaticDescribe (AAX_IEffectDescriptor *ioDescriptor, const AAX_SInstrumentSetupInfo &setupInfo) |
static void AAX_CALLBACK | StaticRenderAudio (AAX_SInstrumentRenderInfo *const inInstancesBegin[], const void *inInstancesEnd) |
Additional Inherited Members | |
![]() | |
void **ppvObjOut | override |
![]() | |
int32_t | mNumPlugInChanges |
int32_t | mChunkSize |
AAX_CChunkDataParser | mChunkParser |
int32_t | mNumChunkedParameters |
AAX_CPacketDispatcher | mPacketDispatcher |
AAX_CParameterManager | mParameterManager |
std::set< std::string > | mFilteredParameters |
|
protected |
AAX_CMonolithicParameters::AAX_CMonolithicParameters | ( | void | ) |
AAX_CMonolithicParameters::~AAX_CMonolithicParameters | ( | void | ) |
|
inlineprotectedvirtual |
Perform audio render
[in,out] | ioRenderInfo | State data for the current render buffer |
[in] | inSynchronizedParamValues | The parameter values which should be applied for the current render buffer |
[in] | inNumSynchronizedParamValues | The number of parameter values provided in inSynchronizedParamValues |
Referenced by StaticRenderAudio().
|
protected |
Add a parameter for state synchronization
A parameter should be added for synchronization if:
See Parameter update timing for more information
[in] | inParameter | The parameter to be synchronized. This string will be copied internally and is not required to persist |
References AAX_ASSERT, AAX_IParameter::Automatable(), AAX_IParameter::Identifier(), and kSynchronizedParameterQueueSize.
|
virtual |
Updates a single parameter's state to its current value.
[in] | iParameterID | The ID of the parameter that is being updated |
[in] | iValue | The parameter's current value, to which its internal state must be updated |
[in] | iSource | The source of the update |
Reimplemented from AAX_CEffectParameters.
References AAX_SUCCESS, AAX_CParameterManager::GetParameterByID(), AAX_CEffectParameters::mParameterManager, and AAX_CEffectParameters::UpdateParameterNormalizedValue().
|
virtual |
Generates and dispatches new coefficient packets.
This method is responsible for updating the coefficient packets associated with all parameters whose states have changed since the last call to GenerateCoefficients(). The host may call this method once for every parameter update, or it may "batch" parameter updates such that changes for several parameters are all handled by a single call to GenerateCoefficients().
For more information on tracking parameters' statuses using the AAX_CPacketDispatcher, helper class, see AAX_CPacketDispatcher::SetDirty().
Reimplemented from AAX_CEffectParameters.
References AAX_ASSERT, AAX_FIELD_INDEX, AAX_SUCCESS, AAX_IParameter::CloneValue(), AAX_CEffectParameters::Controller(), AAX_IContainer::eStatus_Success, AAX_CEffectParameters::GenerateCoefficients(), AAX_IParameter::Identifier(), AAX_IController::PostPacket(), and AAX_CAtomicQueue< T, S >::Push().
|
virtual |
Called by the host to reset a private data field in the plug-in's algorithm.
This method is called sequentially for all private data fields on Effect initialization and during any "reset" event, such as priming for a non-real-time render. This method is called before the algorithm's optional initialization callback, and the initialized private data will be available within that callback via its context block.
[in] | inFieldIndex | The index of the field that is being initialized |
[out] | oData | The pre-allocated block of data that should be initialized |
[in] | inDataSize | The size of the data block, in bytes |
Reimplemented from AAX_CEffectParameters.
References AAX_ASSERT, AAX_FIELD_INDEX, AAX_SUCCESS, AAX_SInstrumentPrivateData::mMonolithicParametersPtr, and AAX_CEffectParameters::ResetFieldData().
|
virtual |
Periodic wakeup callback for idle-time operations.
This method is called from the host using a non-main thread. In general, it should be driven at approximately one call per 30 ms. However, the wakeup is not guaranteed to be called at any regular interval - for example, it could be held off by a high real-time processing load - and there is no host contract regarding maximum latency between wakeup calls.
This wakeup thread runs continuously and cannot be armed/disarmed or by the plug-in.
Reimplemented from AAX_CEffectParameters.
References AAX_CEffectParameters::TimerWakeup().
|
static |
Static description callback
This method performs all of the basic context setup and pointer passing work
[in,out] | ioDescriptor | |
[in] | setupInfo |
References AAX_ASSERT, AAX_eConstraintLocationMask_DataModel, AAX_eMIDINodeType_Global, AAX_eMIDINodeType_LocalInput, AAX_eMIDINodeType_Transport, AAX_ePrivateDataOptions_DefaultOptions, AAX_eProperty_CanBypass, AAX_eProperty_Constraint_Location, AAX_eProperty_Constraint_MultiMonoSupport, AAX_eProperty_HybridInputStemFormat, AAX_eProperty_HybridOutputStemFormat, AAX_eProperty_InputStemFormat, AAX_eProperty_ManufacturerID, AAX_eProperty_OutputStemFormat, AAX_eProperty_PlugInID_AudioSuite, AAX_eProperty_PlugInID_RTAS, AAX_eProperty_ProductID, AAX_eProperty_UsesClientGUI, AAX_eProperty_UsesTransport, AAX_ERROR_NULL_OBJECT, AAX_eStemFormat_None, AAX_FIELD_INDEX, AAX_IComponentDescriptor::AddAudioBufferLength(), AAX_IComponentDescriptor::AddAudioIn(), AAX_IComponentDescriptor::AddAudioOut(), AAX_IComponentDescriptor::AddAuxOutputStem(), AAX_IComponentDescriptor::AddClock(), AAX_IEffectDescriptor::AddComponent(), AAX_IComponentDescriptor::AddDataInPort(), AAX_IComponentDescriptor::AddMeters(), AAX_IComponentDescriptor::AddMIDINode(), AAX_IComponentDescriptor::AddPrivateData(), AAX_IComponentDescriptor::AddProcessProc_Native(), AAX_IPropertyMap::AddProperty(), kMaxAdditionalMIDINodes, kMaxAuxOutputStems, AAX_SInstrumentSetupInfo::mAudiosuiteID, AAX_SInstrumentSetupInfo::mAuxOutputStemFormats, AAX_SInstrumentSetupInfo::mAuxOutputStemNames, AAX_SInstrumentSetupInfo::mCanBypass, AAX_SInstrumentSetupInfo::mGlobalMIDIEventMask, AAX_SInstrumentSetupInfo::mGlobalMIDINodeName, AAX_SInstrumentSetupInfo::mHybridInputStemFormat, AAX_SInstrumentSetupInfo::mHybridOutputStemFormat, AAX_SInstrumentSetupInfo::mInputMIDIChannelMask, AAX_SInstrumentSetupInfo::mInputMIDINodeName, AAX_SInstrumentSetupInfo::mInputStemFormat, AAX_SInstrumentSetupInfo::mManufacturerID, AAX_SInstrumentSetupInfo::mMeterIDs, AAX_SInstrumentSetupInfo::mMultiMonoSupport, AAX_SInstrumentSetupInfo::mNeedsGlobalMIDI, AAX_SInstrumentSetupInfo::mNeedsInputMIDI, AAX_SInstrumentSetupInfo::mNeedsTransport, AAX_SInstrumentSetupInfo::mNumAdditionalInputMIDINodes, AAX_SInstrumentSetupInfo::mNumAuxOutputStems, AAX_SInstrumentSetupInfo::mNumMeters, AAX_SInstrumentSetupInfo::mOutputStemFormat, AAX_SInstrumentSetupInfo::mPluginID, AAX_SInstrumentSetupInfo::mProductID, AAX_SInstrumentSetupInfo::mUseHostGeneratedGUI, AAX_IEffectDescriptor::NewComponentDescriptor(), AAX_IComponentDescriptor::NewPropertyMap(), and StaticRenderAudio().
|
static |
Static RenderAudio (Called by the host)
Plug-ins should override AAX_CMonolithicParameters::RenderAudio()
[in] | inInstancesBegin | |
[in] | inInstancesEnd |
References AAX_ASSERT, AAX_IContainer::eStatus_Success, AAX_SInstrumentPrivateData::mMonolithicParametersPtr, AAX_CAtomicQueue< T, S >::Push(), and RenderAudio().
Referenced by StaticDescribe().