AAX SDK 2.8.0
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-2024 Avid Technology, Inc.
5 * All rights reserved.
6 *
7 * This file is part of the Avid AAX SDK.
8 *
9 * The AAX SDK is subject to commercial or open-source licensing.
10 *
11 * By using the AAX SDK, you agree to the terms of both the Avid AAX SDK License
12 * Agreement and Avid Privacy Policy.
13 *
14 * AAX SDK License: https://developer.avid.com/aax
15 * Privacy Policy: https://www.avid.com/legal/privacy-policy-statement
16 *
17 * Or: You may also use this code under the terms of the GPL v3 (see
18 * www.gnu.org/licenses).
19 *
20 * THE AAX SDK IS PROVIDED "AS IS" WITHOUT ANY WARRANTY, AND ALL WARRANTIES, WHETHER
21 * EXPRESSED OR IMPLIED, INCLUDING MERCHANTABILITY AND FITNESS FOR PURPOSE, ARE
22 * DISCLAIMED.
23 *
24 */
25
32/*================================================================================================*/
33
34
35#ifndef AAX_CEFFECTPARAMETERS_H
36#define AAX_CEFFECTPARAMETERS_H
37
39#include "AAX_IPageTable.h"
40#include "AAX_CString.h"
44
45#include <set>
46#include <string>
47#include <vector>
48
49class AAX_IController;
53class AAX_ITransport;
54
57
76{
77public:
81
82public:
95
99 AAX_Result NotificationReceived( /* AAX_ENotificationEvent */ AAX_CTypeID inNotificationType, const void * inNotificationData, uint32_t inNotificationDataSize) AAX_OVERRIDE;
101
110 AAX_Result GetNumberOfParameters (int32_t * oNumControls) const AAX_OVERRIDE;
113 AAX_Result GetParameterNumberOfSteps (AAX_CParamID iParameterID, int32_t * oNumSteps ) const AAX_OVERRIDE;
115 AAX_Result GetParameterNameOfLength (AAX_CParamID iParameterID, AAX_IString * oName, int32_t iNameLength ) const AAX_OVERRIDE;
121 AAX_Result GetParameterIndex (AAX_CParamID iParameterID, int32_t * oControlIndex ) const AAX_OVERRIDE;
122 AAX_Result GetParameterIDFromIndex (int32_t iControlIndex, AAX_IString * oParameterIDString ) const AAX_OVERRIDE;
123 AAX_Result GetParameterValueInfo ( AAX_CParamID iParameterID, int32_t iSelector, int32_t* oValue) const AAX_OVERRIDE;
125
134 AAX_Result GetParameterValueFromString (AAX_CParamID iParameterID, double * oValue, const AAX_IString & iValueString ) const AAX_OVERRIDE;
135 AAX_Result GetParameterStringFromValue (AAX_CParamID iParameterID, double iValue, AAX_IString * oValueString, int32_t iMaxLength ) const AAX_OVERRIDE;
136 AAX_Result GetParameterValueString (AAX_CParamID iParameterID, AAX_IString * oValueString, int32_t iMaxLength) const AAX_OVERRIDE;
137 AAX_Result GetParameterNormalizedValue (AAX_CParamID iParameterID, double * oValuePtr ) const AAX_OVERRIDE;
141
156
178
182 AAX_Result ResetFieldData (AAX_CFieldIndex inFieldIndex, void * oData, uint32_t inDataSize) const AAX_OVERRIDE;
184
203 AAX_Result GetNumberOfChunks (int32_t * oNumChunks ) const AAX_OVERRIDE;
204 AAX_Result GetChunkIDFromIndex (int32_t iIndex, AAX_CTypeID * oChunkID ) const AAX_OVERRIDE;
205 AAX_Result GetChunkSize (AAX_CTypeID iChunkID, uint32_t * oSize ) const AAX_OVERRIDE;
209 AAX_Result GetNumberOfChanges (int32_t * oNumChanges ) const AAX_OVERRIDE;
211
218
223 AAX_Result GetCurveData( /* AAX_ECurveType */ AAX_CTypeID iCurveType, const float * iValues, uint32_t iNumValues, float * oValues ) const AAX_OVERRIDE;
224 AAX_Result GetCurveDataMeterIds( /* AAX_ECurveType */ AAX_CTypeID iCurveType, uint32_t *oXMeterId, uint32_t *oYMeterId) const AAX_OVERRIDE;
225 AAX_Result GetCurveDataDisplayRange( /* AAX_ECurveType */ AAX_CTypeID iCurveType, float *oXMin, float *oXMax, float *oYMin, float *oYMax ) const AAX_OVERRIDE;
226
233 AAX_Result UpdatePageTable(uint32_t inTableType, int32_t inTablePageSize, IACFUnknown* iHostUnknown, IACFUnknown* ioPageTableUnknown) const AAX_OVERRIDE AAX_FINAL;
235
246 AAX_Result GetCustomData( AAX_CTypeID iDataBlockID, uint32_t inDataSize, void* oData, uint32_t* oDataWritten) const AAX_OVERRIDE;
247 AAX_Result SetCustomData( AAX_CTypeID iDataBlockID, uint32_t inDataSize, const void* iData ) AAX_OVERRIDE;
249
258
265
266
267
268public:
276 const AAX_ITransport* Transport() const;
280
281protected:
286 AAX_Result SetTaperDelegate ( AAX_CParamID iParameterID, AAX_ITaperDelegateBase & iTaperDelegate, bool iPreserveValue );
288 bool IsParameterTouched ( AAX_CParamID iParameterID ) const;
289 bool IsParameterLinkReady ( AAX_CParamID inParameterID, AAX_EUpdateSource inSource ) const;
291
313 virtual AAX_Result EffectInit(void) { return AAX_SUCCESS; };
314
327 virtual AAX_Result UpdatePageTable(uint32_t /*inTableType*/, int32_t /*inTablePageSize*/, AAX_IPageTable& /*ioPageTable*/) const { return AAX_ERROR_UNIMPLEMENTED; }
328
341
345 void BuildChunkData (void) const;
346
347protected:
349 mutable int32_t mChunkSize; //this old behavior isn't const friendly yet. Consider this a temp variable.
350 mutable AAX_CChunkDataParser mChunkParser; //this old behavior isn't const friendly yet. Consider this a temp variable.
354 std::set<std::string> mFilteredParameters;
355
356private:
357 // interfaces provided by the host via the IACFUnknown passed to Initialize()
358 AAX_IController* mController;
359 AAX_ITransport* mTransport;
360 AAX_IAutomationDelegate* mAutomationDelegate;
361
362};
363
364// Convenience functions since many legacy plug-ins had internal int32 value representations.
365extern int32_t NormalizedToInt32 (double normalizedValue );
366extern double Int32ToNormalized (int32_t value );
367extern double BoolToNormalized (bool value );
368
369#endif
A generic AAX string class with similar functionality to std::string.
AAX_EUpdateSource
Source for values passed into UpdateParameterNormalizedValue().
Definition: AAX_Enums.h:1095
AAX_EParameterType
FIC stuff that I can't include without DAE library dependence.
Definition: AAX_Enums.h:898
int32_t AAX_EParameterOrientation
Typedef for a bitfield of AAX_EParameterOrientationBits values.
Definition: AAX_Enums.h:931
The interface for an AAX Plug-in's data model.
Parser utility for plugin chunks.
@ AAX_ERROR_UNIMPLEMENTED
Definition: AAX_Errors.h:59
@ AAX_SUCCESS
Definition: AAX_Errors.h:49
const char * AAX_CParamID
Parameter identifier.
Definition: AAX.h:362
int32_t AAX_Result
Definition: AAX.h:347
uint8_t AAX_CBoolean
Cross-compiler boolean type used by AAX interfaces.
Definition: AAX.h:339
#define AAX_FINAL
final keyword macro
Definition: AAX.h:165
#define AAX_OVERRIDE
override keyword macro
Definition: AAX.h:164
uint32_t AAX_CTypeID
Matches type of OSType used in classic plugins.
Definition: AAX.h:346
AAX_CIndex AAX_CFieldIndex
Not used by AAX plug-ins (except in AAX_FIELD_INDEX macro)
Definition: AAX.h:359
A container object for plug-in parameters.
int32_t NormalizedToInt32(double normalizedValue)
AAX_CParamID cPreviewID
Definition: AAX_CEffectParameters.h:55
AAX_CParamID cDefaultMasterBypassID
Definition: AAX_CEffectParameters.h:56
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:265
Plug-in chunk header + data.
Definition: AAX.h:549
Packet structure for MIDI data.
Definition: AAX.h:649
Parser utility for plugin chunks.
Definition: AAX_CChunkDataParser.h:128
Default implementation of the AAX_IEffectParameters interface.
Definition: AAX_CEffectParameters.h:76
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:348
AAX_CPacketDispatcher mPacketDispatcher
Definition: AAX_CEffectParameters.h:352
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:313
std::set< std::string > mFilteredParameters
Definition: AAX_CEffectParameters.h:354
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:350
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:327
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:349
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:351
bool IsParameterLinkReady(AAX_CParamID inParameterID, AAX_EUpdateSource inSource) const
AAX_Result DoMIDITransfers() AAX_OVERRIDE
MIDI update callback.
Definition: AAX_CEffectParameters.h:254
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:353
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:163
A container object for plug-in parameters.
Definition: AAX_CParameterManager.h:62
Hybrid render processing context.
Definition: AAX_IACFEffectParameters.h:888
Interface allowing an AAX plug-in to interact with the host's event system.
Definition: AAX_IAutomationDelegate.h:57
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:55
Defines the display behavior for a parameter.
Definition: AAX_IDisplayDelegate.h:63
The interface for an AAX Plug-in's data model.
Definition: AAX_IEffectParameters.h:93
Interface to the host's representation of a plug-in instance's page table.
Definition: AAX_IPageTable.h:38
The base interface for all normalizable plug-in parameters.
Definition: AAX_IParameter.h:150
A simple string container that can be passed across a binary boundary. This class,...
Definition: AAX_IString.h:51
Defines the taper conversion behavior for a parameter.
Definition: AAX_ITaperDelegate.h:83
Interface to information about the host's transport state.
Definition: AAX_ITransport.h:66