ASPiK SDK
|
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...) More...
#include <plugincore.h>
Public Member Functions | |
PluginCore () | |
PluginCore constructor is launching pad for object initialization. | |
virtual | ~PluginCore () |
bool | initPluginParameters () |
create all of your plugin parameters here | |
virtual bool | reset (ResetInfo &resetInfo) |
initialize object for a new run of audio; called just before audio streams | |
virtual bool | initialize (PluginInfo &_pluginInfo) |
one-time initialize function called after object creation and before the first reset( ) call | |
virtual bool | preProcessAudioBuffers (ProcessBufferInfo &processInfo) |
do anything needed prior to arrival of audio buffers | |
virtual bool | processAudioFrame (ProcessFrameInfo &processFrameInfo) |
frame-processing method | |
virtual bool | preProcessAudioBlock (IMidiEventQueue *midiEventQueue=nullptr) |
pre-process the audio block | |
virtual bool | processAudioBlock (ProcessBlockInfo &processBlockInfo) |
block or buffer-processing method | |
virtual bool | postProcessAudioBuffers (ProcessBufferInfo &processInfo) |
do anything needed prior to arrival of audio buffers | |
virtual bool | updatePluginParameter (int32_t controlID, double controlValue, ParameterUpdateInfo ¶mInfo) |
update the PluginParameter's value based on GUI control, preset, or data smoothing (thread-safe) | |
virtual bool | updatePluginParameterNormalized (int32_t controlID, double normalizedValue, ParameterUpdateInfo ¶mInfo) |
update the PluginParameter's value based on normlaized GUI control, preset, or data smoothing (thread-safe) | |
virtual bool | postUpdatePluginParameter (int32_t controlID, double controlValue, ParameterUpdateInfo ¶mInfo) |
perform any operations after the plugin parameter has been updated; this is one paradigm for transferring control information into vital plugin variables or member objects. If you use this method you can decode the control ID and then do any cooking that is needed. NOTE: do not overwrite bound variables here - this is ONLY for any extra cooking that is required to convert the GUI data to meaninful coefficients or other specific modifiers. | |
virtual bool | guiParameterChanged (int32_t controlID, double actualValue) |
has nothing to do with actual variable or updated variable (binding) | |
virtual bool | processMessage (MessageInfo &messageInfo) |
For Custom View and Custom Sub-Controller Operations. | |
virtual bool | processMIDIEvent (midiEvent &event) |
process a MIDI event | |
virtual bool | setVectorJoystickParameters (const VectorJoystickData &vectorJoysickData) |
(for future use) | |
bool | initPluginPresets () |
use this method to add new presets to the list | |
bool | renderFXPassThrough (ProcessBlockInfo &blockInfo) |
Renders pass-through code as an example; replace with meaningful DSP for audio goodness. | |
bool | renderSynthSilence (ProcessBlockInfo &blockInfo) |
renders a block of silence (all 0.0 values) as an example your synth code would render the synth using the MIDI messages and output buffers | |
bool | initPluginDescriptors () |
setup the plugin description strings, flags and codes; this is ordinarily done through the ASPiKreator or CMake | |
void | sendHostTextMessage (std::string messageString) |
![]() | |
PluginBase () | |
PluginBase constructor. | |
virtual | ~PluginBase () |
PluginBase destructor. | |
virtual bool | processAudioFrame (ProcessFrameInfo &processFrameInfo)=0 |
virtual bool | updatePluginParameter (int32_t controlID, double controlValue, ParameterUpdateInfo ¶mInfo)=0 |
virtual bool | updatePluginParameterNormalized (int32_t controlID, double normalizedValue, ParameterUpdateInfo ¶mInfo)=0 |
virtual bool | postUpdatePluginParameter (int32_t controlID, double controlValue, ParameterUpdateInfo ¶mInfo)=0 |
virtual bool | preProcessAudioBuffers (ProcessBufferInfo &processInfo)=0 |
virtual bool | postProcessAudioBuffers (ProcessBufferInfo &processInfo)=0 |
virtual bool | reset (ResetInfo &resetInfo) |
initialize object for a new run of audio; called just before audio streams | |
virtual bool | initialize (PluginInfo &_pluginInfo) |
one-time initialize function called after object creation and before the first reset( ) call | |
void | syncInBoundVariables () |
initialize object for a new run of audio; called just before audio streams | |
virtual bool | processAudioBuffers (ProcessBufferInfo &processInfo) |
THE buffer processing function. | |
virtual bool | preProcessAudioBlock (IMidiEventQueue *midiEventQueue=nullptr) |
virtual bool | processAudioBlock (ProcessBlockInfo &processBlockInfo) |
bool | updateOutBoundVariables () |
copy newly updated metering variables into GUI parameters for display | |
virtual bool | guiParameterChanged (int32_t controlID, double actualValue) |
virtual bool | processMessage (MessageInfo &messageInfo) |
virtual bool | processMIDIEvent (midiEvent &event) |
bool | doVST3SAAUpdates () |
ONLY for VST3 plugins with sample accurate automation enabled. | |
bool | doParameterSmoothing () |
combines parameter smoothing and VST3 sample accurate updates | |
virtual bool | setVectorJoystickParameters (const VectorJoystickData &vectorJoysickData) |
int32_t | addPluginParameter (PluginParameter *piParam, double sampleRate=44100) |
adds a new plugin parameter to the parameter map | |
void | setParamAuxAttribute (uint32_t controlID, const AuxParameterAttribute &auxAttribute) |
adds an auxilliary attribute to the plugin parameter; you can have as many auxilliary attributes as you like for each parameter. | |
size_t | getPluginParameterCount () |
PluginParameter * | getPluginParameterByIndex (int32_t index) |
get a parameter by index location in vector or array | |
PluginParameter * | getPluginParameterByControlID (int32_t controlID) |
get a parameter by control ID - uses map (slowest) | |
PluginParameter * | getNextParameterOfType (int32_t &startIndex, controlVariableType controlType) |
get a parameter by type | |
double | getPIParamValueDouble (int32_t controlID) |
value-as-double | |
float | getPIParamValueFloat (int32_t controlID) |
value-as-float | |
int | getPIParamValueInt (int32_t controlID) |
value-as-int | |
uint32_t | getPIParamValueUInt (int32_t controlID) |
value-as-uint | |
bool | hasProToolsGRMeters () |
checks for at least one meter parameter that has the pro tools GR meter flag set | |
double | getProToolsGRValue () |
pro tools GR meter is only ever observed to be single meter; this merges all meter values for meters designated as Pro Tools meter | |
uint32_t | addSupportedIOCombination (ChannelIOConfig ioConfig) |
add a new I/O configuration pair | |
uint32_t | addSupportedAuxIOCombination (ChannelIOConfig ioConfig) |
add a new I/O configuration pair | |
uint32_t | getNumSupportedIOCombinations () |
get I/O channel pair count | |
bool | hasSupportedInputChannelFormat (uint32_t channelFormat) |
check to see if plugin support a given input channel format | |
bool | hasSupportedOutputChannelFormat (uint32_t channelFormat) |
check to see if plugin support a given output channel format | |
int32_t | getChannelInputFormat (uint32_t ioConfigIndex) |
get input cj | |
int32_t | getChannelOutputFormat (uint32_t ioConfigIndex) |
get I/O channel pair count | |
uint32_t | getInputChannelCount (uint32_t ioConfigIndex) |
get the number of input channels for a configuration at a given index | |
uint32_t | getOutputChannelCount (uint32_t ioConfigIndex) |
get the number of output channels for a configuration at a given index | |
uint32_t | getDefaultChannelIOConfigForChannelCount (uint32_t channelCount) |
get the configuration (e.g. kCFStereo) for a given channel count; mainly for AU that does not discriminate between formats with same channel counts (e.g. Sony 7.1 vs DTS 7.1 which have same channel count) | |
void | setPIParamValue (uint32_t _controlID, double _controlValue) |
set a parameter's value with the actual value (as double) | |
double | setPIParamValueNormalized (uint32_t _controlID, double _normalizedValue, bool applyTaper=true) |
set a parameter's value with the normalied value (as double) | |
bool | updatePIParamBoundValue (uint32_t _controlID) |
update a bound-variable with a parameter's control value; this is the essence of the variable binding operation | |
void | clearUpdateGUIParameters (std::vector< GUIParameter * > &guiParameters) |
delete GUI update structures in a list | |
std::vector< PluginParameter * > * | makePluginParameterVectorCopy (bool disableSmoothing=true) |
copies parameters into a new list; used to initialize the GUI - note that this makes true, disconnected copies | |
bool | initPresetParameters (std::vector< PresetParameter > &presetParameters, bool disableSmoothing=true) |
creates the preset parameter ID/Value pair PresetParameter objects and adds them to supplied list | |
bool | setPresetParameter (std::vector< PresetParameter > &presetParameters, uint32_t _controlID, double _controlValue) |
set a new value for a preset | |
void | setPluginHostConnector (IPluginHostConnector *_pluginHostConnector) |
store the plugin host interface pointer: this pointer will never go out of scope or be invalid once stored! | |
size_t | getPresetCount () |
get number of stored presets | |
const char * | getPresetName (uint32_t index) |
gets name as a const char* for connecting with all APIs at some level | |
size_t | addPreset (PresetInfo *preset) |
add a new preset | |
void | removePreset (uint32_t index) |
remove a preset - NOTE: does not delete object | |
void | removeAllPresets () |
remove all presets - NOTE: does not delete objects | |
PresetInfo * | getPreset (uint32_t index) |
get a preset | |
void | initPluginParameterArray () |
called at the end of the initialization phase, this function creates the various non map-versions of the parameter lists and initializes the parameters; this is the final step of construction | |
bool | compareSelectedString (int32_t controlID, const char *compareString) |
helper function to compare a PluginParameter's value with a string version of it | |
bool | hasSidechain () |
Description query: sidechain. | |
bool | wantsMIDI () |
Description query: MIDI. | |
bool | hasCustomGUI () |
Description query: has GUI. | |
double | getLatencyInSamples () |
Description query: latency. | |
double | getTailTimeInMSec () |
Description query: tail time. | |
bool | wantsInfiniteTailVST3 () |
Description query: infinite tail (VST3 only) | |
const char * | getPluginName () |
Description query: name. | |
const char * | getShortPluginName () |
Description query: short name (AAX) | |
const char * | getVendorName () |
Description query:vendor name. | |
uint32_t | getPluginType () |
Description query: plugin type. | |
double | getSampleRate () |
Description query: sample rate. | |
int | getFourCharCode () |
Description query: 4-char code. | |
const uint32_t | getAAXManufacturerID () |
Description query: AAX Man ID. | |
const uint32_t | getAAXProductID () |
Description query: AAX Prod ID. | |
const char * | getAAXBundleID () |
Description query: AAX Bundle ID. | |
const char * | getAAXEffectID () |
Description query: AAX Effect ID. | |
uint32_t | getAAXPluginCategory () |
Description query: AAX Category. | |
const char * | getVST3_FUID () |
Description query: VST3 FUID. | |
bool | wantsVST3SampleAccurateAutomation () |
Description query: VST Sample Accurate Automation. | |
uint32_t | getVST3SampleAccuracyGranularity () |
Description query: VST Sample Accurate Automation granularity. | |
const char * | getVST3BundleID () |
Description query: VST3 Bundle ID. | |
const char * | getAUBundleID () |
Description query: AU Bundle ID. | |
const char * | getAUBundleName () |
Description query: AU Bundle Name. | |
Static Public Member Functions | |
static const char * | getPluginBundleName () |
static const char * | getPluginName () |
static const char * | getShortPluginName () |
static const char * | getVendorName () |
static const char * | getVendorURL () |
static const char * | getVendorEmail () |
static const char * | getAUCocoaViewFactoryName () |
static pluginType | getPluginType () |
static const char * | getVSTFUID () |
static int32_t | getFourCharCode () |
Additional Inherited Members | |
![]() | |
typedef std::map< uint32_t, PluginParameter * > | pluginParameterControlIDMap |
map version of parameter list | |
![]() | |
PluginDescriptor | pluginDescriptor |
description strings | |
APISpecificInfo | apiSpecificInfo |
description strings, API specific | |
AudioProcDescriptor | audioProcDescriptor |
current audio processing description | |
PluginInfo | pluginInfo |
info about the DLL (component) itself, includes path to DLL | |
float | inputFrame [MAX_CHANNEL_COUNT] |
input array for frame processing | |
float | outputFrame [MAX_CHANNEL_COUNT] |
output array for frame processing | |
float | auxInputFrame [MAX_CHANNEL_COUNT] |
aux input array for frame processing | |
float | auxOutputFrame [MAX_CHANNEL_COUNT] |
aux output array for frame processing | |
ProcessBlockInfo | processBlockInfo |
PluginParameter ** | pluginParameterArray = nullptr |
old-fashioned C-arrays of pointers for ultra-fast access for real-time audio processing | |
uint32_t | numPluginParameters = 0 |
total number of parameters | |
PluginParameter ** | VSTSAAPluginParameters = nullptr |
old-fashioned C-arrays of pointers for smoothable parameters | |
uint32_t | numVSTSAAPluginParameters = 0 |
number of smoothable parameters only | |
PluginParameter ** | smoothingPluginParameters = nullptr |
old-fashioned C-arrays of pointers for smoothable parameters | |
uint32_t | numSmoothingPluginParameters = 0 |
number of smoothable parameters only | |
PluginParameter ** | outboundPluginParameters = nullptr |
old-fashioned C-arrays of pointers for outbound (meter) parameters | |
uint32_t | numOutboundPluginParameters = 0 |
total number of outbound (meter) parameters | |
std::vector< PluginParameter * > | pluginParameters |
vector version of parameter list | |
pluginParameterControlIDMap | pluginParameterMap |
member map of parameter list | |
IPluginHostConnector * | pluginHostConnector = nullptr |
created and destroyed on host | |
std::vector< PresetInfo * > | presets |
preset list | |
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...)
PluginCore Operations:
PluginCore::PluginCore | ( | ) |
PluginCore constructor is launching pad for object initialization.
Operations:
|
inlinevirtual |
Destructor: empty in default version
|
static |
static description: Cocoa View Factory Name
|
static |
static description: 4-char code
|
static |
static description: bundle folder name
|
static |
static description: name
|
static |
static description: plugin type
|
static |
static description: short name
|
static |
static description: email
|
static |
static description: vendor name
|
static |
static description: URL
|
static |
static description: VST3 GUID
|
virtual |
has nothing to do with actual variable or updated variable (binding)
this is ony called when the user makes a GUI control change
CAUTION:
WARNING:
controlID | the control ID value of the parameter being updated |
actualValue | the new control value |
not handled
Reimplemented from PluginBase.
|
virtual |
one-time initialize function called after object creation and before the first reset( ) call
one-time post creation init function; pluginInfo contains path to this plugin
Operation:
Reimplemented from PluginBase.
bool PluginCore::initPluginDescriptors | ( | ) |
setup the plugin description strings, flags and codes; this is ordinarily done through the ASPiKreator or CMake
initalizer
bool PluginCore::initPluginParameters | ( | ) |
create all of your plugin parameters here
this is the creation function for all plugin parameters
bool PluginCore::initPluginPresets | ( | ) |
use this method to add new presets to the list
create the presets
NOTES:
|
virtual |
do anything needed prior to arrival of audio buffers
This is the native buffer processing function; you may override and implement it if you want to roll your own buffer or block procssing code preProcess: do any post-buffer processing required; default operation is to send metering data to GUI
Operation:
processInfo | structure of information about buffer processing |
Implements PluginBase.
|
virtual |
perform any operations after the plugin parameter has been updated; this is one paradigm for transferring control information into vital plugin variables or member objects. If you use this method you can decode the control ID and then do any cooking that is needed. NOTE: do not overwrite bound variables here - this is ONLY for any extra cooking that is required to convert the GUI data to meaninful coefficients or other specific modifiers.
this can be called: 1) after bound variable has been updated or 2) after smoothing occurs
controlID | the control ID value of the parameter being updated |
controlValue | the new control value |
paramInfo | structure of information about why this value is being udpated (e.g as a result of a preset being loaded vs. the top of a buffer process cycle) |
Implements PluginBase.
|
virtual |
pre-process the audio block
Pre-process the block with: MIDI events for the block and parametet smoothing
Operation:
IMidiEventQueue | ASPIK event queue of MIDI events for the entire buffer; this function only fires the MIDI events for this audio block |
Reimplemented from PluginBase.
|
virtual |
do anything needed prior to arrival of audio buffers
preProcess: sync GUI parameters here; override if you don't want to use automatic variable-binding
Operation:
processInfo | structure of information about buffer processing |
Implements PluginBase.
|
virtual |
block or buffer-processing method
process sub-blocks of data (OPTIONAL MODE)
Operation:
processBlockInfo | structure of information about block processing |
Reimplemented from PluginBase.
|
virtual |
frame-processing method
process frames of data (DEFAULT MODE)
Operation:
processFrameInfo | structure of information about frame processing |
processed
processed
processed
processed
NOT processed
Implements PluginBase.
|
virtual |
For Custom View and Custom Sub-Controller Operations.
processMessage: messaging system; currently used for custom/special GUI operations
NOTES:
messageInfo | a structure containing information about the incoming message |
not handled
Reimplemented from PluginBase.
|
virtual |
process a MIDI event
processMIDIEvent: MIDI event processing
NOTES:
event | a structure containing the MIDI event data |
Reimplemented from PluginBase.
bool PluginCore::renderFXPassThrough | ( | ProcessBlockInfo & | blockInfo | ) |
Renders pass-through code as an example; replace with meaningful DSP for audio goodness.
FX EXAMPLE: process audio by passing through
Operation:
blockInfo | structure of information about block processing |
bool PluginCore::renderSynthSilence | ( | ProcessBlockInfo & | blockInfo | ) |
renders a block of silence (all 0.0 values) as an example your synth code would render the synth using the MIDI messages and output buffers
SYNTH EXAMPLE: render a block of silence
Operation:
blockInfo | structure of information about block processing |
|
virtual |
initialize object for a new run of audio; called just before audio streams
called when plugin is loaded, a new audio file is playing or sample rate changes
Operation:
resetInfo | structure of information about current audio format |
Reimplemented from PluginBase.
|
inline |
Status Window Messages for hosts that can show it
|
virtual |
(for future use)
specialized joystick servicing (currently not used)
NOTES:
vectorJoysickData | a structure containing joystick data |
Reimplemented from PluginBase.
|
virtual |
update the PluginParameter's value based on GUI control, preset, or data smoothing (thread-safe)
called by host plugin at top of buffer proccess; this alters parameters prior to variable binding operation
Operation:
controlID | the control ID value of the parameter being updated |
controlValue | the new control value |
paramInfo | structure of information about why this value is being udpated (e.g as a result of a preset being loaded vs. the top of a buffer process cycle) |
handled
Implements PluginBase.
|
virtual |
update the PluginParameter's value based on normlaized GUI control, preset, or data smoothing (thread-safe)
called by host plugin at top of buffer proccess; this alters parameters prior to variable binding operation
Operation:
controlID | the control ID value of the parameter being updated |
normalizedValue | the new control value in normalized form |
paramInfo | structure of information about why this value is being udpated (e.g as a result of a preset being loaded vs. the top of a buffer process cycle) |
handled
Implements PluginBase.