ASPiK SDK
PluginBase Class Referenceabstract

The PluginBase object is the base class for the Plugin Core object. More...

#include <pluginbase.h>

Inheritance diagram for PluginBase:
PluginCore

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 &paramInfo)=0
 
virtual bool updatePluginParameterNormalized (int32_t controlID, double normalizedValue, ParameterUpdateInfo &paramInfo)=0
 
virtual bool postUpdatePluginParameter (int32_t controlID, double controlValue, ParameterUpdateInfo &paramInfo)=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...
 
virtual bool initialize (PluginInfo &_pluginInfo)
 one-time initialize function called after object creation and before the first reset( ) call 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...
 
virtual bool preProcessAudioBlock (IMidiEventQueue *midiEventQueue=nullptr)
 
virtual bool processAudioBlock (ProcessBlockInfo &processBlockInfo)
 
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)
 
bool doVST3SAAUpdates ()
 ONLY for VST3 plugins with sample accurate automation enabled. More...
 
bool doParameterSmoothing ()
 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 ()
 
PluginParametergetPluginParameterByIndex (int32_t index)
 get a parameter by index location in vector or array More...
 
PluginParametergetPluginParameterByControlID (int32_t controlID)
 get a parameter by control ID - uses map (slowest) More...
 
PluginParametergetNextParameterOfType (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...
 
PresetInfogetPreset (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
 
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
 
IPluginHostConnectorpluginHostConnector = nullptr
 created and destroyed on host
 
std::vector< PresetInfo * > presets
 preset list
 

Detailed Description

The PluginBase object is the base class for the Plugin Core object.

PluginBase Operations:

  • maintains the PluginParameter list in multiple formats (map, vector, old-fashioned C array) that are tailored to specific lookup duties.
  • supplies low level functions for getting plugin atrributes (e.g. the VST3 GUID or the AAX ID number)
  • maintains three plugin descriptor arrays that store attribute information; part of the "Description" process from the book; these are:
    • PluginDescriptor pluginDescriptor - describes the basic plugin strings (name, manufacturer, etc...)
    • AudioProcDescriptor audioProcDescriptor - describes the currently loaded DAW session's audio (WAV) file param; is always available to any plugin function
    • APISpecificInfo apiSpecificInfo - contains api-specific description strings, code numbers, and other details.
  • implements the buffer processing function; this method breaks the incoming and outgoing buffers into frames, and then calls your plugin core frame processing function.
  • you should not need to edit this object - all work should be done in the PluginCore object
Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

Constructor & Destructor Documentation

◆ PluginBase()

PluginBase::PluginBase ( )

PluginBase constructor.

Operation:

  • flush frame buffers
  • pluginHostConnector reset
  • NOTE: most initializations done in .h file

◆ ~PluginBase()

PluginBase::~PluginBase ( )
virtual

PluginBase destructor.

Operation:

  • destroy all plugin parameters and remove pointers from all lists
  • clean out I/O combinations
  • remove presets

Member Function Documentation

◆ addPluginParameter()

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:

  • initializes parameter smoothing (if enabled for that parameter)
Parameters
piParampointer to a newly created plugin parameter
sampleRatethe sample rate, needed to initialize the smoother
Returns
the index of the parameter in the vector or old-fashioned C-array

◆ addPreset()

size_t PluginBase::addPreset ( PresetInfo preset)

add a new preset

add preset

Parameters
preseta PresetInfo strucutre that describes the preset
Returns
the new numbner of presets in the list

◆ addSupportedAuxIOCombination()

uint32_t PluginBase::addSupportedAuxIOCombination ( ChannelIOConfig  ioConfig)

add a new I/O configuration pair

helper to easily add new Aux (sidechain) I/O combination

Parameters
ioConfigstructure containing one aux input/output channel pair
Returns
the new count of aux I/O combinations

◆ addSupportedIOCombination()

uint32_t PluginBase::addSupportedIOCombination ( ChannelIOConfig  ioConfig)

add a new I/O configuration pair

helper to easily add new I/O combination

Parameters
ioConfigstructure containing one input/output channel pair
Returns
the new count of I/O combinations

◆ clearUpdateGUIParameters()

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)

Parameters
guiParametersthe list to clear

◆ compareSelectedString()

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

Parameters
controlIDthe control ID of the parameter to test
compareStringthe string to test against the parameter's value (as string)
Returns
true if strings compare, false otherwise

◆ doParameterSmoothing()

bool PluginBase::doParameterSmoothing ( )

combines parameter smoothing and VST3 sample accurate updates

perform parameter smoothing (if no VST3 SAA updates were done)

NOTE:

  • beware: this function can eat a lot of CPU if the sample accurate updates trigger complex cooking functions
  • to combat CPU usage, you can set the VST3 sample granularity in initPluginDescriptors() apiSpecificInfo.vst3SampleAccurateGranularity
  • you can also change the parameter smoothing granularity
  • but in either case, the list MUST be iterated; this function is the reason for the old-fashioned C-array of pointers
    as it was found to be faster than any other list method for entire-list iteration (if you have a faster way, let me knmow!)
  • the parameter is updated with the smoothed value
  • the post-parameter update function is then called (complex cooking functions here will eat the CPU as well)

true = this is called from smoothing operation, false = NOT VST sample accurate update

◆ doVST3SAAUpdates()

bool PluginBase::doVST3SAAUpdates ( )

ONLY for VST3 plugins with sample accurate automation enabled.

perform sample accurate upates

  • NOTE: this can really eat up your CPU if the cooking functions are mathematically intnesive

false = this is NOT called from smoothing operation, true: this is a VST sample accurate update

◆ getAAXBundleID()

const char* PluginBase::getAAXBundleID ( )
inline

Description query: AAX Bundle ID.

Returns
AAX Bundle ID as const char*

◆ getAAXEffectID()

const char* PluginBase::getAAXEffectID ( )
inline

Description query: AAX Effect ID.

Returns
AAX Effect ID as const char*

◆ getAAXManufacturerID()

const uint32_t PluginBase::getAAXManufacturerID ( )
inline

Description query: AAX Man ID.

Returns
AAX manufacturer ID as const char*

◆ getAAXPluginCategory()

uint32_t PluginBase::getAAXPluginCategory ( )
inline

Description query: AAX Category.

Returns
AAX category code (e.g. aaxPlugInCategory::aaxPlugInCategory_Effect)

◆ getAAXProductID()

const uint32_t PluginBase::getAAXProductID ( )
inline

Description query: AAX Prod ID.

Returns
AAX product ID as const char*

◆ getAUBundleID()

const char* PluginBase::getAUBundleID ( )
inline

Description query: AU Bundle ID.

Returns
AU Bundle ID as const char*

◆ getAUBundleName()

const char* PluginBase::getAUBundleName ( )
inline

Description query: AU Bundle Name.

Returns
AU Bundle Name as const char*

◆ getChannelInputFormat()

int32_t PluginBase::getChannelInputFormat ( uint32_t  ioConfigIndex)
inline

get input cj

Returns
the count of I/O combinations

◆ getChannelOutputFormat()

int32_t PluginBase::getChannelOutputFormat ( uint32_t  ioConfigIndex)
inline

get I/O channel pair count

Returns
the count of I/O combinations

◆ getDefaultChannelIOConfigForChannelCount()

uint32_t PluginBase::getDefaultChannelIOConfigForChannelCount ( uint32_t  channelCount)
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)

