ASPiK SDK
Loading...
Searching...
No Matches
aufxplugin.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// ASPiK AU Shell File: aufxplugin.h
3//
17// -----------------------------------------------------------------------------
18#include <AudioToolbox/AudioUnitUtilities.h>
19#include "AudioUnitSDK/AUMIDIEffectBase.h" // For FX + MIDI
20#include "plugingui.h"
21#include "plugincore.h"
22#include <math.h>
23#include <queue>
24#include <string>
25
40// custom properties id's must be 64000 or greater
41// see <AudioUnit/AudioUnitProperties.h> for a list of Apple-defined standard properties
42//
43// --- These are for VSTGUI4 messaging - WP
45{
46 kOpenGUI = 64000,
47 kCloseGUI
48};
49
53
70class AUFXPlugin : public ausdk::AUMIDIEffectBase
71{
72public:
73 AUFXPlugin(AudioUnit component);
75
77 virtual OSStatus Version() {return 1000;}
78
80 virtual OSStatus Initialize() override;
81
83 virtual OSStatus GetPropertyInfo(AudioUnitPropertyID inID,
84 AudioUnitScope nScope,
85 AudioUnitElement inElement,
86 UInt32& outDataSize,
87 bool& outWritable ) override;
88
90 virtual OSStatus GetProperty(AudioUnitPropertyID inID,
91 AudioUnitScope inScope,
92 AudioUnitElement inElement,
93 void* outData ) override;
94
96 virtual OSStatus SetProperty(AudioUnitPropertyID inID,
97 AudioUnitScope inScope,
98 AudioUnitElement inElement,
99 const void* inData,
100 UInt32 inDataSize) override;
101
103 virtual OSStatus GetParameterInfo(AudioUnitScope inScope,
104 AudioUnitParameterID inParameterID,
105 AudioUnitParameterInfo &outParameterInfo ) override;
106
108 virtual OSStatus GetPresets(CFArrayRef* outData) const override;
109
111 virtual OSStatus NewFactoryPresetSet (const AUPreset& inNewFactoryPreset) override;
112
117 virtual bool SupportsTail() override
118 {
119 if(pluginCore)
120 return pluginCore->getTailTimeInMSec() > 0 ? true : false;
121
122 return false;
123 }
124
125 virtual Float64 GetTailTime() override
126 {
127 if(pluginCore)
128 return pluginCore->getTailTimeInMSec() / 1000.0;
129
130 return 0.0;
131 }
132
134 virtual Float64 GetLatency() override {return latencyInSeconds;}
135
136
138 virtual OSStatus SetParameter(AudioUnitParameterID inID,
139 AudioUnitScope inScope,
140 AudioUnitElement inElement,
141 AudioUnitParameterValue inValue,
142 UInt32 inBufferOffsetInFrames) override;
143
145 virtual OSStatus Render(AudioUnitRenderActionFlags & ioActionFlags,
146 const AudioTimeStamp & inTimeStamp,
147 UInt32 inNumberFrames) override;
148
149
151 virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags& ioActionFlags,
152 const AudioBufferList& inBuffer,
153 AudioBufferList& outBuffer,
154 UInt32 inFramesToProcess ) override;
155
157 virtual OSStatus Reset(AudioUnitScope inScope,
158 AudioUnitElement inElement) override;
159
161 virtual OSStatus GetParameterValueStrings(AudioUnitScope inScope,
162 AudioUnitParameterID inParameterID,
163 CFArrayRef* outStrings) override;
164
165 // --- need this for when user selects a NON factory-preset (ie they created the preset in the Client)
167 virtual OSStatus RestoreState(CFPropertyListRef inData) override;
169 virtual UInt32 SupportedNumChannels(const AUChannelInfo** outInfo) override;
170
171 // --- MIDI Functions
173 virtual OSStatus HandleNoteOn(UInt8 inChannel,
174 UInt8 inNoteNumber,
175 UInt8 inVelocity,
176 UInt32 inStartFrame) override;
177
179 virtual OSStatus HandleNoteOff(UInt8 inChannel,
180 UInt8 inNoteNumber,
181 UInt8 inVelocity,
182 UInt32 inStartFrame) override;
183
184 // --- MIDI Pitchbend (slightly different from all other CCs)
186 virtual OSStatus HandlePitchWheel(UInt8 inChannel,
187 UInt8 inPitch1,
188 UInt8 inPitch2,
189 UInt32 inStartFrame) override;
190
191 // --- all other MIDI CC messages
193 virtual OSStatus HandleControlChange(UInt8 inChannel,
194 UInt8 inController,
195 UInt8 inValue,
196 UInt32 inStartFrame) override;
197
198 // --- for ALL other MIDI messages you can get them here
200 OSStatus MIDIEvent(UInt32 inStatus, UInt32 inData1, UInt32 inData2, UInt32 inOffsetSampleFrame) override;
201
209 char* getMyComponentDirectory(CFStringRef bundleID)
210 {
211 if (bundleID != NULL)
212 {
213 CFBundleRef helixBundle = CFBundleGetBundleWithIdentifier( bundleID );
214 if(helixBundle != NULL)
215 {
216 CFURLRef bundleURL = CFBundleCopyBundleURL ( helixBundle );
217 if(bundleURL != NULL)
218 {
219 CFURLRef componentFolderPathURL = CFURLCreateCopyDeletingLastPathComponent(NULL, bundleURL);
220
221 CFStringRef myComponentPath = CFURLCopyFileSystemPath(componentFolderPathURL, kCFURLPOSIXPathStyle);
222 CFRelease(componentFolderPathURL);
223
224 if(myComponentPath != NULL)
225 {
226 int nSize = CFStringGetLength(myComponentPath);
227 char* path = new char[nSize+1];
228 memset(path, 0, (nSize+1)*sizeof(char));
229
230 bool success = CFStringGetCString(myComponentPath, path, nSize+1, kCFStringEncodingASCII);
231 CFRelease(myComponentPath);
232
233 if(success) return path;
234 else return NULL;
235 }
236 CFRelease(bundleURL);
237 }
238 }
239 CFRelease(bundleID);
240 }
241 return NULL;
242 }
243
250 void setAUParameterChangeEvent(unsigned int controlID, double actualValue);
251
259 double getAUParameter(unsigned int controlID);
260
264
265protected:
266 // --- Plugin Core
271 void updateHostInfo(HostInfo* hostInfo);
272
273 // --- sidechaining
274 bool hasSidechain = false;
275 AudioBufferList* sidechainBufferList = nullptr;
277 AUChannelInfo* auChannelInfo = nullptr;
278 float** inputBuffers = nullptr;
279 float** outputBuffers = nullptr;
280 float** sidechainInputBuffers = nullptr;
281
282 // --- raw bytes for "static" preset data
283 void* presetsArrayData = nullptr;
285
286 // --- NOTE: AU takes latency in seconds, not samples; this is recalculated
287 // during init() and reset() operations
288 Float64 latencyInSeconds = 0 ;
289
290
292 // It should NEVER be used to try to communicate
293 // directly with the GUI - not thread safe
294 VSTGUI::PluginGUI* pluginGUI = nullptr;
295};
296
309{
310public:
311 PluginHostConnector(AUFXPlugin* _auInstance){auInstance = _auInstance;}
312 virtual ~PluginHostConnector(){}
313
319 virtual void sendHostMessage(const HostMessageInfo& hostMessageInfo)
320 {
321 switch(hostMessageInfo.hostMessage)
322 {
323 case sendGUIUpdate:
324 {
325 GUIUpdateData guiUpdateData = hostMessageInfo.guiUpdateData;
326
327 for(int i = 0; i < guiUpdateData.guiParameters.size(); i++)
328 {
329 GUIParameter guiParam = guiUpdateData.guiParameters[i];
330
331 // --- threadsafe atomic write to global param & GUI update dispatch
333 }
334
335 // --- clean up
336 for(int i = 0; i < guiUpdateData.guiParameters.size(); i++)
337 guiUpdateData.guiParameters.pop_back();
338
339 break;
340 }
341 default:
342 break;
343 }
344 }
345
346protected:
348};
349
350// --- GUI -> Plugin interface
362//
363// --- container for a custom view pointer
365{
366public:
368 CustomViewController(ICustomView* _customViewIF) { customViewIF = _customViewIF; }
369 virtual ~CustomViewController() {}
370
372 virtual void updateView()
373 {
374 if (customViewIF)
375 customViewIF->updateView();
376 }
377
379 virtual void pushDataValue(double data)
380 {
381 if (customViewIF)
382 customViewIF->pushDataValue(data);
383 }
384
386 virtual void sendMessage(void* data)
387 {
388 if (customViewIF)
389 customViewIF->sendMessage(data);
390 }
391
393 void setCustomViewPtr(ICustomView* _customViewIF) { customViewIF = _customViewIF; }
394
396 const ICustomView* getCustomViewPtr() { return customViewIF; }
397
399 void clearCustomViewPtr() { customViewIF = nullptr; }
400
401
402private:
403 ICustomView* customViewIF = nullptr;
404};
405
406// --- GUI -> Plugin interface
426{
427public:
429 GUIPluginConnector(AUFXPlugin* _auInstance, PluginCore* _pluginCore){auInstance = _auInstance; pluginCore = _pluginCore;}
430
433 {
434 for (customViewControllerMap::const_iterator it = customSubControllerMap.begin(), end = customSubControllerMap.end(); it != end; ++it)
435 {
436 delete it->second;
437 }
438 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
439 {
440 delete it->second;
441 }
442 }
443
445 virtual void parameterChanged(int32_t controlID, double actualValue, double /*normalizedValue*/)
446 {
447 if(pluginCore)
448 pluginCore->guiParameterChanged(controlID, actualValue);
449 }
450
452 virtual double getActualPluginParameter(int32_t controlID)
453 {
455 if(piParam)
456 {
457 return auInstance->getAUParameter(controlID);
458 }
459 else
460 return 0.0;
461 }
462
464 virtual double getNormalizedPluginParameter(int32_t controlID)
465 {
467 {
469 if(piParam)
470 {
471 double actualValue = getActualPluginParameter(controlID);
472 return piParam->getNormalizedControlValueWithActualValue(actualValue);
473 }
474 }
475 return 0.0;
476 }
477
479 virtual bool registerSubcontroller(std::string subcontrollerName, ICustomView* customViewConnector)
480 {
481 // --- do we have this in our map already?
482 CustomViewController* pCVC = nullptr;
483
484 customViewControllerMap::const_iterator it = customSubControllerMap.find(subcontrollerName);
485 if (it != customSubControllerMap.end())
486 {
487 pCVC = it->second;
488 pCVC->setCustomViewPtr(customViewConnector);
489 }
490 else
491 {
492 pCVC = new CustomViewController(customViewConnector);
493 customSubControllerMap.insert(std::make_pair(subcontrollerName, pCVC));
494 }
495
496 MessageInfo info(PLUGINGUI_REGISTER_SUBCONTROLLER);
497 info.inMessageString = subcontrollerName;
498 info.inMessageData = pCVC;
499
501 return true;
502
503 return false;
504 }
505
507 virtual bool deRregisterSubcontroller(ICustomView* customViewConnector)
508 {
509 CustomViewController* pCVC = getCustomSubController(customViewConnector);
510 if (pCVC)
511 {
512 pCVC->clearCustomViewPtr();
513
514 MessageInfo info(PLUGINGUI_DE_REGISTER_SUBCONTROLLER);
515 info.inMessageString = "";
516 info.inMessageData = pCVC;
517
519 return true;
520 }
521
522 return false;
523 }
524
525
527 virtual bool registerCustomView(std::string customViewName, ICustomView* customViewConnector)
528 {
529 // --- do we have this in our map already?
530 CustomViewController* pCVC = nullptr;
531
532 customViewControllerMap::const_iterator it = customViewMap.find(customViewName);
533 if (it != customViewMap.end())
534 {
535 pCVC = it->second;
536 pCVC->setCustomViewPtr(customViewConnector);
537 }
538 else
539 {
540 pCVC = new CustomViewController(customViewConnector);
541 customViewMap.insert(std::make_pair(customViewName, pCVC));
542 }
543
544 MessageInfo info(PLUGINGUI_REGISTER_CUSTOMVIEW);
545 info.inMessageString = customViewName;
546 info.inMessageData = pCVC;
547
549 return true;
550
551 return false;
552 }
553
555 virtual bool deRegisterCustomView(ICustomView* customViewConnector)
556 {
557 CustomViewController* pCVC = getCustomViewController(customViewConnector);
558 if (pCVC)
559 {
560 // --- clear it
561 pCVC->clearCustomViewPtr();
562
563 MessageInfo info(PLUGINGUI_DE_REGISTER_CUSTOMVIEW);
564 info.inMessageString = "";
565 info.inMessageData = pCVC;
566
568 return true;
569 }
570
571 return false;
572 }
573
575 virtual bool guiDidOpen()
576 {
577 if(!pluginCore) return false;
578 MessageInfo info(PLUGINGUI_DIDOPEN);
579 return pluginCore->processMessage(info);
580 }
581
583 virtual bool guiWillClose()
584 {
585 if(!pluginCore) return false;
586
587 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
588 {
589 it->second->clearCustomViewPtr();
590 }
591 for (customViewControllerMap::const_iterator it = customSubControllerMap.begin(), end = customSubControllerMap.end(); it != end; ++it)
592 {
593 it->second->clearCustomViewPtr();
594 }
595
596 MessageInfo info(PLUGINGUI_WILLCLOSE);
597 return pluginCore->processMessage(info);
598 }
599
601 virtual bool guiTimerPing()
602 {
603 if(!pluginCore) return false;
604 MessageInfo info(PLUGINGUI_TIMERPING);
605 return pluginCore->processMessage(info);
606 }
607
609 virtual bool checkNonBoundValueChange(int tag, float normalizedValue)
610 {
611 if(!pluginCore) return false;
612
613 // --- do any additional stuff here
614 // --- dispatch non-bound value changes directly to receiver
615
616 return false;
617 }
618
619
620protected:
621 PluginCore* pluginCore = nullptr;
623
624 // --- this is for supporting the persistent interface pointer for the core object
625 // and is required by ASPiK Specifications
626 typedef std::map<std::string, CustomViewController*> customViewControllerMap;
627 customViewControllerMap customViewMap;
628
631 {
632 for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
633 {
634 if (it->second->getCustomViewPtr() == customViewConnector)
635 return it->second;
636 }
637
638 return nullptr;
639 }
640
642
645 {
646 for (customViewControllerMap::const_iterator it = customSubControllerMap.begin(), end = customSubControllerMap.end(); it != end; ++it)
647 {
648 if (it->second->getCustomViewPtr() == customViewConnector)
649 return it->second;
650 }
651
652 return nullptr;
653 }
654};
655
656// --- GUI -> Plugin interface
673{
674public:
675
678 {
679 pluginCore = _pluginCore;
680 writingQueueA.store(true);
681 };
682
685 {
686 clearEvents();
687 }
688
691 {
694 }
695
698 {
699 if(midiEventQueueA.size() > 0)
700 fprintf(stderr, "midiEventQueueA.size() > 0: %u", midiEventQueueA.size() > 0);
701
702 while(midiEventQueueA.size() > 0)
703 midiEventQueueA.pop();
704 }
705
708 {
709 if(midiEventQueueB.size() > 0)
710 fprintf(stderr, "midiEventQueueB.size() > 0: %u", midiEventQueueB.size() > 0);
711
712 while(midiEventQueueB.size() > 0)
713 midiEventQueueB.pop();
714 }
715
718 {
719 // --- toggle the atomic bool
721
722 // --- clear out write-queue (should never be non-empty)
723 if(writingQueueA)
725 else
727 }
728
730 inline void addEvent(midiEvent event)
731 {
732 if(writingQueueA)
733 {
734 midiEventQueueA.push(event);
735 // fprintf(stderr, "QA addEvent: %u", event.midiData1);
736 // fprintf(stderr, " with offset: %u\n", event.midiSampleOffset);
737
738 }
739 else
740 {
741 midiEventQueueB.push(event);
742 //fprintf(stderr, "QB addEvent: %u", event.midiData1);
743 // fprintf(stderr, " with offset: %u\n", event.midiSampleOffset);
744
745 }
746 }
747
749 virtual unsigned int getEventCount()
750 {
751 if(writingQueueA)
752 return midiEventQueueB.size();
753 else
754 return midiEventQueueA.size();
755 }
756
758 virtual bool fireMidiEvents(unsigned int sampleOffset)
759 {
760 std::queue<midiEvent>* readingQueue = writingQueueA ? &midiEventQueueB : &midiEventQueueA;
761
762 if(readingQueue->size() <= 0 || !pluginCore) return false;
763
764 while(readingQueue->size() > 0)
765 {
766 // --- check the current top
767 midiEvent event = readingQueue->front();
768 if(event.midiSampleOffset != sampleOffset) return false;
769
770 // fprintf(stderr, "fired MIDI Event: %u", event.midiData1);
771 // fprintf(stderr, " with offset: %u\n", event.midiSampleOffset);
772
773 // --- send to core for processing
774 if(pluginCore)
776
777 // --- pop to remove
778 readingQueue->pop();
779 }
780 return true;
781 }
782
783
784protected:
786 std::queue<midiEvent> midiEventQueueA;
787 std::queue<midiEvent> midiEventQueueB;
788 std::atomic<bool> writingQueueA;
789};
The AUFXPlugin is the ASPiK plugin shell for Audio Units plugin. It contains the plugin kernel and al...
Definition: aufxplugin.h:71
virtual OSStatus HandleNoteOn(UInt8 inChannel, UInt8 inNoteNumber, UInt8 inVelocity, UInt32 inStartFrame) override
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
Definition: aufxplugin.cpp:1091
virtual OSStatus GetParameterInfo(AudioUnitScope inScope, AudioUnitParameterID inParameterID, AudioUnitParameterInfo &outParameterInfo) override
get information about each AU parameter that was initialized
Definition: aufxplugin.cpp:670
int sidechainChannelCount
num sidechain channels
Definition: aufxplugin.h:276
virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags &ioActionFlags, const AudioBufferList &inBuffer, AudioBufferList &outBuffer, UInt32 inFramesToProcess) override
process the de-interleaved channel buffers
Definition: aufxplugin.cpp:506
float ** sidechainInputBuffers
de-interleaved incoming audio sidechain buffers
Definition: aufxplugin.h:280
int currentPreset
current preset's index value
Definition: aufxplugin.h:284
virtual OSStatus HandleNoteOff(UInt8 inChannel, UInt8 inNoteNumber, UInt8 inVelocity, UInt32 inStartFrame) override
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
Definition: aufxplugin.cpp:1111
Float64 latencyInSeconds
au latency (seconds!)
Definition: aufxplugin.h:288
virtual OSStatus GetPropertyInfo(AudioUnitPropertyID inID, AudioUnitScope nScope, AudioUnitElement inElement, UInt32 &outDataSize, bool &outWritable) override
queries from host about plugin properties
Definition: aufxplugin.cpp:775
~AUFXPlugin()
destructor for plugin object
Definition: aufxplugin.cpp:133
GUIPluginConnector * guiPluginConnector
GUI -> Plugin interface.
Definition: aufxplugin.h:261
AudioBufferList * sidechainBufferList
sidechain buffers (if active)
Definition: aufxplugin.h:275
virtual bool SupportsTail() override
Definition: aufxplugin.h:117
PluginCore * pluginCore
GUI the plugin core: alive for FULL lifecycle of shell.
Definition: aufxplugin.h:267
char * getMyComponentDirectory(CFStringRef bundleID)
helper function to get a path to the location where THIS library is loaded
Definition: aufxplugin.h:209
AUChannelInfo * auChannelInfo
the current channel information
Definition: aufxplugin.h:277
void * presetsArrayData
contiguous memory block for persistent preset data
Definition: aufxplugin.h:283
PluginHostConnector * pluginHostConnector
Plugin -> Host interface.
Definition: aufxplugin.h:262
virtual OSStatus NewFactoryPresetSet(const AUPreset &inNewFactoryPreset) override
user has selected a new preset
Definition: aufxplugin.cpp:1040
void updateAUParametersWithPluginCore()
send parameter update info (metering, output)
Definition: aufxplugin.cpp:417
double getAUParameter(unsigned int controlID)
safely get a parameter value
Definition: aufxplugin.cpp:346
virtual Float64 GetLatency() override
Definition: aufxplugin.h:134
OSStatus MIDIEvent(UInt32 inStatus, UInt32 inData1, UInt32 inData2, UInt32 inOffsetSampleFrame) override
specialized MIDI handler to add events to the plugin's queue
Definition: aufxplugin.cpp:1183
virtual OSStatus GetPresets(CFArrayRef *outData) const override
return a static array of preset information structures
Definition: aufxplugin.cpp:987
virtual OSStatus GetParameterValueStrings(AudioUnitScope inScope, AudioUnitParameterID inParameterID, CFArrayRef *outStrings) override
get parameter string-lists (for string-list params only)
Definition: aufxplugin.cpp:733
void setAUParameterChangeEvent(unsigned int controlID, double actualValue)
safely issue a parameter change event
Definition: aufxplugin.cpp:327
virtual OSStatus SetProperty(AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, const void *inData, UInt32 inDataSize) override
open and close the GUI object
Definition: aufxplugin.cpp:876
AUMIDIEventQueue * midiEventQueue
double-buffered-queue for MIDI messaging
Definition: aufxplugin.h:263
virtual OSStatus Render(AudioUnitRenderActionFlags &ioActionFlags, const AudioTimeStamp &inTimeStamp, UInt32 inNumberFrames) override
first function to be called during buffer process cycle
Definition: aufxplugin.cpp:446
virtual OSStatus RestoreState(CFPropertyListRef inData) override
called when a user preset is updated; may also be called during init; note the call sequence depends ...
Definition: aufxplugin.cpp:309
virtual OSStatus Initialize() override
the AU init function
Definition: aufxplugin.cpp:275
bool hasSidechain
sidechain flag
Definition: aufxplugin.h:274
virtual UInt32 SupportedNumChannels(const AUChannelInfo **outInfo) override
return an array of AUChannelInfo structures with input and output channel combinations
Definition: aufxplugin.cpp:237
virtual OSStatus Version()
Definition: aufxplugin.h:77
float ** outputBuffers
de-interleaved outgoing audio output buffers
Definition: aufxplugin.h:279
virtual OSStatus HandlePitchWheel(UInt8 inChannel, UInt8 inPitch1, UInt8 inPitch2, UInt32 inStartFrame) override
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
Definition: aufxplugin.cpp:1131
void updateHostInfo(HostInfo *hostInfo)
set the HostInfo for the core (varies by API)
Definition: aufxplugin.cpp:586
void initAUParametersWithPluginCore()
setup the AU parameter list with the plugin core's parameter list
Definition: aufxplugin.cpp:359
void updatePluginCoreParameters()
set the plugin core parameters from the AU parameters (called during each buffer process cycle)
Definition: aufxplugin.cpp:385
virtual OSStatus SetParameter(AudioUnitParameterID inID, AudioUnitScope inScope, AudioUnitElement inElement, AudioUnitParameterValue inValue, UInt32 inBufferOffsetInFrames) override
this just calls base class
Definition: aufxplugin.cpp:647
virtual OSStatus Reset(AudioUnitScope inScope, AudioUnitElement inElement) override
reset function for AU and core
Definition: aufxplugin.cpp:201
float ** inputBuffers
de-interleaved incoming audio input buffers
Definition: aufxplugin.h:278
virtual OSStatus HandleControlChange(UInt8 inChannel, UInt8 inController, UInt8 inValue, UInt32 inStartFrame) override
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
Definition: aufxplugin.cpp:1161
virtual OSStatus GetProperty(AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void *outData) override
queries from host to get property information
Definition: aufxplugin.cpp:826
The AUMIDIEventQueue interface queues incoming MIDI messages and blasts them out during the buffer pr...
Definition: aufxplugin.h:673
std::queue< midiEvent > midiEventQueueA
queue A
Definition: aufxplugin.h:786
void clearQueueAEvents()
Definition: aufxplugin.h:697
virtual unsigned int getEventCount()
Definition: aufxplugin.h:749
std::queue< midiEvent > midiEventQueueB
queue B
Definition: aufxplugin.h:787
AUMIDIEventQueue(PluginCore *_pluginCore)
Definition: aufxplugin.h:677
PluginCore * pluginCore
the core object to send MIDI messages to
Definition: aufxplugin.h:785
void clearQueueBEvents()
Definition: aufxplugin.h:707
virtual ~AUMIDIEventQueue()
Definition: aufxplugin.h:684
virtual bool fireMidiEvents(unsigned int sampleOffset)
Definition: aufxplugin.h:758
void toggleQueue()
Definition: aufxplugin.h:717
void clearEvents()
Definition: aufxplugin.h:690
void addEvent(midiEvent event)
Definition: aufxplugin.h:730
std::atomic< bool > writingQueueA
atomic flag for toggling buffers
Definition: aufxplugin.h:788
The CustomViewController is part of the safe ICustomView feature in ASPiK. The CustomViewController m...
Definition: AAXPluginParameters.h:540
virtual void pushDataValue(double data)
Definition: aufxplugin.h:379
const ICustomView * getCustomViewPtr()
Definition: aufxplugin.h:396
void setCustomViewPtr(ICustomView *_customViewIF)
Definition: aufxplugin.h:393
CustomViewController(ICustomView *_customViewIF)
Definition: aufxplugin.h:368
virtual void sendMessage(void *data)
Definition: aufxplugin.h:386
virtual void updateView()
Definition: aufxplugin.h:372
void clearCustomViewPtr()
Definition: aufxplugin.h:399
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: aufxplugin.h:555
GUIPluginConnector(AUFXPlugin *_auInstance, PluginCore *_pluginCore)
Definition: aufxplugin.h:429
std::map< std::string, CustomViewController * > customViewControllerMap
map of custom view controllers
Definition: aufxplugin.h:626
virtual bool checkNonBoundValueChange(int tag, float normalizedValue)
Definition: aufxplugin.h:609
virtual bool registerSubcontroller(std::string subcontrollerName, ICustomView *customViewConnector)
Definition: aufxplugin.h:479
virtual double getActualPluginParameter(int32_t controlID)
Definition: aufxplugin.h:452
virtual double getNormalizedPluginParameter(int32_t controlID)
Definition: aufxplugin.h:464
virtual bool deRregisterSubcontroller(ICustomView *customViewConnector)
Definition: aufxplugin.h:507
AUFXPlugin * auInstance
the AU plugin (NOTE this is not base-class)
Definition: aufxplugin.h:622
virtual bool guiWillClose()
Definition: aufxplugin.h:583
virtual void parameterChanged(int32_t controlID, double actualValue, double)
Definition: aufxplugin.h:445
virtual bool guiTimerPing()
Definition: aufxplugin.h:601
CustomViewController * getCustomViewController(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:822
virtual ~GUIPluginConnector()
Definition: aufxplugin.h:432
customViewControllerMap customSubControllerMap
map of custom sub-controllers
Definition: AAXPluginParameters.h:833
CustomViewController * getCustomSubController(ICustomView *customViewConnector)
Definition: AAXPluginParameters.h:835
virtual bool guiDidOpen()
Definition: aufxplugin.h:575
PluginCore * pluginCore
the core object
Definition: AAXPluginParameters.h:812
virtual bool registerCustomView(std::string customViewName, ICustomView *customViewConnector)
Definition: aufxplugin.h:527
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
PluginParameter * getPluginParameterByControlID(int32_t controlID)
get a parameter by control ID - uses map (slowest)
Definition: pluginbase.h:129
double getTailTimeInMSec()
Description query: tail time.
Definition: pluginbase.h:286
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: aufxplugin.h:319
AUFXPlugin * auInstance
our plugin object for setAUParameterChangeEvent()
Definition: aufxplugin.h:347
The PluginParameter object stores all of the data needed for any type of plugin parameter....
Definition: pluginparameter.h:52
double getNormalizedControlValueWithActualValue(double actualValue)
get the new normalized control value as if it were set with an actual value
Definition: pluginparameter.h:346
The PluginGUI object that maintains the entire GUI operation and has #defines to use with AAX,...
Definition: plugingui.h:441
guiMessage
Use this enum to send custom messages from the GUI to the AU plugin. This is the VSTGUI-approved mech...
Definition: aufxplugin.h:45
base class interface file for ASPiK plugincore object
interface file for ASPiK GUI object
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