22 #ifndef RACKAFX_PARAMETERS_H 23 #define RACKAFX_PARAMETERS_H 25 #include "AAX_CEffectParameters.h" 26 #pragma warning(disable : 4985) // --- 'ceil': attributes not present on previous declaration NOTE: for VS2008 only, see the google for more info 28 #include "AAX_CAtomicQueue.h" 29 #include "AAX_IParameter.h" 30 #include "AAX_IMIDINode.h" 31 #include "AAX_IString.h" 32 #include "AAX_IEffectDescriptor.h" 33 #include "AAX_IComponentDescriptor.h" 34 #include "AAX_IPropertyMap.h" 112 float** inputBufferPtrs;
113 float** outputBufferPtrs;
114 int32_t* bufferLength;
117 #ifdef WANT_SIDECHAIN 118 int32_t* sidechainChannel;
122 AAX_IMIDINode* midiInputNode;
123 AAX_IMIDINode* midiTransportNode;
126 int64_t* currentStateNum;
129 #define kMaxAdditionalMIDINodes 15 130 #define kMaxAuxOutputStems 32 142 #define kSynchronizedParameterQueueSize 64 151 typedef std::pair<AAX_CParamID const, const AAX_IParameterValue*>
TParamValPair;
172 static AAX_CEffectParameters* AAX_CALLBACK
Create();
183 virtual AAX_Result
ResetFieldData (AAX_CFieldIndex inFieldIndex,
void * oData, uint32_t iDataSize)
const;
191 static AAX_Result
StaticDescribe(AAX_IComponentDescriptor& outDesc);
194 virtual AAX_Result
GetCustomData(AAX_CTypeID iDataBlockID, uint32_t iDataSize,
void* oData, uint32_t* oDataWritten)
const;
240 AAX_ASSERT(sCap > mSize);
243 mElem[mSize++] = inElem;
249 AAX_ASSERT(sCap >= mSize + inOther.mSize);
250 for (int32_t i = 0; i < inOther.mSize; ++i)
252 Add(inOther.mElem[i]);
256 void Append(
const std::list<TParamValPair*>& inOther)
258 AAX_ASSERT(sCap >= mSize + (int64_t)inOther.size());
259 for (std::list<TParamValPair*>::const_iterator iter = inOther.begin(); iter != inOther.end(); ++iter)
265 void Merge(AAX_IPointerQueue<TParamValPair>& inOther)
270 if (NULL == val) {
break; }
277 std::memset(mElem, 0x0,
sizeof(mElem));
286 typedef std::set<const AAX_IParameter*> TParamSet;
287 typedef std::pair<int64_t, std::list<TParamValPair*> > TNumberedParamStateList;
288 typedef AAX_CAtomicQueue<TNumberedParamStateList, 256> TNumberedStateListQueue;
290 typedef AAX_CAtomicQueue<const TParamValPair, 16*kSynchronizedParameterQueueSize> TParamValPairQueue;
293 void DeleteUsedParameterChanges();
294 std::set<std::string> mSynchronizedParameters;
295 int64_t mStateCounter;
296 TParamSet mDirtyParameters;
297 TNumberedStateListQueue mQueuedParameterChanges;
298 TNumberedStateListQueue mFinishedParameterChanges;
299 TParamValPairQueue mFinishedParameterValues;
300 int64_t mCurrentStateNum;
303 bool softBypass =
false;
312 uint32_t getChannelFormatForAAXStemFormat(AAX_EStemFormat format)
316 case AAX_eStemFormat_None: {
319 case AAX_eStemFormat_Mono: {
322 case AAX_eStemFormat_Stereo: {
325 case AAX_eStemFormat_LCR: {
328 case AAX_eStemFormat_LCRS: {
331 case AAX_eStemFormat_Quad: {
334 case AAX_eStemFormat_5_0: {
337 case AAX_eStemFormat_5_1: {
340 case AAX_eStemFormat_6_0: {
343 case AAX_eStemFormat_6_1: {
346 case AAX_eStemFormat_7_0_SDDS: {
349 case AAX_eStemFormat_7_0_DTS: {
352 case AAX_eStemFormat_7_1_SDDS: {
355 case AAX_eStemFormat_7_1_DTS: {
358 case AAX_eStemFormat_7_1_2: {
359 return kCF7p1Proximity; }
393 switch(hostMessageInfo.hostMessage)
399 for (uint32_t i = 0; i < guiUpdateData.
guiParameters.size(); i++)
403 std::stringstream str;
405 AAX_IParameter* oParameter;
406 AAX_Result result =
aaxParameters->GetParameter(str.str().c_str(), &oParameter);
407 if(AAX_SUCCESS == result)
409 oParameter->SetValueWithDouble(guiParam.
actualValue);
414 for (uint32_t i = 0; i < guiUpdateData.
guiParameters.size(); i++)
513 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
530 std::stringstream str;
531 str << controlID + 1;
533 AAX_Result result =
aaxParameters->GetParameterNormalizedValue(str.str().c_str(), ¶m);
534 if(AAX_SUCCESS == result)
544 std::stringstream str;
545 str << controlID + 1;
546 aaxParameters->SetParameterNormalizedValue(str.str().c_str(), value);
554 std::stringstream str;
565 std::stringstream str;
589 MessageInfo info(PLUGINGUI_REGISTER_SUBCONTROLLER);
607 MessageInfo info(PLUGINGUI_DE_REGISTER_SUBCONTROLLER);
624 customViewControllerMap::const_iterator it = customViewMap.find(customViewName);
625 if (it != customViewMap.end())
633 customViewMap.insert(std::make_pair(customViewName, pCVC));
655 MessageInfo info(PLUGINGUI_DE_REGISTER_CUSTOMVIEW);
679 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
681 it->second->clearCustomViewPtr();
685 it->second->clearCustomViewPtr();
723 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
725 if (it->second->getCustomViewPtr() == customViewConnector)
738 if (it->second->getCustomViewPtr() == customViewConnector)
776 void setMIDIpackets(
const AAX_CMidiPacket*& _ioPacketPtr, uint32_t& _midiBuffersize)
794 const uint8_t uMessage = (
ioPacketPtr->mData[0] & 0xF0);
795 const uint8_t uChannel = (
ioPacketPtr->mData[0] & 0x0F);
799 event.midiChannel = (
unsigned int)uChannel;
800 event.midiData1 = (
unsigned int)
ioPacketPtr->mData[1];
802 event.midiSampleOffset = sampleOffset;
std::pair< AAX_CParamID const, const AAX_IParameterValue * > TParamValPair
Defines a parameter-value pair for the monolithic parameters AAX programming paradigm; this is very w...
Definition: AAXPluginParameters.h:151
Information that includes the message code as well as the message data.
Definition: pluginstructures.h:545
CustomViewController * getCustomViewController(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:721
The AAXPluginParameters object implements the monolithic parameters AAX plugin programming paradigm w...
Definition: AAXPluginParameters.h:165
uint32_t midiBuffersize
midi buffer size for each bunch of packets
Definition: AAXPluginParameters.h:817
virtual bool guiWillClose()
Definition: AAXPluginParameters.h:675
void setMIDIpackets(const AAX_CMidiPacket *&_ioPacketPtr, uint32_t &_midiBuffersize)
Definition: AAXPluginParameters.h:776
The CustomViewController is part of the safe ICustomView feature in ASPiK. The CustomViewController m...
Definition: AAXPluginParameters.h:440
virtual void updateView()
Definition: AAXPluginParameters.h:448
virtual bool processMIDIEvent(midiEvent &event)
process a MIDI event
Definition: plugincore.cpp:395
See AAX_CMonolithicParameters in SDK; this is part of the strict parameter synchronization in monolit...
Definition: AAXPluginParameters.h:219
void UpdatePluginParameters(const TParamValPair *inSynchronizedParamValues[], int32_t inNumSynchronizedParamValues)
called once per buffer process operation to update any parameters that changed during the buffer fill...
Definition: AAXPluginParameters.cpp:367
virtual void pushDataValue(double data)
Definition: AAXPluginParameters.h:455
AAX_IEffectParameters * aaxParameters
parent parameters; lifelong existence
Definition: AAXPluginParameters.h:425
GUIPluginConnector(AAX_IEffectParameters *_aaxParameters, PluginCore *_pluginCore)
Definition: AAXPluginParameters.h:504
AAX_IEffectParameters * aaxParameters
the parent object
Definition: AAXPluginParameters.h:713
#define kSynchronizedParameterQueueSize
This is the maximum size of the plugin-core's parameter list; make sure to adjust itg if your core ne...
Definition: AAXPluginParameters.h:142
virtual AAX_Result UpdateParameterNormalizedValue(AAX_CParamID iParameterID, double iValue, AAX_EUpdateSource iSource)
called when a parameter needs to be updated (aka it is "dirty") as part of the AAX monolithic paramet...
Definition: AAXPluginParameters.cpp:721
virtual bool deRregisterSubcontroller(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:600
uint32_t controlID
ID value.
Definition: pluginstructures.h:299
static AAX_Result StaticDescribe(AAX_IComponentDescriptor &outDesc)
static describe function that exists as an object member and is part of the monolithic programming pa...
Definition: AAXPluginParameters.cpp:593
static void AAX_CALLBACK StaticRenderAudio(AAXAlgorithm *const inInstancesBegin[], const void *inInstancesEnd)
static callback function that exists as an object member and is part of the monolithic programming pa...
Definition: AAXPluginParameters.cpp:555
void AddSynchronizedParameter(const AAX_IParameter &inParameter)
called to add parameters to the synchronized list; this is only called once during EffectInit( ) as p...
Definition: AAXPluginParameters.cpp:700
void clearCustomViewPtr()
Definition: AAXPluginParameters.h:475
virtual bool processMessage(MessageInfo &messageInfo)
For Custom View and Custom Sub-Controller Operations.
Definition: plugincore.cpp:335
virtual bool registerCustomView(std::string customViewName, ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:619
virtual bool checkNonBoundValueChange(int tag, float normalizedValue)
Definition: AAXPluginParameters.h:701
CustomViewController(ICustomView *_customViewIF)
Definition: AAXPluginParameters.h:444
virtual AAX_Result ResetFieldData(AAX_CFieldIndex inFieldIndex, void *oData, uint32_t iDataSize) const
AAX Override.
Definition: AAXPluginParameters.cpp:755
void updateOutboundAAXParameters()
threadsafe update of outbound parameters (meter variables) for GUI.
Definition: AAXPluginParameters.cpp:881
Structure of data that is passed to GUI object once at creation time.
Definition: AAXPluginParameters.h:71
const AAX_CTypeID GR_MeterID
pro tools gr meter id
Definition: AAXPluginParameters.h:51
void ProcessAudio(AAXAlgorithm *ioRenderInfo, const TParamValPair *inSynchronizedParamValues[], int32_t inNumSynchronizedParamValues)
audio processing function; note that ALL algorithms point to this function so we have to decode chann...
Definition: AAXPluginParameters.cpp:446
virtual unsigned int getEventCount()
Definition: AAXPluginParameters.h:784
uint32_t midiMessage
BYTE message as UINT.
Definition: pluginstructures.h:487
Information about a GUI update message; this is for sending GUI control information from the plugin c...
Definition: pluginstructures.h:368
virtual bool deRegisterCustomView(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:647
AAXPluginParameters()
object constructor; this creates the ASPiK core and all of its required interfaces.
Definition: AAXPluginParameters.cpp:75
Custom interface so that GUI can pass information to plugin shell in a thread-safe manner...
Definition: pluginstructures.h:1219
virtual AAX_Result TimerWakeup()
AAX Override.
Definition: AAXPluginParameters.cpp:864
PluginCore * pluginCore
the core object
Definition: AAXPluginParameters.h:712
Custom View interface to allow plugin core to create safe communication channels with GUI custom view...
Definition: pluginstructures.h:1141
void updateHostInfo(AAXAlgorithm *ioRenderInfo, HostInfo *hostInfo)
called once per buffer process operation to set the host information structure for the core ...
Definition: AAXPluginParameters.cpp:402
virtual void parameterChanged(int32_t controlID, double actualValue, double)
Definition: AAXPluginParameters.h:520
const AAX_CMidiPacket * ioPacketPtr
array of packets
Definition: AAXPluginParameters.h:816
virtual void endParameterChangeGesture(int controlTag)
Definition: AAXPluginParameters.h:561
Definition: pluginstructures.h:397
AAXMIDIEventQueue(PluginCore *_pluginCore)
Definition: AAXPluginParameters.h:766
Double buffered queue for MIDI messages.
Definition: pluginstructures.h:1307
Processing structure; this is described in detail in Designing Audio Effects in C++ 2nd Ed...
Definition: AAXPluginParameters.h:108
virtual bool guiParameterChanged(int32_t controlID, double actualValue)
has nothing to do with actual variable or updated variable (binding)
Definition: plugincore.cpp:306
The GUIPluginConnector interface creates a safe message mechanism for the GUI to issue requests to th...
Definition: AAXPluginParameters.h:500
virtual void setNormalizedPluginParameter(int32_t controlID, double value)
Definition: AAXPluginParameters.h:541
std::map< std::string, CustomViewController * > customViewControllerMap
map of custom view controllers
Definition: AAXPluginParameters.h:717
const AAX_CTypeID PLUGIN_CUSTOMDATA_ID
custom data parameter number (we only need one)
Definition: AAXPluginParameters.h:48
Back-pointer to the parameters; this is described in detail in Designing Audio Effects in C++ 2nd Ed...
Definition: AAXPluginParameters.h:90
virtual double getNormalizedPluginParameter(int32_t controlID)
Definition: AAXPluginParameters.h:527
virtual AAX_Result EffectInit()
AAX Override.
Definition: AAXPluginParameters.cpp:157
virtual AAX_Result GenerateCoefficients()
AAX Override.
Definition: AAXPluginParameters.cpp:654
void * inMessageData
incoming message data (interpretation depends on message)
Definition: pluginstructures.h:559
The AAXMIDIEventQueue interface queues incoming MIDI messages and blasts them out during the buffer p...
Definition: AAXPluginParameters.h:762
std::vector< GUIParameter > guiParameters
list of updates
Definition: pluginstructures.h:373
virtual bool registerSubcontroller(std::string subcontrollerName, ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:572
uint32_t midiData2
BYTE data 2 as UINT.
Definition: pluginstructures.h:490
void setCustomViewPtr(ICustomView *_customViewIF)
Definition: AAXPluginParameters.h:469
CustomViewController * getCustomSubController(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:734
virtual bool guiDidOpen()
Definition: AAXPluginParameters.h:667
The PluginCore object is the default PluginBase derived object for ASPiK projects. Note that you are fre to change the name of this object (as long as you change it in the compiler settings, etc...)
Definition: plugincore.h:43
virtual ~GUIPluginConnector()
Definition: AAXPluginParameters.h:507
virtual void sendMessage(void *data)
Definition: pluginstructures.h:1162
virtual AAX_Result GetCustomData(AAX_CTypeID iDataBlockID, uint32_t iDataSize, void *oData, uint32_t *oDataWritten) const
note the data that is transferred to GUI; the core is ONLY used for initialization and then it is unu...
Definition: AAXPluginParameters.cpp:131
Information that defines a single GUI parameter's possible values and ID.
Definition: pluginstructures.h:291
virtual bool fireMidiEvents(unsigned int sampleOffset)
Definition: AAXPluginParameters.h:790
PluginCore * pluginCore
core
Definition: AAXPluginParameters.h:815
base class interface file for ASPiK plugincore object
double actualValue
actual value
Definition: pluginstructures.h:300
Information from the host that is updated on each buffer process cycle; includes BPM, time signature, SMPTE and other data. The values in the stock structure are consistent across most APIs, however others may be added (commnted out here)
Definition: pluginstructures.h:729
virtual void updateView()=0
std::string inMessageString
incoming message data as a std::string (interpretation depends on message)
Definition: pluginstructures.h:562
Custom interface to send the plugin shell a message from plugin core.
Definition: pluginstructures.h:1289
The PluginHostConnector implements the IPluginHostConnector interface for the plugin shell object...
Definition: AAXPluginParameters.h:380
static AAX_CEffectParameters *AAX_CALLBACK Create()
creation mechanism for this object
Definition: AAXPluginParameters.cpp:59
virtual void sendHostMessage(const HostMessageInfo &hostMessageInfo)
process a message; by default it processes sendGUIUpdate to safely send a parameter change event but ...
Definition: AAXPluginParameters.h:391
virtual void beginParameterChangeGesture(int controlTag)
Definition: AAXPluginParameters.h:550
const ICustomView * getCustomViewPtr()
Definition: AAXPluginParameters.h:472
customViewControllerMap customSubControllerMap
map of custom sub-controllers
Definition: AAXPluginParameters.h:732
virtual void pushDataValue(double data)
Definition: pluginstructures.h:1152
const unsigned int meterTapCount
number of gr meters (we've only ever seen one on any AVID surface/SW)
Definition: AAXPluginParameters.h:52
virtual void sendMessage(void *data)
Definition: AAXPluginParameters.h:462
virtual bool guiTimerPing()
Definition: AAXPluginParameters.h:693
virtual ~AAXPluginParameters()
object destructor; this destroys the ASPiK core and all of its required interfaces.
Definition: AAXPluginParameters.cpp:110
Information about a MIDI event.
Definition: pluginstructures.h:449