Parameters
channelCountnumber of channels (e.g. 2)
Returns
the plugin's preferred configuration (e.g. kCFStereo) for channel count

◆ getFourCharCode()

int PluginBase::getFourCharCode ( )
inline

Description query: 4-char code.

Returns
four-char code as an int

◆ getInputChannelCount()

uint32_t PluginBase::getInputChannelCount ( uint32_t  ioConfigIndex)

get the number of input channels for a configuration at a given index

query input channels

Parameters
ioConfigIndexof the configuration in our list
Returns
number of channels

◆ getLatencyInSamples()

double PluginBase::getLatencyInSamples ( )
inline

Description query: latency.

Returns
latency in samples (as double)

◆ getNextParameterOfType()

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

Parameters
startIndexcurrent start index in array (vector or old-fashioned C-array)
controlTypetype of linked variable (float, double, meter,...)
Returns
a naked pointer to the PluginParameter object

◆ getNumSupportedIOCombinations()

uint32_t PluginBase::getNumSupportedIOCombinations ( )
inline

get I/O channel pair count

Returns
the count of I/O combinations

◆ getOutputChannelCount()

uint32_t PluginBase::getOutputChannelCount ( uint32_t  ioConfigIndex)

get the number of output channels for a configuration at a given index

query output channels

Parameters
ioConfigIndexof the configuration in our list
Returns
number of channels

