|
ASPiK SDK
|
The PluginBase object is the base class for the Plugin Core object. More...
#include <pluginbase.h>
Public Member Functions | |
| PluginBase () | |
| PluginBase constructor. More... | |
| virtual | ~PluginBase () |
| PluginBase destructor. More... | |
| 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 More... | |
| void | syncInBoundVariables () |
| initialize object for a new run of audio; called just before audio streams More... | |
| virtual bool | processAudioBuffers (ProcessBufferInfo &processInfo) |
| THE buffer processing function. More... | |
| bool | updateOutBoundVariables () |
| copy newly updated metering variables into GUI parameters for display More... | |
| virtual bool | guiParameterChanged (int32_t controlID, double actualValue) |
| virtual bool | processMessage (MessageInfo &messageInfo) |
| virtual bool | processMIDIEvent (midiEvent &event) |
| void | doSampleAccurateParameterUpdates () |
| combines parameter smoothing and VST3 sample accurate updates More... | |
| virtual bool | setVectorJoystickParameters (const VectorJoystickData &vectorJoysickData) |
| int32_t | addPluginParameter (PluginParameter *piParam, double sampleRate=44100) |
| adds a new plugin parameter to the parameter map More... | |
| 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. More... | |
| size_t | getPluginParameterCount () |
| PluginParameter * | getPluginParameterByIndex (int32_t index) |
| get a parameter by index location in vector or array More... | |
| PluginParameter * | getPluginParameterByControlID (int32_t controlID) |
| get a parameter by control ID - uses map (slowest) More... | |
| PluginParameter * | getNextParameterOfType (int32_t &startIndex, controlVariableType controlType) |
| get a parameter by type More... | |
| double | getPIParamValueDouble (int32_t controlID) |
| value-as-double More... | |
| float | getPIParamValueFloat (int32_t controlID) |
| value-as-float More... | |
| int | getPIParamValueInt (int32_t controlID) |
| value-as-int More... | |
| uint32_t | getPIParamValueUInt (int32_t controlID) |
| value-as-uint More... | |
| bool | hasProToolsGRMeters () |
| checks for at least one meter parameter that has the pro tools GR meter flag set More... | |
| 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 More... | |
| uint32_t | addSupportedIOCombination (ChannelIOConfig ioConfig) |
| add a new I/O configuration pair More... | |
| uint32_t | addSupportedAuxIOCombination (ChannelIOConfig ioConfig) |
| add a new I/O configuration pair More... | |
| uint32_t | getNumSupportedIOCombinations () |
| get I/O channel pair count More... | |
| bool | hasSupportedInputChannelFormat (uint32_t channelFormat) |
| check to see if plugin support a given input channel format More... | |
| bool | hasSupportedOutputChannelFormat (uint32_t channelFormat) |
| check to see if plugin support a given output channel format More... | |
| int32_t | getChannelInputFormat (uint32_t ioConfigIndex) |
| get input cj More... | |
| int32_t | getChannelOutputFormat (uint32_t ioConfigIndex) |
| get I/O channel pair count More... | |
| uint32_t | getInputChannelCount (uint32_t ioConfigIndex) |
| get the number of input channels for a configuration at a given index More... | |
| uint32_t | getOutputChannelCount (uint32_t ioConfigIndex) |
| get the number of output channels for a configuration at a given index More... | |
| 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) More... | |
| void | setPIParamValue (uint32_t _controlID, double _controlValue) |
| set a parameter's value with the actual value (as double) More... | |
| double | setPIParamValueNormalized (uint32_t _controlID, double _normalizedValue, bool applyTaper=true) |
| set a parameter's value with the normalied value (as double) More... | |
| bool | updatePIParamBoundValue (uint32_t _controlID) |
| update a bound-variable with a parameter's control value; this is the essence of the variable binding operation More... | |
| void | clearUpdateGUIParameters (std::vector< GUIParameter *> &guiParameters) |
| delete GUI update structures in a list More... | |
| 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 More... | |
| bool | initPresetParameters (std::vector< PresetParameter > &presetParameters, bool disableSmoothing=true) |
| creates the preset parameter ID/Value pair PresetParameter objects and adds them to supplied list More... | |
| bool | setPresetParameter (std::vector< PresetParameter > &presetParameters, uint32_t _controlID, double _controlValue) |
| set a new value for a preset More... | |
| void | setPluginHostConnector (IPluginHostConnector *_pluginHostConnector) |
| store the plugin host interface pointer: this pointer will never go out of scope or be invalid once stored! More... | |
| size_t | getPresetCount () |
| get number of stored presets More... | |
| const char * | getPresetName (uint32_t index) |
| gets name as a const char* for connecting with all APIs at some level More... | |
| size_t | addPreset (PresetInfo *preset) |
| add a new preset More... | |
| void | removePreset (uint32_t index) |
| remove a preset - NOTE: does not delete object More... | |
| void | removeAllPresets () |
| remove all presets - NOTE: does not delete objects More... | |
| PresetInfo * | getPreset (uint32_t index) |
| get a preset More... | |
| 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 More... | |
| bool | compareSelectedString (int32_t controlID, const char *compareString) |
| helper function to compare a PluginParameter's value with a string version of it More... | |
| bool | hasSidechain () |
| Description query: sidechain. More... | |
| bool | wantsMIDI () |
| Description query: MIDI. More... | |
| bool | hasCustomGUI () |
| Description query: has GUI. More... | |
| double | getLatencyInSamples () |
| Description query: latency. More... | |
| double | getTailTimeInMSec () |
| Description query: tail time. More... | |
| bool | wantsInfiniteTailVST3 () |
| Description query: infinite tail (VST3 only) More... | |
| const char * | getPluginName () |
| Description query: name. More... | |
| const char * | getShortPluginName () |
| Description query: short name (AAX) More... | |
| const char * | getVendorName () |
| Description query:vendor name. More... | |
| uint32_t | getPluginType () |
| Description query: plugin type. More... | |
| double | getSampleRate () |
| Description query: sample rate. More... | |
| int | getFourCharCode () |
| Description query: 4-char code. More... | |
| const uint32_t | getAAXManufacturerID () |
| Description query: AAX Man ID. More... | |
| const uint32_t | getAAXProductID () |
| Description query: AAX Prod ID. More... | |
| const char * | getAAXBundleID () |
| Description query: AAX Bundle ID. More... | |
| const char * | getAAXEffectID () |
| Description query: AAX Effect ID. More... | |
| uint32_t | getAAXPluginCategory () |
| Description query: AAX Category. More... | |
| const char * | getVST3_FUID () |
| Description query: VST3 FUID. More... | |
| bool | wantsVST3SampleAccurateAutomation () |
| Description query: VST Sample Accurate Automation. More... | |
| uint32_t | getVST3SampleAccuracyGranularity () |
| Description query: VST Sample Accurate Automation granularity. More... | |
| const char * | getVST3BundleID () |
| Description query: VST3 Bundle ID. More... | |
| const char * | getAUBundleID () |
| Description query: AU Bundle ID. More... | |
| const char * | getAUBundleName () |
| Description query: AU Bundle Name. More... | |
Protected Types | |
| typedef std::map< uint32_t, PluginParameter * > | pluginParameterControlIDMap |
| map version of parameter list | |
Protected Attributes | |
| PluginDescriptor | pluginDescriptor |
| description strings | |
| APISpecificInfo | apiSpecificInfo |
| description strings, API specific | |
| AudioProcDescriptor | audioProcDescriptor |
| current audio processing description | |
| 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 | |
| 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 ** | smoothablePluginParameters = nullptr |
| old-fashioned C-arrays of pointers for smoothable parameters | |
| uint32_t | numSmoothablePluginParameters = 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 PluginBase object is the base class for the Plugin Core object.
PluginBase Operations:
| PluginBase::PluginBase | ( | ) |
PluginBase constructor.
Operation:
|
virtual |
PluginBase destructor.
Operation:
| int32_t PluginBase::addPluginParameter | ( | PluginParameter * | piParam, |
| double | sampleRate = 44100 |
||
| ) |
adds a new plugin parameter to the parameter map
helper function to add a new plugin parameter to the variety of lists
NOTE:
| piParam | pointer to a newly created plugin parameter |
| sampleRate | the sample rate, needed to initialize the smoother |
| size_t PluginBase::addPreset | ( | PresetInfo * | preset | ) |
add a new preset
add preset
| preset | a PresetInfo strucutre that describes the preset |
| uint32_t PluginBase::addSupportedAuxIOCombination | ( | ChannelIOConfig | ioConfig | ) |
add a new I/O configuration pair
helper to easily add new Aux (sidechain) I/O combination
| ioConfig | structure containing one aux input/output channel pair |
| uint32_t PluginBase::addSupportedIOCombination | ( | ChannelIOConfig | ioConfig | ) |
add a new I/O configuration pair
helper to easily add new I/O combination
| ioConfig | structure containing one input/output channel pair |
| void PluginBase::clearUpdateGUIParameters | ( | std::vector< GUIParameter *> & | guiParameters | ) |
delete GUI update structures in a list
clears the current cache of GUI parameters for updating (this is part of the GUI update messaging and NOT part of variable binding)
| guiParameters | the list to clear |
| bool PluginBase::compareSelectedString | ( | int32_t | controlID, |
| const char * | compareString | ||
| ) |
helper function to compare a PluginParameter's value with a string version of it
compare param value as string
| controlID | the control ID of the parameter to test |
| compareString | the string to test against the parameter's value (as string) |
| void PluginBase::doSampleAccurateParameterUpdates | ( | ) |
combines parameter smoothing and VST3 sample accurate updates
perform parameter smoothing or VST3 sample accurate upates
NOTE:
false = this is NOT called from smoothing operation, true: this is a VST sample accurate update
true = this is called from smoothing operation, false = NOT VST sample accurate update
|
inline |
Description query: AAX Bundle ID.
|
inline |
Description query: AAX Effect ID.
|
inline |
Description query: AAX Man ID.
|
inline |
Description query: AAX Category.
|
inline |
Description query: AAX Prod ID.
|
inline |
Description query: AU Bundle ID.
|
inline |
Description query: AU Bundle Name.
|
inline |
get input cj
|
inline |
get I/O channel pair count
|
inline |
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)
| channelCount | number of channels (e.g. 2) |
|
inline |
Description query: 4-char code.
| uint32_t PluginBase::getInputChannelCount | ( | uint32_t | ioConfigIndex | ) |
get the number of input channels for a configuration at a given index
query input channels
| ioConfigIndex | of the configuration in our list |
|
inline |
Description query: latency.
| PluginParameter * PluginBase::getNextParameterOfType | ( | int32_t & | startIndex, |
| controlVariableType | controlType | ||
| ) |
get a parameter by type
get a parameter by type - used to find all meter variables for writing to GUI
| startIndex | current start index in array (vector or old-fashioned C-array) |
| controlType | type of linked variable (float, double, meter,...) |
|
inline |
get I/O channel pair count
| uint32_t PluginBase::getOutputChannelCount | ( | uint32_t | ioConfigIndex | ) |
get the number of output channels for a configuration at a given index
query output channels
| ioConfigIndex | of the configuration in our list |
| double PluginBase::getPIParamValueDouble | ( | int32_t | controlID | ) |
value-as-double
get a parameter's variable as double
| controlID | control ID of parameter |
| float PluginBase::getPIParamValueFloat | ( | int32_t | controlID | ) |
value-as-float
get a parameter's variable as float
| controlID | control ID of parameter |
| int PluginBase::getPIParamValueInt | ( | int32_t | controlID | ) |
value-as-int
get a parameter's variable as int
| controlID | control ID of parameter |
| uint32_t PluginBase::getPIParamValueUInt | ( | int32_t | controlID | ) |
value-as-uint
get a parameter's variable as UINT
| controlID | control ID of parameter |
|
inline |
Description query: name.
|
inline |
get a parameter by control ID - uses map (slowest)
| controlID | the control ID of the parameter |
|
inline |
get a parameter by index location in vector or array
| index | the index in the array |
|
inline |
returns number of parameters in our list
|
inline |
Description query: plugin type.
| PresetInfo * PluginBase::getPreset | ( | uint32_t | index | ) |
get a preset
get a preset pointner
|
inline |
get number of stored presets
| const char * PluginBase::getPresetName | ( | uint32_t | index | ) |
gets name as a const char* for connecting with all APIs at some level
get preset name
| index | index of preset |
| double PluginBase::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
query for Pro Tools meter value
|
inline |
Description query: sample rate.
|
inline |
Description query: short name (AAX)
|
inline |
Description query: tail time.
|
inline |
Description query:vendor name.
|
inline |
Description query: VST3 FUID.
|
inline |
Description query: VST3 Bundle ID.
|
inline |
Description query: VST Sample Accurate Automation granularity.
|
inlinevirtual |
notification that a GUI parameter changed. NOT for updating internal states or variables; unused at base class level
Reimplemented in PluginCore.
|
inline |
Description query: has GUI.
| bool PluginBase::hasProToolsGRMeters | ( | ) |
checks for at least one meter parameter that has the pro tools GR meter flag set
query for Pro Tools meter
|
inline |
Description query: sidechain.
| bool PluginBase::hasSupportedInputChannelFormat | ( | uint32_t | channelFormat | ) |
check to see if plugin support a given input channel format
query input format
| channelFormat | the format to test (e.g. kCFStereo) |
| bool PluginBase::hasSupportedOutputChannelFormat | ( | uint32_t | channelFormat | ) |
check to see if plugin support a given output channel format
query output format
| channelFormat | the format to test (e.g. kCFStereo) |
| void PluginBase::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
prepare all parameter lists
| bool PluginBase::initPresetParameters | ( | std::vector< PresetParameter > & | presetParameters, |
| bool | disableSmoothing = true |
||
| ) |
creates the preset parameter ID/Value pair PresetParameter objects and adds them to supplied list
setup the preset list
| presetParameters | list to add presets to |
| disableSmoothing | turn off smoothing (reserved for future use) |
| std::vector< PluginParameter * > * PluginBase::makePluginParameterVectorCopy | ( | bool | disableSmoothing = true | ) |
copies parameters into a new list; used to initialize the GUI - note that this makes true, disconnected copies
copies the current plugin list into another list
| disableSmoothing | turn off smoothing in copied parameters |
|
pure virtual |
pure virtual function: do any extra work that requires the buffer to be completely processed first
Implemented in PluginCore.
|
pure virtual |
pure virtual function: do any post-update processing (cooking) of data
Implemented in PluginCore.
|
pure virtual |
pure virtual function: do any last preparation for arrival of fresh audio buffers
Implemented in PluginCore.
|
virtual |
THE buffer processing function.
Buffer Proc Cycle: II PluginCore overrides this method to process frames
Operation:
| processBufferInfo | - a structure of information about the current buffer to process; includes information from host (BPM, etc...) |
processed
processed
|
pure virtual |
pure virtual function: process one frame of audio
Implemented in PluginCore.
|
inlinevirtual |
ASPiK messaging system: base class implementation is empty
Reimplemented in PluginCore.
|
inlinevirtual |
ASPiK midi event system: base class implementation is empty
Reimplemented in PluginCore.
| void PluginBase::removeAllPresets | ( | ) |
remove all presets - NOTE: does not delete objects
remove all presets
| void PluginBase::removePreset | ( | uint32_t | index | ) |
remove a preset - NOTE: does not delete object
remove preset
| index | index of preset to remove |
|
virtual |
initialize object for a new run of audio; called just before audio streams
rest the object to it's preferred initial state
Operation:
Reimplemented in PluginCore.
| void PluginBase::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.
helper function to add auxilliary data to a PluginParameter (SUPER useful way to stash all kinds of data on the parameter object!)
| controlID | control ID value of the parameter |
| auxAttribute | a structure of information to store |
| void PluginBase::setPIParamValue | ( | uint32_t | _controlID, |
| double | _controlValue | ||
| ) |
set a parameter's value with the actual value (as double)
set value
| _controlID | control ID of the parameter |
| _controlValue | the new value to set on the parameter |
not handled
| double PluginBase::setPIParamValueNormalized | ( | uint32_t | _controlID, |
| double | _normalizedValue, | ||
| bool | applyTaper = true |
||
| ) |
set a parameter's value with the normalied value (as double)
sest normalized
| _controlID | control ID of the parameter |
| _normalizedValue | the new normalized value to set on the parameter |
| applyTaper | add the tapering during application (not used in all situations) |
not handled
|
inline |
store the plugin host interface pointer: this pointer will never go out of scope or be invalid once stored!
| _pluginHostConnector | the interface pointer |
| bool PluginBase::setPresetParameter | ( | std::vector< PresetParameter > & | presetParameters, |
| uint32_t | _controlID, | ||
| double | _controlValue | ||
| ) |
set a new value for a preset
set an individual preset
| presetParameters | list of presets |
| _controlID | control ID of parameter to set |
| _controlValue | the new preset control value |
|
inlinevirtual |
only for a vector joystick control from DAW that implements it (reserved for future use): base class implementation is empty
Reimplemented in PluginCore.
| void PluginBase::syncInBoundVariables | ( | ) |
initialize object for a new run of audio; called just before audio streams
Buffer Proc Cycle: I connects GUI control changes to bound variables (part of ASPiK input variable binding option)
Operation:
| bool PluginBase::updateOutBoundVariables | ( | ) |
copy newly updated metering variables into GUI parameters for display
Buffer Proc Cycle: III connects meter variables to outbound GUI control changes (part of ASPiK output variable binding option)
Operation:
| bool PluginBase::updatePIParamBoundValue | ( | uint32_t | _controlID | ) |
update a bound-variable with a parameter's control value; this is the essence of the variable binding operation
perform variable binding at parameter level
| _controlID | control ID of the parameter |
not handled
|
pure virtual |
pure virtual function: update the plugin parameter using GUI control value (thread-safe)
Implemented in PluginCore.
|
pure virtual |
pure virtual function: update the plugin parameter using normalized GUI control value (thread-safe)
Implemented in PluginCore.
|
inline |
Description query: infinite tail (VST3 only)
|
inline |
Description query: MIDI.
|
inline |
Description query: VST Sample Accurate Automation.