ASPiK SDK
|
The AUSynthPlugin is the ASPiK plugin shell for Audio Units synth plugins. It contains the plugin kernel and all necessary intefaces, implemented as separate C++ obejcts. More...
#include <ausynthplugin.h>
Public Member Functions | |
AUSynthPlugin (AudioUnit component) | |
constructor for plugin object | |
~AUSynthPlugin () | |
destructor for plugin object | |
virtual OSStatus | Version () |
virtual OSStatus | Initialize () override |
the AU init function | |
virtual OSStatus | GetPropertyInfo (AudioUnitPropertyID inID, AudioUnitScope nScope, AudioUnitElement inElement, UInt32 &outDataSize, bool &outWritable) override |
queries from host about plugin properties | |
virtual OSStatus | GetProperty (AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, void *outData) override |
queries from host to get property information | |
virtual OSStatus | SetProperty (AudioUnitPropertyID inID, AudioUnitScope inScope, AudioUnitElement inElement, const void *inData, UInt32 inDataSize) override |
open and close the GUI object | |
virtual OSStatus | GetParameterInfo (AudioUnitScope inScope, AudioUnitParameterID inParameterID, AudioUnitParameterInfo &outParameterInfo) override |
get information about each AU parameter that was initialized | |
virtual OSStatus | GetPresets (CFArrayRef *outData) const override |
return a static array of preset information structures | |
virtual OSStatus | NewFactoryPresetSet (const AUPreset &inNewFactoryPreset) override |
user has selected a new preset | |
virtual bool | SupportsTail () override |
virtual Float64 | GetTailTime () override |
virtual Float64 | GetLatency () override |
virtual OSStatus | SetParameter (AudioUnitParameterID inID, AudioUnitScope inScope, AudioUnitElement inElement, AudioUnitParameterValue inValue, UInt32 inBufferOffsetInFrames) override |
this just calls base class | |
virtual OSStatus | Render (AudioUnitRenderActionFlags &ioActionFlags, const AudioTimeStamp &inTimeStamp, UInt32 inNumberFrames) override |
first function to be called during buffer process cycle | |
virtual OSStatus | Reset (AudioUnitScope inScope, AudioUnitElement inElement) override |
reset function for AU and core | |
virtual OSStatus | GetParameterValueStrings (AudioUnitScope inScope, AudioUnitParameterID inParameterID, CFArrayRef *outStrings) override |
get parameter string-lists (for string-list params only) | |
virtual OSStatus | RestoreState (CFPropertyListRef inData) override |
called when a user preset is updated; may also be called during init; note the call sequence depends on the host and AULab calls early init functions in a different order that Logic. | |
virtual UInt32 | SupportedNumChannels (const AUChannelInfo **outInfo) override |
return an array of AUChannelInfo structures with input and output channel combinations | |
virtual OSStatus | HandleNoteOn (UInt8 inChannel, UInt8 inNoteNumber, UInt8 inVelocity, UInt32 inStartFrame) override |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent | |
virtual OSStatus | HandleNoteOff (UInt8 inChannel, UInt8 inNoteNumber, UInt8 inVelocity, UInt32 inStartFrame) override |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent | |
virtual OSStatus | HandlePitchWheel (UInt8 inChannel, UInt8 inPitch1, UInt8 inPitch2, UInt32 inStartFrame) override |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent | |
virtual OSStatus | HandleControlChange (UInt8 inChannel, UInt8 inController, UInt8 inValue, UInt32 inStartFrame) override |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent | |
OSStatus | MIDIEvent (UInt32 inStatus, UInt32 inData1, UInt32 inData2, UInt32 inOffsetSampleFrame) override |
specialized MIDI handler to add events to the plugin's queue | |
bool | StreamFormatWritable (AudioUnitScope, AudioUnitElement) override |
bool | CanScheduleParameters () const override |
char * | getMyComponentDirectory (CFStringRef bundleID) |
helper function to get a path to the location where THIS library is loaded | |
void | setAUParameterChangeEvent (unsigned int controlID, double actualValue) |
safely issue a parameter change event | |
double | getAUParameter (unsigned int controlID) |
safely get a parameter value | |
Public Attributes | |
GUIPluginConnector * | guiPluginConnector = nullptr |
GUI -> Plugin interface. | |
PluginHostConnector * | pluginHostConnector = nullptr |
Plugin -> Host interface. | |
AUMIDIEventQueue * | midiEventQueue = nullptr |
double-buffered-queue for MIDI messaging | |
Protected Member Functions | |
void | initAUParametersWithPluginCore () |
setup the AU parameter list with the plugin core's parameter list | |
void | updateAUParametersWithPluginCore () |
send parameter update info (metering, output) | |
void | updatePluginCoreParameters () |
set the plugin core parameters from the AU parameters (called during each buffer process cycle) | |
void | updateHostInfo (HostInfo *hostInfo) |
set the HostInfo for the core (varies by API) | |
Protected Attributes | |
PluginCore * | pluginCore = nullptr |
GUI the plugin core: alive for FULL lifecycle of shell. | |
bool | hasSidechain = false |
sidechain flag | |
AudioBufferList * | sidechainBufferList = nullptr |
sidechain buffers (if active) | |
int | sidechainChannelCount = 0 |
num sidechain channels | |
AUChannelInfo * | auChannelInfo = nullptr |
the current channel information | |
float ** | inputBuffers = nullptr |
de-interleaved incoming audio input buffers | |
float ** | outputBuffers = nullptr |
de-interleaved outgoing audio output buffers | |
float ** | sidechainInputBuffers = nullptr |
de-interleaved incoming audio sidechain buffers | |
void * | presetsArrayData = nullptr |
contiguous memory block for persistent preset data | |
int | currentPreset = 0 |
current preset's index value | |
Float64 | latencyInSeconds = 0 |
au latency (seconds!) | |
VSTGUI::PluginGUI * | pluginGUI = nullptr |
The AUSynthPlugin is the ASPiK plugin shell for Audio Units synth plugins. It contains the plugin kernel and all necessary intefaces, implemented as separate C++ obejcts.
NOTES:
AUSynthPlugin::AUSynthPlugin | ( | AudioUnit | component | ) |
constructor for plugin object
NOTES:
AUSynthPlugin::~AUSynthPlugin | ( | ) |
destructor for plugin object
NOTES:
double AUSynthPlugin::getAUParameter | ( | unsigned int | controlID | ) |
safely get a parameter value
safely get an AU parameter's value
controlID | the AU parameter identifier (same as PluginParameter's controlID) |
controlID | the AU parameter ID value |
|
inlineoverridevirtual |
AU override method
|
inline |
helper function to get a path to the location where THIS library is loaded
bundleID | the bundle ID as a string |
|
overridevirtual |
get information about each AU parameter that was initialized
AU override method
NOTES:
|
overridevirtual |
get parameter string-lists (for string-list params only)
AU override method
NOTES:
|
overridevirtual |
return a static array of preset information structures
AU override method
NOTES:
|
overridevirtual |
queries from host to get property information
AU override method
NOTES:
|
overridevirtual |
queries from host about plugin properties
AU override method
NOTES:
|
overridevirtual |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
AU override method
NOTES:
|
overridevirtual |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
AU override method
NOTES:
|
overridevirtual |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
AU override method
NOTES:
|
overridevirtual |
specialized MIDI handler for only this message; CURRENTLY NOT USED, see HandleMidiEvent
AU override method
NOTES:
|
protected |
setup the AU parameter list with the plugin core's parameter list
set up all AU parameters at once using plugin core's parameters; performed only once
|
overridevirtual |
the AU init function
AU override method
NOTES:
|
override |
specialized MIDI handler to add events to the plugin's queue
AU override method
NOTES:
|
overridevirtual |
user has selected a new preset
AU override method
NOTES:
|
overridevirtual |
first function to be called during buffer process cycle
AU override method
NOTES:
|
overridevirtual |
reset function for AU and core
AU override method
NOTES:
|
overridevirtual |
called when a user preset is updated; may also be called during init; note the call sequence depends on the host and AULab calls early init functions in a different order that Logic.
AU override method
NOTES:
void AUSynthPlugin::setAUParameterChangeEvent | ( | unsigned int | controlID, |
double | actualValue | ||
) |
safely issue a parameter change event
safely set an AU parameter change event
controlID | the AU parameter identifier (same as PluginParameter's controlID) |
actualValue | the value to set |
NOTES:
|
overridevirtual |
this just calls base class
AU override method
NOTES:
|
overridevirtual |
open and close the GUI object
AU override method
NOTES:
|
overridevirtual |
return an array of AUChannelInfo structures with input and output channel combinations
AU override method
NOTES:
|
inlineoverridevirtual |
AU override method reply to host query
|
protected |
send parameter update info (metering, output)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
outoing transfer AU parameter changes (meter data) from the Core
|
protected |
|
protected |
set the plugin core parameters from the AU parameters (called during each buffer process cycle)
safely transfer AU parameter changes into the Core
|
inlinevirtual |
AU override method
|
protected |
au latency (seconds!)
VSTGUI4 Editor NOTE: this is only used to open and close the GUI