◆ getPIParamValueDouble()

double PluginBase::getPIParamValueDouble ( int32_t  controlID)

value-as-double

get a parameter's variable as double

Parameters
controlIDcontrol ID of parameter
Returns
the parameter's value formatted as a double

◆ getPIParamValueFloat()

float PluginBase::getPIParamValueFloat ( int32_t  controlID)

value-as-float

get a parameter's variable as float

Parameters
controlIDcontrol ID of parameter
Returns
the parameter's value formatted as a float

◆ getPIParamValueInt()

int PluginBase::getPIParamValueInt ( int32_t  controlID)

value-as-int

get a parameter's variable as int

Parameters
controlIDcontrol ID of parameter
Returns
the parameter's value formatted as an int

◆ getPIParamValueUInt()

uint32_t PluginBase::getPIParamValueUInt ( int32_t  controlID)

value-as-uint

get a parameter's variable as UINT

Parameters
controlIDcontrol ID of parameter
Returns
the parameter's value formatted as a uint

◆ getPluginName()

const char* PluginBase::getPluginName ( )
inline

Description query: name.

Returns
name as const char*

◆ getPluginParameterByControlID()

PluginParameter* PluginBase::getPluginParameterByControlID ( int32_t  controlID)
inline

get a parameter by control ID - uses map (slowest)

Parameters
controlIDthe control ID of the parameter
Returns
a naked pointer to the PluginParameter object

◆ getPluginParameterByIndex()

PluginParameter* PluginBase::getPluginParameterByIndex ( int32_t  index)
inline

get a parameter by index location in vector or array

Parameters
indexthe index in the array
Returns
a naked pointer to the PluginParameter object

◆ getPluginParameterCount()

size_t PluginBase::getPluginParameterCount ( )
inline

returns number of parameters in our list

◆ getPluginType()

uint32_t PluginBase::getPluginType ( )
inline

Description query: plugin type.

Returns
enum type (kFXPlugin)

◆ getPreset()

PresetInfo * PluginBase::getPreset ( uint32_t  index)

get a preset

get a preset pointner

Returns
a naked pointer to the preset object

◆ getPresetCount()

size_t PluginBase::getPresetCount ( )
inline

get number of stored presets

Returns
preset count

◆ getPresetName()

const char * PluginBase::getPresetName ( uint32_t  index)

gets name as a const char* for connecting with all APIs at some level

get preset name

Parameters
indexindex of preset
Returns
name as const char*

◆ getProToolsGRValue()

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

Returns
the GR meter value (for delivery to Pro Tools or AAX host)

◆ getSampleRate()

double PluginBase::getSampleRate ( )
inline

Description query: sample rate.

Returns
sample rate

◆ getShortPluginName()

const char* PluginBase::getShortPluginName ( )
inline

Description query: short name (AAX)

Returns
short name as const char*

◆ getTailTimeInMSec()

double PluginBase::getTailTimeInMSec ( )
inline

Description query: tail time.

Returns
tail time in milliseconds (as double)

◆ getVendorName()

const char* PluginBase::getVendorName ( )
inline

Description query:vendor name.

Returns
vendor name as const char*

◆ getVST3_FUID()

const char* PluginBase::getVST3_FUID ( )
inline

Description query: VST3 FUID.

Returns
VST3 FUID as const char*

◆ getVST3BundleID()

const char* PluginBase::getVST3BundleID ( )
inline

Description query: VST3 Bundle ID.

Returns
VST3 Bundle ID as const char*

◆ getVST3SampleAccuracyGranularity()

uint32_t PluginBase::getVST3SampleAccuracyGranularity ( )
inline

Description query: VST Sample Accurate Automation granularity.

Returns
VST Sample Accurate Automation granularity in samples

◆ guiParameterChanged()

virtual bool PluginBase::guiParameterChanged ( int32_t  controlID,
double  actualValue 
)
inlinevirtual

notification that a GUI parameter changed. NOT for updating internal states or variables; unused at base class level

Reimplemented in PluginCore.

◆ hasCustomGUI()

bool PluginBase::hasCustomGUI ( )
inline

Description query: has GUI.

