18#include <AudioToolbox/AudioUnitUtilities.h> 
   19#include "AudioUnitSDK/AUMIDIEffectBase.h"    
   84                                     AudioUnitScope         nScope,
 
   85                                     AudioUnitElement       inElement,
 
   87                                     bool&               outWritable ) 
override;
 
   90    virtual OSStatus 
GetProperty(AudioUnitPropertyID    inID,
 
   91                                 AudioUnitScope         inScope,
 
   92                                 AudioUnitElement       inElement,
 
   93                                 void*                  outData ) 
override;
 
   96    virtual OSStatus 
SetProperty(AudioUnitPropertyID inID,
 
   97                                 AudioUnitScope      inScope,
 
   98                                 AudioUnitElement    inElement,
 
  100                                 UInt32              inDataSize) 
override;
 
  104                                             AudioUnitParameterID   inParameterID,
 
  105                                             AudioUnitParameterInfo &outParameterInfo ) 
override;
 
  108    virtual OSStatus    
GetPresets(CFArrayRef* outData) 
const override;
 
  125    virtual Float64 GetTailTime()
 override 
  138    virtual OSStatus 
SetParameter(AudioUnitParameterID   inID,
 
  139                                         AudioUnitScope          inScope,
 
  140                                         AudioUnitElement        inElement,
 
  141                                         AudioUnitParameterValue inValue,
 
  142                                         UInt32                  inBufferOffsetInFrames) 
override;
 
  145    virtual OSStatus 
Render(AudioUnitRenderActionFlags &        ioActionFlags,
 
  146                            const AudioTimeStamp &              inTimeStamp,
 
  147                            UInt32                              inNumberFrames) 
override;
 
  152                                        const AudioBufferList&      inBuffer,
 
  153                                        AudioBufferList&            outBuffer,
 
  154                                        UInt32                      inFramesToProcess ) 
override;
 
  157    virtual OSStatus    
Reset(AudioUnitScope   inScope,
 
  158                                  AudioUnitElement inElement) 
override;
 
  162                                                     AudioUnitParameterID inParameterID,
 
  163                                                     CFArrayRef*          outStrings) 
override;
 
  167    virtual OSStatus    
RestoreState(CFPropertyListRef inData) 
override;
 
  176                                  UInt32    inStartFrame) 
override;
 
  182                                   UInt32   inStartFrame) 
override;
 
  189                                      UInt32 inStartFrame) 
override;
 
  196                                         UInt32 inStartFrame) 
override;
 
  200    OSStatus 
MIDIEvent(UInt32 inStatus, UInt32 inData1, UInt32 inData2, UInt32 inOffsetSampleFrame) 
override;
 
  211        if (bundleID != NULL)
 
  213            CFBundleRef helixBundle = CFBundleGetBundleWithIdentifier( bundleID );
 
  214            if(helixBundle != NULL)
 
  216                CFURLRef bundleURL = CFBundleCopyBundleURL ( helixBundle );
 
  217                if(bundleURL != NULL)
 
  219                    CFURLRef componentFolderPathURL = CFURLCreateCopyDeletingLastPathComponent(NULL, bundleURL);
 
  221                    CFStringRef myComponentPath = CFURLCopyFileSystemPath(componentFolderPathURL, kCFURLPOSIXPathStyle);
 
  222                    CFRelease(componentFolderPathURL);
 
  224                    if(myComponentPath != NULL)
 
  226                        int nSize = CFStringGetLength(myComponentPath);
 
  227                        char* path = 
new char[nSize+1];
 
  228                        memset(path, 0, (nSize+1)*
sizeof(
char));
 
  230                        bool success = CFStringGetCString(myComponentPath, path, nSize+1, kCFStringEncodingASCII);
 
  231                        CFRelease(myComponentPath);
 
  233                        if(success) 
return path;
 
  236                    CFRelease(bundleURL);
 
  321        switch(hostMessageInfo.hostMessage)
 
  438        for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
 
  496        MessageInfo info(PLUGINGUI_REGISTER_SUBCONTROLLER);
 
  514            MessageInfo info(PLUGINGUI_DE_REGISTER_SUBCONTROLLER);
 
  532        customViewControllerMap::const_iterator it = customViewMap.find(customViewName);
 
  533        if (it != customViewMap.end())
 
  541            customViewMap.insert(std::make_pair(customViewName, pCVC));
 
  563            MessageInfo info(PLUGINGUI_DE_REGISTER_CUSTOMVIEW);
 
  587        for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
 
  589            it->second->clearCustomViewPtr();
 
  593            it->second->clearCustomViewPtr();
 
  632        for (customViewControllerMap::const_iterator it = customViewMap.begin(), end = customViewMap.end(); it != end; ++it)
 
  634            if (it->second->getCustomViewPtr() == customViewConnector)
 
  648            if (it->second->getCustomViewPtr() == customViewConnector)
 
  700            fprintf(stderr, 
"midiEventQueueA.size() > 0: %u", 
midiEventQueueA.size() > 0);
 
  710            fprintf(stderr, 
"midiEventQueueB.size() > 0: %u", 
midiEventQueueB.size() > 0);
 
  762        if(readingQueue->size() <= 0 || !
pluginCore) 
return false;
 
  764        while(readingQueue->size() > 0)
 
  768            if(event.midiSampleOffset != sampleOffset) 
return false;
 
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