AAX SDK 2.6.1
Avid Audio Extensions Development Kit
Loading...
Searching...
No Matches
AAX_CEffectParameters.h
Go to the documentation of this file.
1/*================================================================================================*/
2/*
3 *
4 * Copyright 2013-2017, 2019, 2023 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * CONFIDENTIAL: this document contains confidential information of Avid. Do
8 * not disclose to any third party. Use of the information contained in this
9 * document is subject to an Avid SDK license.
10 *
11 */
12
19/*================================================================================================*/
20
21
22#ifndef AAX_CEFFECTPARAMETERS_H
23#define AAX_CEFFECTPARAMETERS_H
24
26#include "AAX_IPageTable.h"
27#include "AAX_CString.h"
31
32#include <set>
33#include <string>
34#include <vector>
35
36class AAX_IController;
40class AAX_ITransport;
41
44
63{
64public:
68
69public:
82
86 AAX_Result NotificationReceived( /* AAX_ENotificationEvent */ AAX_CTypeID inNotificationType, const void * inNotificationData, uint32_t inNotificationDataSize) AAX_OVERRIDE;
88
97 AAX_Result GetNumberOfParameters (int32_t * oNumControls) const AAX_OVERRIDE;
100 AAX_Result GetParameterNumberOfSteps (AAX_CParamID iParameterID, int32_t * oNumSteps ) const AAX_OVERRIDE;
102 AAX_Result GetParameterNameOfLength (AAX_CParamID iParameterID, AAX_IString * oName, int32_t iNameLength ) const AAX_OVERRIDE;
108 AAX_Result GetParameterIndex (AAX_CParamID iParameterID, int32_t * oControlIndex ) const AAX_OVERRIDE;
109 AAX_Result GetParameterIDFromIndex (int32_t iControlIndex, AAX_IString * oParameterIDString ) const AAX_OVERRIDE;
110 AAX_Result GetParameterValueInfo ( AAX_CParamID iParameterID, int32_t iSelector, int32_t* oValue) const AAX_OVERRIDE;
112
121 AAX_Result GetParameterValueFromString (AAX_CParamID iParameterID, double * oValue, const AAX_IString & iValueString ) const AAX_OVERRIDE;
122 AAX_Result GetParameterStringFromValue (AAX_CParamID iParameterID, double iValue, AAX_IString * oValueString, int32_t iMaxLength ) const AAX_OVERRIDE;
123 AAX_Result GetParameterValueString (AAX_CParamID iParameterID, AAX_IString * oValueString, int32_t iMaxLength) const AAX_OVERRIDE;
124 AAX_Result GetParameterNormalizedValue (AAX_CParamID iParameterID, double * oValuePtr ) const AAX_OVERRIDE;
128
143
165
169 AAX_Result ResetFieldData (AAX_CFieldIndex inFieldIndex, void * oData, uint32_t inDataSize) const AAX_OVERRIDE;
171
190 AAX_Result GetNumberOfChunks (int32_t * oNumChunks ) const AAX_OVERRIDE;
191 AAX_Result GetChunkIDFromIndex (int32_t iIndex, AAX_CTypeID * oChunkID ) const AAX_OVERRIDE;
192 AAX_Result GetChunkSize (AAX_CTypeID iChunkID, uint32_t * oSize ) const AAX_OVERRIDE;
196 AAX_Result GetNumberOfChanges (int32_t * oNumChanges ) const AAX_OVERRIDE;
198
205
210 AAX_Result GetCurveData( /* AAX_ECurveType */ AAX_CTypeID iCurveType, const float * iValues, uint32_t iNumValues, float * oValues ) const AAX_OVERRIDE;
211 AAX_Result GetCurveDataMeterIds( /* AAX_ECurveType */ AAX_CTypeID iCurveType, uint32_t *oXMeterId, uint32_t *oYMeterId) const AAX_OVERRIDE;
212 AAX_Result GetCurveDataDisplayRange( /* AAX_ECurveType */ AAX_CTypeID iCurveType, float *oXMin, float *oXMax, float *oYMin, float *oYMax ) const AAX_OVERRIDE;
213
220 AAX_Result UpdatePageTable(uint32_t inTableType, int32_t inTablePageSize, IACFUnknown* iHostUnknown, IACFUnknown* ioPageTableUnknown) const AAX_OVERRIDE AAX_FINAL;
222
233 AAX_Result GetCustomData( AAX_CTypeID iDataBlockID, uint32_t inDataSize, void* oData, uint32_t* oDataWritten) const AAX_OVERRIDE;
234 AAX_Result SetCustomData( AAX_CTypeID iDataBlockID, uint32_t inDataSize, const void* iData ) AAX_OVERRIDE;
236
245
252
253
254
255public:
263 const AAX_ITransport* Transport() const;
267
268protected:
273 AAX_Result SetTaperDelegate ( AAX_CParamID iParameterID, AAX_ITaperDelegateBase & iTaperDelegate, bool iPreserveValue );
275 bool IsParameterTouched ( AAX_CParamID iParameterID ) const;
276 bool IsParameterLinkReady ( AAX_CParamID inParameterID, AAX_EUpdateSource inSource ) const;
278
300 virtual AAX_Result EffectInit(void) { return AAX_SUCCESS; };
301
314 virtual AAX_Result UpdatePageTable(uint32_t /*inTableType*/, int32_t /*inTablePageSize*/, AAX_IPageTable& /*ioPageTable*/) const { return AAX_ERROR_UNIMPLEMENTED; }
315
328
332 void BuildChunkData (void) const;
333
334protected:
336 mutable int32_t mChunkSize; //this old behavior isn't const friendly yet. Consider this a temp variable.
337 mutable AAX_CChunkDataParser mChunkParser; //this old behavior isn't const friendly yet. Consider this a temp variable.
341 std::set<std::string> mFilteredParameters;
342
343private:
344 // interfaces provided by the host via the IACFUnknown passed to Initialize()
345 AAX_IController* mController;
346 AAX_ITransport* mTransport;
347 AAX_IAutomationDelegate* mAutomationDelegate;
348
349};
350
351// Convenience functions since many legacy plug-ins had internal int32 value representations.
352extern int32_t NormalizedToInt32 (double normalizedValue );
353extern double Int32ToNormalized (int32_t value );
354extern double BoolToNormalized (bool value );
355
356#endif
A generic AAX string class with similar functionality to std::string.
AAX_EUpdateSource
Source for values passed into UpdateParameterNormalizedValue().
Definition: AAX_Enums.h:1049
AAX_EParameterType
FIC stuff that I can't include without DAE library dependence.
Definition: AAX_Enums.h:852
int32_t AAX_EParameterOrientation
Typedef for a bitfield of AAX_EParameterOrientationBits values.
Definition: AAX_Enums.h:885
The interface for an AAX Plug-in's data model.
Parser utility for plugin chunks.
@ AAX_ERROR_UNIMPLEMENTED
Definition: AAX_Errors.h:46
@ AAX_SUCCESS
Definition: AAX_Errors.h:36
const char * AAX_CParamID
Parameter identifier.
Definition: AAX.h:349
int32_t AAX_Result
Definition: AAX.h:334
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:326
#define AAX_FINAL
final keyword macro
Definition: AAX.h:152
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:151
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:333
AAX_CIndex AAX_CFieldIndex
Not used by AAX plug-ins (except in AAX_FIELD_INDEX macro)
Definition: AAX.h:346
A container object for plug-in parameters.
int32_t NormalizedToInt32(double normalizedValue)
AAX_CParamID cPreviewID
Definition: AAX_CEffectParameters.h:42
AAX_CParamID cDefaultMasterBypassID
Definition: AAX_CEffectParameters.h:43
double BoolToNormalized(bool value)
double Int32ToNormalized(int32_t value)
Helper classes related to posting AAX packets and handling parameter update events.
COM compatible IUnknown C++ interface.
Definition: AAX_ACFInterface.doxygen:252
Plug-in chunk header + data.
Definition: AAX.h:536
Packet structure for MIDI data.
Definition: AAX.h:636
Parser utility for plugin chunks.
Definition: AAX_CChunkDataParser.h:115
Default implementation of the AAX_IEffectParameters interface.
Definition: AAX_CEffectParameters.h:63
AAX_Result UpdateParameterTouch(AAX_CParamID iParameterID, AAX_CBoolean iTouchState) AAX_OVERRIDE
Sets a "touched" state on a parameter.
void FilterParameterIDOnSave(AAX_CParamID controlID)
CALL: Indicates the indices of parameters that should not be saved in the default AAX_CEffectParamete...
AAX_Result TouchParameter(AAX_CParamID iParameterID) AAX_OVERRIDE
"Touches" (locks) a parameter in the automation system to a particular control in preparation for upd...
AAX_Result GetParameterValueInfo(AAX_CParamID iParameterID, int32_t iSelector, int32_t *oValue) const AAX_OVERRIDE
CALL: Retrieves a property of a parameter.
AAX_Result ResetFieldData(AAX_CFieldIndex inFieldIndex, void *oData, uint32_t inDataSize) const AAX_OVERRIDE
Called by the host to reset a private data field in the plug-in's algorithm.
AAX_Result GetParameter(AAX_CParamID iParameterID, AAX_IParameter **oParameter) AAX_OVERRIDE
CALL: Retrieves an arbitrary setting within a parameter.
void BuildChunkData(void) const
Clears out the current chunk in Chunk Parser and adds all of the new values. Used by default implemen...
AAX_ITransport * Transport()
Access to the Transport object.
AAX_Result GetNumberOfChunks(int32_t *oNumChunks) const AAX_OVERRIDE
Retrieves the number of chunks used by this plug-in.
int32_t mNumPlugInChanges
Definition: AAX_CEffectParameters.h:335
AAX_CPacketDispatcher mPacketDispatcher
Definition: AAX_CEffectParameters.h:339
AAX_Result SetParameterNormalizedRelative(AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE
CALL: Sets the specified parameter to a new value relative to its current value.
AAX_Result Initialize(IACFUnknown *iController) AAX_OVERRIDE
Main data model initialization. Called when plug-in instance is first instantiated.
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.
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.
AAX_Result GenerateCoefficients(void) AAX_OVERRIDE
Generates and dispatches new coefficient packets.
AAX_Result RenderAudio_Hybrid(AAX_SHybridRenderInfo *ioRenderInfo) AAX_OVERRIDE
Hybrid audio render function.
virtual AAX_Result EffectInit(void)
Initialization helper routine. Called from AAX_CEffectParameters::Initialize.
Definition: AAX_CEffectParameters.h:300
std::set< std::string > mFilteredParameters
Definition: AAX_CEffectParameters.h:341
AAX_Result SetTaperDelegate(AAX_CParamID iParameterID, AAX_ITaperDelegateBase &iTaperDelegate, bool iPreserveValue)
AAX_Result ReleaseParameter(AAX_CParamID iParameterID) AAX_OVERRIDE
Releases a parameter from a "touched" state.
AAX_Result GetParameterNumberOfSteps(AAX_CParamID iParameterID, int32_t *oNumSteps) const AAX_OVERRIDE
CALL: Retrieves the number of discrete steps for a parameter.
AAX_Result GetChunkIDFromIndex(int32_t iIndex, AAX_CTypeID *oChunkID) const AAX_OVERRIDE
Retrieves the ID associated with a chunk index.
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.
AAX_Result TimerWakeup() AAX_OVERRIDE
Periodic wakeup callback for idle-time operations.
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.
AAX_Result GetParameterIDFromIndex(int32_t iControlIndex, AAX_IString *oParameterIDString) const AAX_OVERRIDE
CALL: Retrieves the ID of a parameter.
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.
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.
AAX_CChunkDataParser mChunkParser
Definition: AAX_CEffectParameters.h:337
AAX_Result GetParameterIndex(AAX_CParamID iParameterID, int32_t *oControlIndex) const AAX_OVERRIDE
CALL: Retrieves the index of a parameter.
virtual AAX_Result UpdatePageTable(uint32_t, int32_t, AAX_IPageTable &) const
Definition: AAX_CEffectParameters.h:314
bool IsParameterTouched(AAX_CParamID iParameterID) const
AAX_Result GetParameterIsAutomatable(AAX_CParamID iParameterID, AAX_CBoolean *oAutomatable) const AAX_OVERRIDE
CALL: Retrieves information about a parameter's automatable status.
int32_t mChunkSize
Definition: AAX_CEffectParameters.h:336
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.
AAX_Result SetParameterNormalizedValue(AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE
CALL: Sets the specified parameter to a new value.
AAX_CEffectParameters & operator=(const AAX_CEffectParameters &other)
AAX_Result GetParameterType(AAX_CParamID iParameterID, AAX_EParameterType *oParameterType) const AAX_OVERRIDE
CALL: Retrieves the type of a parameter.
AAX_Result SetChunk(AAX_CTypeID iChunkID, const AAX_SPlugInChunk *iChunk) AAX_OVERRIDE
Restores a set of plug-in parameters based on chunk information.
AAX_Result GetNumberOfChanges(int32_t *oNumChanges) const AAX_OVERRIDE
Retrieves the number of parameter changes made since the plug-in's creation.
~AAX_CEffectParameters(void) AAX_OVERRIDE
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 previou...
const AAX_ITransport * Transport() const
const access to the Transport object
const AAX_IController * Controller() const
const access to the Effect controller
AAX_Result UpdateMIDINodes(AAX_CFieldIndex inFieldIndex, AAX_CMidiPacket &iPacket) AAX_OVERRIDE
MIDI update callback.
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.
AAX_IController * Controller()
Access to the Effect controller.
AAX_Result SetParameterDefaultNormalizedValue(AAX_CParamID iParameterID, double iValue) AAX_OVERRIDE
CALL: Sets the default value of a parameter.
AAX_Result GetNumberOfParameters(int32_t *oNumControls) const AAX_OVERRIDE
CALL: Retrieves the total number of plug-in parameters.
AAX_Result UpdateControlMIDINodes(AAX_CTypeID nodeID, AAX_CMidiPacket &iPacket) AAX_OVERRIDE
MIDI update callback for control MIDI nodes.
AAX_Result Uninitialize(void) AAX_OVERRIDE
Main data model uninitialization.
AAX_Result SetDisplayDelegate(AAX_CParamID iParameterID, AAX_IDisplayDelegateBase &iDisplayDelegate)
int32_t mNumChunkedParameters
Definition: AAX_CEffectParameters.h:338
bool IsParameterLinkReady(AAX_CParamID inParameterID, AAX_EUpdateSource inSource) const
AAX_Result DoMIDITransfers() AAX_OVERRIDE
MIDI update callback.
Definition: AAX_CEffectParameters.h:241
AAX_Result GetParameterNormalizedValue(AAX_CParamID iParameterID, double *oValuePtr) const AAX_OVERRIDE
CALL: Retrieves a parameter's current value.
AAX_Result GetParameterDefaultNormalizedValue(AAX_CParamID iParameterID, double *oValue) const AAX_OVERRIDE
CALL: Retrieves default value of a parameter.
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.
AAX_Result UpdateParameterNormalizedValue(AAX_CParamID iParameterID, double iValue, AAX_EUpdateSource iSource) AAX_OVERRIDE
Updates a single parameter's state to its current value.
AAX_Result GetParameterNameOfLength(AAX_CParamID iParameterID, AAX_IString *oName, int32_t iNameLength) const AAX_OVERRIDE
CALL: Retrieves an abbreviated name for a parameter.
AAX_Result NotificationReceived(AAX_CTypeID inNotificationType, const void *inNotificationData, uint32_t inNotificationDataSize) AAX_OVERRIDE
Notification Hook.
AAX_Result GetParameterValueFromString(AAX_CParamID iParameterID, double *oValue, const AAX_IString &iValueString) const AAX_OVERRIDE
CALL: Converts a value string to a value.
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.
AAX_Result GetParameterName(AAX_CParamID iParameterID, AAX_IString *oName) const AAX_OVERRIDE
CALL: Retrieves the full name for a parameter.
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.
AAX_IAutomationDelegate * AutomationDelegate()
Access to the Effect's automation delegate.
AAX_CParameterManager mParameterManager
Definition: AAX_CEffectParameters.h:340
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.
const AAX_IAutomationDelegate * AutomationDelegate() const
const access to the Effect's automation delegate
AAX_Result GetMasterBypassParameter(AAX_IString *oIDString) const AAX_OVERRIDE
CALL: Retrieves the ID of the plug-in's Master Bypass parameter.
Helper class for managing AAX packet posting.
Definition: AAX_CPacketDispatcher.h:150
A container object for plug-in parameters.
Definition: AAX_CParameterManager.h:49
Hybrid render processing context.
Definition: AAX_IACFEffectParameters.h:875
Interface allowing an AAX plug-in to interact with the host's event system.
Definition: AAX_IAutomationDelegate.h:44
Interface for the AAX host's view of a single instance of an effect. Used by both clients of the AAX ...
Definition: AAX_IController.h:42
Defines the display behavior for a parameter.
Definition: AAX_IDisplayDelegate.h:50
The interface for an AAX Plug-in's data model.
Definition: AAX_IEffectParameters.h:80
Interface to the host's representation of a plug-in instance's page table.
Definition: AAX_IPageTable.h:25
The base interface for all normalizable plug-in parameters.
Definition: AAX_IParameter.h:137
A simple string container that can be passed across a binary boundary. This class,...
Definition: AAX_IString.h:38
Defines the taper conversion behavior for a parameter.
Definition: AAX_ITaperDelegate.h:70
Interface to information about the host's transport state.
Definition: AAX_ITransport.h:53