Returns
true if plugin has a custom GUI

◆ hasProToolsGRMeters()

bool PluginBase::hasProToolsGRMeters ( )

checks for at least one meter parameter that has the pro tools GR meter flag set

query for Pro Tools meter

Returns
true if we have at least one GR meter

◆ hasSidechain()

bool PluginBase::hasSidechain ( )
inline

Description query: sidechain.

Returns
true if plugin wants a sidechain input

◆ hasSupportedInputChannelFormat()

bool PluginBase::hasSupportedInputChannelFormat ( uint32_t  channelFormat)

check to see if plugin support a given input channel format

query input format

Parameters
channelFormatthe format to test (e.g. kCFStereo)
Returns
true if channel format is supported

◆ hasSupportedOutputChannelFormat()

bool PluginBase::hasSupportedOutputChannelFormat ( uint32_t  channelFormat)

check to see if plugin support a given output channel format

query output format

Parameters
channelFormatthe format to test (e.g. kCFStereo)
Returns
true if channel format is supported

◆ initialize()

bool PluginBase::initialize ( PluginInfo _pluginInfo)
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:

  • saves structure for the plugin to use; you can also load WAV files or state information here

Reimplemented in PluginCore.

◆ initPluginParameterArray()

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

◆ initPresetParameters()

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

Parameters
presetParameterslist to add presets to
disableSmoothingturn off smoothing (reserved for future use)
Returns
true if at least one preset was added to the list

◆ makePluginParameterVectorCopy()

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

Parameters
disableSmoothingturn off smoothing in copied parameters
Returns
a naked pointer to a newly created vector list

◆ postProcessAudioBuffers()

virtual bool PluginBase::postProcessAudioBuffers ( ProcessBufferInfo processInfo)
pure virtual

pure virtual function: do any extra work that requires the buffer to be completely processed first

Implemented in PluginCore.

◆ postUpdatePluginParameter()

virtual bool PluginBase::postUpdatePluginParameter ( int32_t  controlID,
double  controlValue,
ParameterUpdateInfo paramInfo 
)
pure virtual

pure virtual function: do any post-update processing (cooking) of data

Implemented in PluginCore.

◆ preProcessAudioBlock()

virtual bool PluginBase::preProcessAudioBlock ( IMidiEventQueue midiEventQueue = nullptr)
inlinevirtual

MIDI

Reimplemented in PluginCore.

◆ preProcessAudioBuffers()

virtual bool PluginBase::preProcessAudioBuffers ( ProcessBufferInfo processInfo)
pure virtual

pure virtual function: do any last preparation for arrival of fresh audio buffers

Implemented in PluginCore.

◆ processAudioBlock()

virtual bool PluginBase::processAudioBlock ( ProcessBlockInfo processBlockInfo)
inlinevirtual

process sub-blocks of data (OPTIONAL MODE) PluginCore MUST override and implement this function

Reimplemented in PluginCore.

◆ processAudioBuffers()

bool PluginBase::processAudioBuffers ( ProcessBufferInfo processBufferInfo)
virtual

THE buffer processing function.

Buffer Proc Cycle: II PluginCore overrides this method to process frames

Operation:

  • break channel buffers into frames (one sample from each channel, in and out)
  • call the pre-processing function on derived class to allow it to prepare for the audio buffer's arrival
  • call the frame processing function that the derived class MUST implement repeatedly until the buffer is processed
  • call the post-processing function on derived class to allow it to do any stuff that requires the buffer to be processed first
  • NOTE: if you want the derived class to process buffers instead of frames, override and implement THIS function in the derived class
Parameters
processBufferInfo- a structure of information about the current buffer to process; includes information from host (BPM, etc...)
Returns
true if operation succeeds, false otherwise

processed

processed

◆ processAudioFrame()

virtual bool PluginBase::processAudioFrame ( ProcessFrameInfo processFrameInfo)
pure virtual

pure virtual function: process one frame of audio

Implemented in PluginCore.

◆ processMessage()

virtual bool PluginBase::processMessage ( MessageInfo messageInfo)
inlinevirtual

ASPiK messaging system: base class implementation is empty

Reimplemented in PluginCore.

◆ processMIDIEvent()

virtual bool PluginBase::processMIDIEvent ( midiEvent event)
inlinevirtual

ASPiK midi event system: base class implementation is empty

