ASPiK SDK
Loading...
Searching...
No Matches
AAXPluginParameters.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// ASPiK AAX Shell File: aaxpluginparameters.h
3//
20// -----------------------------------------------------------------------------
21#pragma once
22#ifndef AAX_PARAMETERS_H
23#define AAX_PARAMETERS_H
24
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
27
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"
35
36#include <set>
37#include <list>
38#include <utility>
39#include <vector>
40
41// --- our plugin core object
42#include "plugincore.h"
43#include "customcontrols.h"
44
45#if MAC
46#include <CoreFoundation/CoreFoundation.h>
47#else
48#include <windows.h>
49#endif
50
51// --- see AAX_ITransport.h before enabling this: performance hits!
52// #define ENABLE_EXTRA_HOST_INFO
53
54// --- constants
55const AAX_CTypeID PLUGIN_CUSTOMDATA_ID = 0;
56
57// --- special ProTools meter
58const AAX_CTypeID GR_MeterID = 'grMT';
59const unsigned int meterTapCount = 1;
60
61// --- setup context struct
66
79{
80 GUIPluginConnector* guiPlugin_Connector = nullptr; // added nullptr 5.9.18
81 PluginCore* plugin_Core = nullptr;
82};
83
98{
99 AAXPluginParameters* aaxPluginParameters;
100};
101
115// --- processing struct
117{
118 // --- audio
119 pluginPrivateData* privateData; // --- the Monolithic Parameters
120 float** inputBufferPtrs; // --- inputs buffer
121 float** outputBufferPtrs; // --- outputs buffer
122 int32_t* bufferLength; // --- buffer size (per channel)
123#ifdef PT_GR_METER
124 float** grMeterPtrs; // --- Meter taps; currrently support one GR meter (have never seen more than 1)
125#endif
126
127#ifdef WANT_SIDECHAIN
128 int32_t* sidechainChannel; // --- sidechain channel pointer
129#endif
130
131 // --- MIDI
132 AAX_IMIDINode* midiInputNode; // --- MIDI input node -> plugin
133 AAX_IMIDINode* midiTransportNode; // --- for getting info about the host BPM, etc...
134
135 // --- params
136 int64_t* currentStateNum; // --- state value
137};
138
139
140#define kMaxAdditionalMIDINodes 15
141#define kMaxAuxOutputStems 32
142
143// --- NOTE: default here is 64 parameters; you should tweak this value to your final parameter count
144// for the smallest size plugin; undetermined if this is more efficient or not.
153#define kSynchronizedParameterQueueSize 64
154
162typedef std::pair<AAX_CParamID const, const AAX_IParameterValue*> TParamValPair;
163
176class AAXPluginParameters : public AAX_CEffectParameters
177{
178public:
180 virtual ~AAXPluginParameters();
181
183 static AAX_CEffectParameters* AAX_CALLBACK Create();
184
186 virtual AAX_Result UpdateParameterNormalizedValue (AAX_CParamID iParameterID, double iValue, AAX_EUpdateSource iSource );
187
189 void AddSynchronizedParameter(const AAX_IParameter& inParameter);
190
191public:
192 // --- Overrides from AAX_CEffectParameters
193 virtual AAX_Result EffectInit() AAX_OVERRIDE;
194 virtual AAX_Result ResetFieldData (AAX_CFieldIndex inFieldIndex, void * oData, uint32_t iDataSize) const AAX_OVERRIDE;
195 virtual AAX_Result GenerateCoefficients() AAX_OVERRIDE;
196 virtual AAX_Result TimerWakeup() AAX_OVERRIDE;
197 AAX_Result GetParameterNormalizedValue (AAX_CParamID iParameterID, double * oValuePtr ) const AAX_OVERRIDE;
198
200 static void AAX_CALLBACK StaticRenderAudio(AAXAlgorithm* const inInstancesBegin[], const void* inInstancesEnd);
201
203 static AAX_Result StaticDescribe(AAX_IComponentDescriptor& outDesc);
204
206 virtual AAX_Result GetCustomData(AAX_CTypeID iDataBlockID, uint32_t iDataSize, void* oData, uint32_t* oDataWritten) const AAX_OVERRIDE;
207
209 void updateHostInfo(AAXAlgorithm* ioRenderInfo, HostInfo* hostInfo);
210
212 void ProcessAudio(AAXAlgorithm* ioRenderInfo, const TParamValPair* inSynchronizedParamValues[], int32_t inNumSynchronizedParamValues);
213
215 void UpdatePluginParameters(const TParamValPair* inSynchronizedParamValues[], int32_t inNumSynchronizedParamValues);
216
219
232 {
233 // Using 4x the preset queue size: the buffer must be large enough to accommodate the maximum
234 // number of updates that we expect to be queued between/before executions of the render callback.
235 // The maximum queuing that will likely ever occur is during a preset change (i.e. a call to
236 // SetChunk()), in which updates to all parameters may be queued in the same state frame. It is
237 // possible that the host would call SetChunk() on the plug-in more than once before the render
238 // callback executes, but probably not more than 2-3x. Therefore 4x seems like a safe upper limit
239 // for the capacity of this buffer.
240 static const int32_t sCap = 4*kSynchronizedParameterQueueSize;
241
242 TParamValPair* mElem[sCap];
243 int32_t mSize;
244
246 {
247 Clear();
248 }
249
250 void Add(TParamValPair* inElem)
251 {
252 AAX_ASSERT(sCap > mSize);
253 if (sCap > mSize)
254 {
255 mElem[mSize++] = inElem;
256 }
257 }
258
259 void Append(const SParamValList& inOther)
260 {
261 AAX_ASSERT(sCap >= mSize + inOther.mSize);
262 for (int32_t i = 0; i < inOther.mSize; ++i)
263 {
264 Add(inOther.mElem[i]);
265 }
266 }
267
268 void Append(const std::list<TParamValPair*>& inOther)
269 {
270 AAX_ASSERT(sCap >= mSize + (int64_t)inOther.size());
271 for (std::list<TParamValPair*>::const_iterator iter = inOther.begin(); iter != inOther.end(); ++iter)
272 {
273 Add(*iter);
274 }
275 }
276
277 void Merge(AAX_IPointerQueue<TParamValPair>& inOther)
278 {
279 do
280 {
281 TParamValPair* const val = inOther.Pop();
282 if (NULL == val) { break; }
283 Add(val);
284 } while (1);
285 }
286
287 void Clear()
288 {
289 std::memset(mElem, 0x0, sizeof(mElem));
290 mSize = 0;
291 }
292 };
293
294private:
295 // --- see AAX_CMonolithicParameters in SDK
296 // these are identically declared and used with the AAX_CMonolithicParameters sample code
297 // this is the AVID method of synchronizing the playback-head to the controls
298 typedef std::set<const AAX_IParameter*> TParamSet;
299 typedef std::pair<int64_t, std::list<TParamValPair*> > TNumberedParamStateList;
300 typedef AAX_CAtomicQueue<TNumberedParamStateList, 256> TNumberedStateListQueue;
301
302 typedef AAX_CAtomicQueue<const TParamValPair, 16*kSynchronizedParameterQueueSize> TParamValPairQueue;
303
304 SParamValList GetUpdatesForState(int64_t inTargetStateNum);
305 void DeleteUsedParameterChanges();
306 std::set<std::string> mSynchronizedParameters;
307 int64_t mStateCounter;
308 TParamSet mDirtyParameters;
309 TNumberedStateListQueue mQueuedParameterChanges;
310 TNumberedStateListQueue mFinishedParameterChanges;
311 TParamValPairQueue mFinishedParameterValues;
312 int64_t mCurrentStateNum;
313
314 // --- soft bypass flag
315 bool softBypass = false;
316
317 // --- plugin core and interfaces
318 PluginCore* pluginCore = nullptr;
319 GUIPluginConnector* guiPluginConnector = nullptr;
320 PluginHostConnector* pluginHostConnector = nullptr;
321 AAXMIDIEventQueue* midiEventQueue = nullptr;
322 AAX_CParameterManager mMeterParameterManager;
323
324 AAX_Result SetMeterParameterNormalizedValue (AAX_CParamID iParameterID, double aValue)
325 {
326 AAX_IParameter* parameter = mMeterParameterManager.GetParameterByID(iParameterID);
327 if (parameter == 0)
328 return AAX_ERROR_INVALID_PARAMETER_ID;
329
330 parameter->SetNormalizedValue ( aValue );
331 return AAX_SUCCESS;
332 }
333
335 uint32_t getChannelFormatForAAXStemFormat(AAX_EStemFormat format)
336 {
337 switch(format)
338 {
339 case AAX_eStemFormat_None: {
340 return kCFNone; }
341
342 case AAX_eStemFormat_Mono: {
343 return kCFMono; }
344
345 case AAX_eStemFormat_Stereo: {
346 return kCFStereo; }
347
348 case AAX_eStemFormat_LCR: {
349 return kCFLCR; }
350
351 case AAX_eStemFormat_LCRS: {
352 return kCFLCRS; }
353
354 case AAX_eStemFormat_Quad: {
355 return kCFQuad; }
356
357 case AAX_eStemFormat_5_0: {
358 return kCF5p0; }
359
360 case AAX_eStemFormat_5_1: {
361 return kCF5p1; }
362
363 case AAX_eStemFormat_6_0: {
364 return kCF6p0; }
365
366 case AAX_eStemFormat_6_1: {
367 return kCF6p1; }
368
369 case AAX_eStemFormat_7_0_SDDS: {
370 return kCF7p0Sony; }
371
372 case AAX_eStemFormat_7_0_DTS: {
373 return kCF7p0DTS; }
374
375 case AAX_eStemFormat_7_1_SDDS: {
376 return kCF7p1Sony; }
377
378 case AAX_eStemFormat_7_1_DTS: {
379 return kCF7p1DTS; }
380
381 case AAX_eStemFormat_7_1_2: {
382 return kCF7p1Proximity; }
383
384 default: {
385 return kCFNone; }
386 }
387 return kCFNone;
388 }
389
390#if defined _WINDOWS || defined _WINDLL
391 wchar_t* convertCharArrayToLPCWSTR(const char* charArray)
392 {
393 wchar_t* wString = new wchar_t[4096];
394 MultiByteToWideChar(CP_ACP, 0, charArray, -1, wString, 4096);
395 return wString;
396 }
397 // --- getMyDLLDirectory()
398 // returns the directory where the .component resides
399 char* getMyDLLDirectory(const char* dllName)
400 {
401 wchar_t* cPluginName = convertCharArrayToLPCWSTR(dllName);
402 HMODULE hmodule = GetModuleHandle(cPluginName);
403
404 TCHAR dir[MAX_PATH];
405 memset(&dir[0], 0, MAX_PATH*sizeof(TCHAR));
406 dir[MAX_PATH-1] = '\0';
407
408 if(hmodule)
409 GetModuleFileName(hmodule, &dir[0], MAX_PATH);
410 else
411 return nullptr;
412
413 // --- use string tools
414 std::wstring backslash(L"\\");
415 std::wstring strPlugin(cPluginName);
416 std::wstring strDir(&dir[0]);
417 int pathLen = strDir.size() - strPlugin.size() - backslash.size();
418 if (pathLen > 0)
419 {
420 std::wstring strPath = strDir.substr(0, pathLen);
421 char* str = new char[MAX_PATH];
422 sprintf(str, "%ls", strPath.c_str());
423 delete[] cPluginName;
424
425 return str; // dllPath.c_str();
426 }
427 return "";
428 }
429
430#else
431 char* getMyComponentDirectory(CFStringRef bundleID)
432 {
433 if (bundleID != nullptr)
434 {
435 CFBundleRef helixBundle = CFBundleGetBundleWithIdentifier( bundleID );
436 if(helixBundle != nullptr)
437 {
438 CFURLRef bundleURL = CFBundleCopyBundleURL ( helixBundle );
439 if(bundleURL != nullptr)
440 {
441 CFURLRef componentFolderPathURL = CFURLCreateCopyDeletingLastPathComponent(nullptr, bundleURL);
442
443 CFStringRef myComponentPath = CFURLCopyFileSystemPath(componentFolderPathURL, kCFURLPOSIXPathStyle);
444 CFRelease(componentFolderPathURL);
445
446 if(myComponentPath != nullptr)
447 {
448 int nSize = CFStringGetLength(myComponentPath);
449 char* path = new char[nSize+1];
450 memset(path, 0, (nSize+1)*sizeof(char));
451
452 bool success = CFStringGetCString(myComponentPath, path, nSize+1, kCFStringEncodingASCII);
453 CFRelease(myComponentPath);
454
455 if(success) return path;
456 else return nullptr;
457 }
458 CFRelease(bundleURL);
459 }
460 }
461 CFRelease(bundleID);
462 }
463 return nullptr;
464 }
465#endif
466};
467
480{
481public:
482 PluginHostConnector(AAX_IEffectParameters* _aaxParameters) {aaxParameters = _aaxParameters;}
483 virtual ~PluginHostConnector(){}
484
490 virtual void sendHostMessage(const HostMessageInfo& hostMessageInfo)
491 {
492 switch(hostMessageInfo.hostMessage)
493 {
494 case sendGUIUpdate:
495 {
496 GUIUpdateData guiUpdateData = hostMessageInfo.guiUpdateData;
497
498 for (uint32_t i = 0; i < guiUpdateData.guiParameters.size(); i++)
499 {
500 GUIParameter guiParam = guiUpdateData.guiParameters[i];
501
502 std::stringstream str;
503 str << guiParam.controlID + 1;
504 AAX_IParameter* oParameter;
505 AAX_Result result = aaxParameters->GetParameter(str.str().c_str(), &oParameter);
506 if(AAX_SUCCESS == result)
507 {
508 oParameter->SetValueWithDouble(guiParam.actualValue);
509 }
510 }
511
512 // --- clean up
513 for (uint32_t i = 0; i < guiUpdateData.guiParameters.size(); i++)
514 guiUpdateData.guiParameters.pop_back();
515
516 break;
517 }
518 default:
519 break;
520 }
521 }
522
523protected:
524 AAX_IEffectParameters* aaxParameters;
525};
526
527
540{
541public:
543 CustomViewController(ICustomView* _customViewIF) { customViewIF = _customViewIF; }
544 virtual ~CustomViewController() {}
545
547 virtual void updateView()
548 {
549 if (customViewIF)
550 customViewIF->updateView();
551 }
552
554 virtual void pushDataValue(double data)
555 {
556 if (customViewIF)
557 customViewIF->pushDataValue(data);
558 }
559
561 virtual void sendMessage(void* data)
562 {
563 if (customViewIF)
564 customViewIF->sendMessage(data);
565 }
566
568 void setCustomViewPtr(ICustomView* _customViewIF) { customViewIF = _customViewIF; }
569
571 const ICustomView* getCustomViewPtr() { return customViewIF; }
572
574 void clearCustomViewPtr() { customViewIF = nullptr; }
575
576
577private:
578 ICustomView* customViewIF = nullptr;
579};
580
600{
601public:
603 GUIPluginConnector(AAXPluginParameters* _aaxParameters, PluginCore* _pluginCore){pluginCore = _pluginCore; aaxParameters = _aaxParameters;}
604
607 {
608 for (customViewControllerMap::const_iterator it = customSubControllerMap.begin(), end = customSubControllerMap.end(); it != end; ++it)
609 {
610 delete it->second;
611 }
612 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
613 {
614 delete it->second;
615 }
616 }
617
619 virtual void parameterChanged(int32_t controlID, double actualValue, double /*normalizedValue*/)
620 {
621 if(pluginCore)
622 pluginCore->guiParameterChanged(controlID, actualValue);
623 }
624
626 virtual double getNormalizedPluginParameter(int32_t controlID)
627 {
628 //if(aaxParameters->)
629 // --- NOTE: this is the proper way for the GUI to get parameter values
630 std::stringstream str;
631 str << controlID + 1;
632 double param = 0.0;
633 AAX_Result result = aaxParameters->GetParameterNormalizedValue(str.str().c_str(), &param);
634 if(AAX_SUCCESS == result)
635 return param;
636
637 return 0.0;
638 }
639
641 virtual void setNormalizedPluginParameter(int32_t controlID, double value)
642 {
643 // --- NOTE: this is the proper way for the GUI to set parameter values
644 std::stringstream str;
645 str << controlID + 1;
646 aaxParameters->SetParameterNormalizedValue(str.str().c_str(), value);
647 }
648
650 virtual void beginParameterChangeGesture(int controlTag)
651 {
652 if(aaxParameters)
653 {
654 std::stringstream str;
655 str << controlTag+1;
656 aaxParameters->TouchParameter(str.str().c_str());
657 }
658 }
659
661 virtual void endParameterChangeGesture(int controlTag)
662 {
663 if(aaxParameters )
664 {
665 std::stringstream str;
666 str << controlTag+1;
667 aaxParameters->ReleaseParameter(str.str().c_str());
668 }
669 }
670
672 virtual bool registerSubcontroller(std::string subcontrollerName, ICustomView* customViewConnector)
673 {
674 // --- do we have this in our map already?
675 CustomViewController* pCVC = nullptr;
676
677 customViewControllerMap::const_iterator it = customSubControllerMap.find(subcontrollerName);
678 if (it != customSubControllerMap.end())
679 {
680 pCVC = it->second;
681 pCVC->setCustomViewPtr(customViewConnector);
682 }
683 else
684 {
685 pCVC = new CustomViewController(customViewConnector);
686 customSubControllerMap.insert(std::make_pair(subcontrollerName, pCVC));
687 }
688
689 MessageInfo info(PLUGINGUI_REGISTER_SUBCONTROLLER);
690 info.inMessageString = subcontrollerName;
691 info.inMessageData = pCVC;
692
694 return true;
695
696 return false;
697 }
698
700 virtual bool deRregisterSubcontroller(ICustomView* customViewConnector)
701 {
702 CustomViewController* pCVC = getCustomSubController(customViewConnector);
703 if (pCVC)
704 {
705 pCVC->clearCustomViewPtr();
706
707 MessageInfo info(PLUGINGUI_DE_REGISTER_SUBCONTROLLER);
708 info.inMessageString = "";
709 info.inMessageData = pCVC;
710
712 return true;
713 }
714
715 return false;
716 }
717
719 virtual bool registerCustomView(std::string customViewName, ICustomView* customViewConnector)
720 {
721 // --- do we have this in our map already?
722 CustomViewController* pCVC = nullptr;
723
724 customViewControllerMap::const_iterator it = customViewMap.find(customViewName);
725 if (it != customViewMap.end())
726 {
727 pCVC = it->second;
728 pCVC->setCustomViewPtr(customViewConnector);
729 }
730 else
731 {
732 pCVC = new CustomViewController(customViewConnector);
733 customViewMap.insert(std::make_pair(customViewName, pCVC));
734 }
735
736 MessageInfo info(PLUGINGUI_REGISTER_CUSTOMVIEW);
737 info.inMessageString = customViewName;
738 info.inMessageData = pCVC;
739
741 return true;
742
743 return false;
744 }
745
747 virtual bool deRegisterCustomView(ICustomView* customViewConnector)
748 {
749 CustomViewController* pCVC = getCustomViewController(customViewConnector);
750 if (pCVC)
751 {
752 // --- clear it
753 pCVC->clearCustomViewPtr();
754
755 MessageInfo info(PLUGINGUI_DE_REGISTER_CUSTOMVIEW);
756 info.inMessageString = "";
757 info.inMessageData = pCVC;
758
760 return true;
761 }
762
763 return false;
764 }
765
767 virtual bool guiDidOpen()
768 {
769 if(!pluginCore) return false;
770 MessageInfo info(PLUGINGUI_DIDOPEN);
771 return pluginCore->processMessage(info);
772 }
773
775 virtual bool guiWillClose()
776 {
777 if(!pluginCore) return false;
778
779 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
780 {
781 it->second->clearCustomViewPtr();
782 }
783 for (customViewControllerMap::const_iterator it = customSubControllerMap.begin(), end = customSubControllerMap.end(); it != end; ++it)
784 {
785 it->second->clearCustomViewPtr();
786 }
787
788 MessageInfo info(PLUGINGUI_WILLCLOSE);
789 return pluginCore->processMessage(info);
790 }
791
793 virtual bool guiTimerPing()
794 {
795 if(!pluginCore) return false;
796 MessageInfo info(PLUGINGUI_TIMERPING);
797 return pluginCore->processMessage(info);
798 }
799
801 virtual bool checkNonBoundValueChange(int tag, float normalizedValue)
802 {
803 if(!pluginCore) return false;
804
805 // --- do any additional stuff here
806 // --- dispatch non-bound value changes directly to receiver
807
808 return false;
809 }
810
811protected:
813// AAX_IEffectParameters* aaxParameters = nullptr; ///< the parent object
815
816 // --- this is for supporting the persistent interface pointer for the core object
817 // and is required by ASPiK Specifications
818 typedef std::map<std::string, CustomViewController*> customViewControllerMap;
819 customViewControllerMap customViewMap;
820
823 {
824 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
825 {
826 if (it->second->getCustomViewPtr() == customViewConnector)
827 return it->second;
828 }
829
830 return nullptr;
831 }
832
836 {
837 for (customViewControllerMap::const_iterator it = customSubControllerMap.begin(), end = customSubControllerMap.end(); it != end; ++it)
838 {
839 if (it->second->getCustomViewPtr() == customViewConnector)
840 return it->second;
841 }
842
843 return nullptr;
844 }
845};
846
864{
865public:
868 : ioPacketPtr(0),
870 {
871 pluginCore = _pluginCore;
872 };
873
874 virtual ~AAXMIDIEventQueue(){}
875
877 void setMIDIpackets(const AAX_CMidiPacket*& _ioPacketPtr, uint32_t& _midiBuffersize)
878 {
879 ioPacketPtr = _ioPacketPtr;
880 midiBuffersize = _midiBuffersize;
881
882 }
883
885 virtual unsigned int getEventCount()
886 {
887 return midiBuffersize;
888 }
889
891 virtual bool fireMidiEvents(unsigned int sampleOffset)
892 {
893 while( (midiBuffersize > 0) && (NULL != ioPacketPtr) && ((ioPacketPtr->mTimestamp <= sampleOffset)))
894 {
895 const uint8_t uMessage = (ioPacketPtr->mData[0] & 0xF0); // message
896 const uint8_t uChannel = (ioPacketPtr->mData[0] & 0x0F); // channel
897
898 midiEvent event;
899 event.midiMessage = (unsigned int)uMessage;
900 event.midiChannel = (unsigned int)uChannel;
901 event.midiData1 = (unsigned int)ioPacketPtr->mData[1];
902 event.midiData2 = (unsigned int)ioPacketPtr->mData[2];
903 event.midiSampleOffset = sampleOffset;
904
905 // --- send to core for processing
906 if(pluginCore)
908
909 ++ioPacketPtr;
911 }
912 return true;
913 }
914
915protected:
917 const AAX_CMidiPacket* ioPacketPtr;
918 uint32_t midiBuffersize = 0;
919};
920
921#endif
922
const unsigned int meterTapCount
number of gr meters (we've only ever seen one on any AVID surface/SW)
Definition: AAXPluginParameters.h:59
const AAX_CTypeID PLUGIN_CUSTOMDATA_ID
custom data parameter number (we only need one)
Definition: AAXPluginParameters.h:55
const AAX_CTypeID GR_MeterID
pro tools gr meter id
Definition: AAXPluginParameters.h:58
The AAXMIDIEventQueue interface queues incoming MIDI messages and blasts them out during the buffer p...
Definition: AAXPluginParameters.h:864
virtual bool fireMidiEvents(unsigned int sampleOffset)
Definition: AAXPluginParameters.h:891
AAXMIDIEventQueue(PluginCore *_pluginCore)
Definition: AAXPluginParameters.h:867
PluginCore * pluginCore
core
Definition: AAXPluginParameters.h:916
const AAX_CMidiPacket * ioPacketPtr
array of packets
Definition: AAXPluginParameters.h:917
void setMIDIpackets(const AAX_CMidiPacket *&_ioPacketPtr, uint32_t &_midiBuffersize)
Definition: AAXPluginParameters.h:877
virtual unsigned int getEventCount()
Definition: AAXPluginParameters.h:885
uint32_t midiBuffersize
midi buffer size for each bunch of packets
Definition: AAXPluginParameters.h:918
The AAXPluginParameters object implements the monolithic parameters AAX plugin programming paradigm w...
Definition: AAXPluginParameters.h:177
static AAX_CEffectParameters *AAX_CALLBACK Create()
creation mechanism for this object
Definition: AAXPluginParameters.cpp:59
virtual ~AAXPluginParameters()
object destructor; this destroys the ASPiK core and all of its required interfaces.
Definition: AAXPluginParameters.cpp:138
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:763
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:478
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:742
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:401
void updateHostInfo(AAXAlgorithm *ioRenderInfo, HostInfo *hostInfo)
called once per buffer process operation to set the host information structure for the core
Definition: AAXPluginParameters.cpp:434
virtual AAX_Result TimerWakeup() AAX_OVERRIDE
AAX Override.
Definition: AAXPluginParameters.cpp:906
virtual AAX_Result EffectInit() AAX_OVERRIDE
AAX Override.
Definition: AAXPluginParameters.cpp:185
virtual AAX_Result GenerateCoefficients() AAX_OVERRIDE
AAX Override.
Definition: AAXPluginParameters.cpp:696
virtual AAX_Result GetCustomData(AAX_CTypeID iDataBlockID, uint32_t iDataSize, void *oData, uint32_t *oDataWritten) const AAX_OVERRIDE
note the data that is transferred to GUI; the core is ONLY used for initialization and then it is unu...
Definition: AAXPluginParameters.cpp:159
AAX_Result GetParameterNormalizedValue(AAX_CParamID iParameterID, double *oValuePtr) const AAX_OVERRIDE
allows threadsafe getting of parameters for GUI; modified to differentiate beteen meters to prevent a...
Definition: AAXPluginParameters.cpp:924
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:597
AAXPluginParameters()
object constructor; this creates the ASPiK core and all of its required interfaces.
Definition: AAXPluginParameters.cpp:75
void updateOutboundAAXParameters()
threadsafe update of outbound parameters (meter variables) for GUI.
Definition: AAXPluginParameters.cpp:959
virtual AAX_Result ResetFieldData(AAX_CFieldIndex inFieldIndex, void *oData, uint32_t iDataSize) const AAX_OVERRIDE
AAX Override.
Definition: AAXPluginParameters.cpp:797
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:635
The CustomViewController is part of the safe ICustomView feature in ASPiK. The CustomViewController m...
Definition: AAXPluginParameters.h:540
virtual void pushDataValue(double data)
Definition: AAXPluginParameters.h:554
const ICustomView * getCustomViewPtr()
Definition: AAXPluginParameters.h:571
void setCustomViewPtr(ICustomView *_customViewIF)
Definition: AAXPluginParameters.h:568
CustomViewController(ICustomView *_customViewIF)
Definition: AAXPluginParameters.h:543
virtual void sendMessage(void *data)
Definition: AAXPluginParameters.h:561
virtual void updateView()
Definition: AAXPluginParameters.h:547
void clearCustomViewPtr()
Definition: AAXPluginParameters.h:574
The GUIPluginConnector interface creates a safe message mechanism for the GUI to issue requests to th...
Definition: AAXPluginParameters.h:600
virtual bool deRegisterCustomView(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:747
std::map< std::string, CustomViewController * > customViewControllerMap
map of custom view controllers
Definition: AAXPluginParameters.h:818
virtual void beginParameterChangeGesture(int controlTag)
Definition: AAXPluginParameters.h:650
AAXPluginParameters * aaxParameters
the parent object
Definition: AAXPluginParameters.h:814
virtual bool checkNonBoundValueChange(int tag, float normalizedValue)
Definition: AAXPluginParameters.h:801
virtual bool registerSubcontroller(std::string subcontrollerName, ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:672
GUIPluginConnector(AAXPluginParameters *_aaxParameters, PluginCore *_pluginCore)
Definition: AAXPluginParameters.h:603
virtual double getNormalizedPluginParameter(int32_t controlID)
Definition: AAXPluginParameters.h:626
virtual bool deRregisterSubcontroller(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:700
virtual bool guiWillClose()
Definition: AAXPluginParameters.h:775
virtual void parameterChanged(int32_t controlID, double actualValue, double)
Definition: AAXPluginParameters.h:619
virtual bool guiTimerPing()
Definition: AAXPluginParameters.h:793
CustomViewController * getCustomViewController(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:822
virtual ~GUIPluginConnector()
Definition: AAXPluginParameters.h:606
virtual void setNormalizedPluginParameter(int32_t controlID, double value)
Definition: AAXPluginParameters.h:641
customViewControllerMap customSubControllerMap
map of custom sub-controllers
Definition: AAXPluginParameters.h:833
CustomViewController * getCustomSubController(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:835
virtual bool guiDidOpen()
Definition: AAXPluginParameters.h:767
PluginCore * pluginCore
the core object
Definition: AAXPluginParameters.h:812
virtual void endParameterChangeGesture(int controlTag)
Definition: AAXPluginParameters.h:661
virtual bool registerCustomView(std::string customViewName, ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:719
Custom View interface to allow plugin core to create safe communication channels with GUI custom view...
Definition: pluginstructures.h:1462
virtual void updateView()=0
virtual void pushDataValue(double data)
Definition: pluginstructures.h:1472
virtual void sendMessage(void *data)
Definition: pluginstructures.h:1482
Custom interface so that GUI can pass information to plugin shell in a thread-safe manner.
Definition: pluginstructures.h:1540
Double buffered queue for MIDI messages.
Definition: pluginstructures.h:1628
Custom interface to send the plugin shell a message from plugin core.
Definition: pluginstructures.h:1610
The PluginCore object is the default PluginBase derived object for ASPiK projects....
Definition: plugincore.h:44
virtual bool guiParameterChanged(int32_t controlID, double actualValue)
has nothing to do with actual variable or updated variable (binding)
Definition: plugincore.cpp:517
virtual bool processMIDIEvent(midiEvent &event)
process a MIDI event
Definition: plugincore.cpp:606
virtual bool processMessage(MessageInfo &messageInfo)
For Custom View and Custom Sub-Controller Operations.
Definition: plugincore.cpp:546
The PluginHostConnector implements the IPluginHostConnector interface for the plugin shell object....
Definition: AAXPluginParameters.h:480
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:490
AAX_IEffectParameters * aaxParameters
parent parameters; lifelong existence
Definition: AAXPluginParameters.h:524
interface file for ASPiK custom control objects (knobs, buttons, meters, etc...)
#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:153
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:162
base class interface file for ASPiK plugincore object
Processing structure; this is described in detail in Designing Audio Effects in C++ 2nd Ed....
Definition: AAXPluginParameters.h:117
See AAX_CMonolithicParameters in SDK; this is part of the strict parameter synchronization in monolit...
Definition: AAXPluginParameters.h:232
Information that defines a single GUI parameter's possible values and ID.
Definition: pluginstructures.h:332
double actualValue
actual value
Definition: pluginstructures.h:353
uint32_t controlID
ID value.
Definition: pluginstructures.h:352
Information about a GUI update message; this is for sending GUI control information from the plugin c...
Definition: pluginstructures.h:444
std::vector< GUIParameter > guiParameters
list of updates
Definition: pluginstructures.h:461
Information from the host that is updated on each buffer process cycle; includes BPM,...
Definition: pluginstructures.h:974
Definition: pluginstructures.h:486
Information that includes the message code as well as the message data.
Definition: pluginstructures.h:706
void * inMessageData
incoming message data (interpretation depends on message)
Definition: pluginstructures.h:733
std::string inMessageString
incoming message data as a std::string (interpretation depends on message)
Definition: pluginstructures.h:736
Information about a MIDI event.
Definition: pluginstructures.h:562
uint32_t midiMessage
BYTE message as UINT.
Definition: pluginstructures.h:641
uint32_t midiData2
BYTE data 2 as UINT.
Definition: pluginstructures.h:644
Structure of data that is passed to GUI object once at creation time.
Definition: AAXPluginParameters.h:79
Back-pointer to the parameters; this is described in detail in Designing Audio Effects in C++ 2nd Ed....
Definition: AAXPluginParameters.h:98