Reimplemented in PluginCore.

◆ removeAllPresets()

void PluginBase::removeAllPresets ( )

remove all presets - NOTE: does not delete objects

remove all presets

◆ removePreset()

void PluginBase::removePreset ( uint32_t  index)

remove a preset - NOTE: does not delete object

remove preset

Parameters
indexindex of preset to remove

◆ reset()

bool PluginBase::reset ( ResetInfo resetInfo)
virtual

initialize object for a new run of audio; called just before audio streams

rest the object to it's preferred initial state

Operation:

  • update sample-rate dependent objects
  • PluginParameter will update its smoother (its only sample rate dependent member)

Reimplemented in PluginCore.

◆ setParamAuxAttribute()

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!)

Parameters
controlIDcontrol ID value of the parameter
auxAttributea structure of information to store

◆ setPIParamValue()

void PluginBase::setPIParamValue ( uint32_t  _controlID,
double  _controlValue 
)

set a parameter's value with the actual value (as double)

set value

Parameters
_controlIDcontrol ID of the parameter
_controlValuethe new value to set on the parameter

not handled

◆ setPIParamValueNormalized()

double PluginBase::setPIParamValueNormalized ( uint32_t  _controlID,
double  _normalizedValue,
bool  applyTaper = true 
)

set a parameter's value with the normalied value (as double)

sest normalized

Parameters
_controlIDcontrol ID of the parameter
_normalizedValuethe new normalized value to set on the parameter
applyTaperadd the tapering during application (not used in all situations)

not handled

◆ setPluginHostConnector()

void PluginBase::setPluginHostConnector ( IPluginHostConnector _pluginHostConnector)
inline

store the plugin host interface pointer: this pointer will never go out of scope or be invalid once stored!

Parameters
_pluginHostConnectorthe interface pointer

◆ setPresetParameter()

bool PluginBase::setPresetParameter ( std::vector< PresetParameter > &  presetParameters,
uint32_t  _controlID,
double  _controlValue 
)

set a new value for a preset

set an individual preset

Parameters
presetParameterslist of presets
_controlIDcontrol ID of parameter to set
_controlValuethe new preset control value
Returns
true if preset was found and updated

◆ setVectorJoystickParameters()

virtual bool PluginBase::setVectorJoystickParameters ( const VectorJoystickData vectorJoysickData)
inlinevirtual

only for a vector joystick control from DAW that implements it (reserved for future use): base class implementation is empty

Reimplemented in PluginCore.

◆ syncInBoundVariables()

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:

  • iterate through parameters and copy their values into the bound variables you set up
  • then, call the postUpdatePluginParameter method to do any post-update cooking required to use the variable for processing

◆ updateOutBoundVariables()

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:

  • simple loop to update meter variables
  • to display custom data (waveforms, histograms, etc...) see Custom Views example in ASPiK SDK
Returns
true if at least one parameter was updated, false otherwise

◆ updatePIParamBoundValue()

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

Parameters
_controlIDcontrol ID of the parameter
Returns
true if variable was updated, false otherwise

not handled

◆ updatePluginParameter()

virtual bool PluginBase::updatePluginParameter ( int32_t  controlID,
double  controlValue,
ParameterUpdateInfo paramInfo 
)
pure virtual

pure virtual function: update the plugin parameter using GUI control value (thread-safe)

Implemented in PluginCore.

◆ updatePluginParameterNormalized()

virtual bool PluginBase::updatePluginParameterNormalized ( int32_t  controlID,
double  normalizedValue,
ParameterUpdateInfo paramInfo 
)
pure virtual

pure virtual function: update the plugin parameter using normalized GUI control value (thread-safe)

Implemented in PluginCore.

◆ wantsInfiniteTailVST3()

bool PluginBase::wantsInfiniteTailVST3 ( )
inline

Description query: infinite tail (VST3 only)

Returns
true if plugin wants infinite tail

◆ wantsMIDI()

bool PluginBase::wantsMIDI ( )
inline

Description query: MIDI.

Returns
true if plugin wants MIDI input (and output if available)

◆ wantsVST3SampleAccurateAutomation()

bool PluginBase::wantsVST3SampleAccurateAutomation ( )
inline

Description query: VST Sample Accurate Automation.

Returns
true if plugin wants sample accurate automation

The documentation for this class was generated from the following files: