#include <audioeffectx.h>
Inheritance diagram for AudioEffectX:
Public Member Functions | |
AudioEffectX (audioMasterCallback audioMaster, VstInt32 numPrograms, VstInt32 numParams) | |
Create an AudioEffectX object. | |
Parameters | |
virtual bool | canParameterBeAutomated (VstInt32 index) |
Indicates if a parameter can be automated. | |
virtual bool | string2parameter (VstInt32 index, char *text) |
Convert a string representation to a parameter value. | |
virtual bool | getParameterProperties (VstInt32 index, VstParameterProperties *p) |
Return parameter properties. | |
virtual bool | beginEdit (VstInt32 index) |
To be called before setParameterAutomated (on Mouse Down). This will be used by the Host for specific Automation Recording. | |
virtual bool | endEdit (VstInt32 index) |
To be called after setParameterAutomated (on Mouse Up). | |
Programs and Persistence | |
virtual bool | getProgramNameIndexed (VstInt32 category, VstInt32 index, char *text) |
Fill text with name of program index (category deprecated in VST 2.4). | |
virtual bool | beginSetProgram () |
Called before a program is loaded. | |
virtual bool | endSetProgram () |
Called after a program was loaded. | |
virtual VstInt32 | beginLoadBank (VstPatchChunkInfo *ptr) |
Called before a Bank is loaded. | |
virtual VstInt32 | beginLoadProgram (VstPatchChunkInfo *ptr) |
Called before a Program is loaded. (called before beginSetProgram). | |
Connections and Configuration | |
virtual bool | ioChanged () |
Tell Host numInputs and/or numOutputs and/or initialDelay (and/or numParameters: to be avoid) have changed. | |
virtual double | updateSampleRate () |
Returns sample rate from Host (may issue setSampleRate()). | |
virtual VstInt32 | updateBlockSize () |
Returns block size from Host (may issue getBlockSize()). | |
virtual VstInt32 | getInputLatency () |
Returns the Audio (maybe ASIO) input latency values. | |
virtual VstInt32 | getOutputLatency () |
Returns the Audio (maybe ASIO) output latency values. | |
virtual bool | getInputProperties (VstInt32 index, VstPinProperties *properties) |
Return the properties of output index. | |
virtual bool | getOutputProperties (VstInt32 index, VstPinProperties *properties) |
Return the properties of input index. | |
virtual bool | setSpeakerArrangement (VstSpeakerArrangement *pluginInput, VstSpeakerArrangement *pluginOutput) |
Set the plug-in's speaker arrangements. | |
virtual bool | getSpeakerArrangement (VstSpeakerArrangement **pluginInput, VstSpeakerArrangement **pluginOutput) |
Return the plug-in's speaker arrangements. | |
virtual bool | setBypass (bool onOff) |
For 'soft-bypass' (this could be automated (in Audio Thread) that why you could NOT call iochanged (if needed) in this function, do it in fxidle). | |
virtual bool | setPanLaw (VstInt32 type, float val) |
Set the Panning Law used by the Host. | |
virtual bool | setProcessPrecision (VstInt32 precision) |
Set floating-point precision used for processing (32 or 64 bit). | |
virtual VstInt32 | getNumMidiInputChannels () |
Returns number of MIDI input channels used [0, 16]. | |
virtual VstInt32 | getNumMidiOutputChannels () |
Returns number of MIDI output channels used [0, 16]. | |
Realtime | |
virtual VstTimeInfo * | getTimeInfo (VstInt32 filter) |
Get time information from Host. | |
virtual VstInt32 | getCurrentProcessLevel () |
Returns the Host's process level. | |
virtual VstInt32 | getAutomationState () |
Returns the Host's automation state. | |
virtual VstInt32 | processEvents (VstEvents *events) |
Called when new MIDI events come in. | |
bool | sendVstEventsToHost (VstEvents *events) |
Send MIDI events back to Host application. | |
virtual VstInt32 | startProcess () |
Called one time before the start of process call. This indicates that the process call will be interrupted (due to Host reconfiguration or bypass state when the plug-in doesn't support softBypass). | |
virtual VstInt32 | stopProcess () |
Called after the stop of process call. | |
Variable I/O (Offline) | |
virtual bool | processVariableIo (VstVariableIo *varIo) |
Used for variable I/O processing (offline processing like timestreching). | |
virtual VstInt32 | setTotalSampleToProcess (VstInt32 value) |
Called in offline mode before process() or processVariableIo (). | |
Host Properties | |
virtual bool | getHostVendorString (char *text) |
Fills text with a string identifying the vendor. | |
virtual bool | getHostProductString (char *text) |
Fills text with a string with product name. | |
virtual VstInt32 | getHostVendorVersion () |
Returns vendor-specific version (for example 3200 for Nuendo 3.2). | |
virtual VstIntPtr | hostVendorSpecific (VstInt32 lArg1, VstIntPtr lArg2, void *ptrArg, float floatArg) |
No specific definition. | |
virtual VstInt32 | canHostDo (char *text) |
Reports what the Host is able to do (hostCanDos in audioeffectx.cpp). | |
virtual VstInt32 | getHostLanguage () |
Returns the Host's language (VstHostLanguage). | |
Plug-in Properties | |
virtual void | isSynth (bool state=true) |
Set if plug-in is a synth. | |
virtual void | noTail (bool state=true) |
Plug-in won't produce output signals while there is no input. | |
virtual VstInt32 | getGetTailSize () |
Returns tail size; 0 is default (return 1 for 'no tail'), used in offline processing too. | |
virtual void * | getDirectory () |
Returns the plug-in's directory. | |
virtual bool | getEffectName (char *name) |
Fill text with a string identifying the effect. | |
virtual bool | getVendorString (char *text) |
Fill text with a string identifying the vendor. | |
virtual bool | getProductString (char *text) |
Fill text with a string identifying the product name. | |
virtual VstInt32 | getVendorVersion () |
Return vendor-specific version. | |
virtual VstIntPtr | vendorSpecific (VstInt32 lArg, VstIntPtr lArg2, void *ptrArg, float floatArg) |
No definition, vendor specific handling. | |
virtual VstInt32 | canDo (char *text) |
Reports what the plug-in is able to do (plugCanDos in audioeffectx.cpp). | |
virtual VstInt32 | getVstVersion () |
Returns the current VST Version (kVstVersion). | |
virtual VstPlugCategory | getPlugCategory () |
Specify a category that fits the plug (VstPlugCategory). | |
MIDI Channel Programs | |
virtual VstInt32 | getMidiProgramName (VstInt32 channel, MidiProgramName *midiProgramName) |
Fill midiProgramName with information for 'thisProgramIndex'. | |
virtual VstInt32 | getCurrentMidiProgram (VstInt32 channel, MidiProgramName *currentProgram) |
Fill currentProgram with information for the current MIDI program. | |
virtual VstInt32 | getMidiProgramCategory (VstInt32 channel, MidiProgramCategory *category) |
Fill category with information for 'thisCategoryIndex'. | |
virtual bool | hasMidiProgramsChanged (VstInt32 channel) |
Return true if the MidiProgramNames, MidiKeyNames or MidiControllerNames had changed on this MIDI channel. | |
virtual bool | getMidiKeyName (VstInt32 channel, MidiKeyName *keyName) |
Fill keyName with information for 'thisProgramIndex' and 'thisKeyNumber'. | |
Others | |
virtual bool | updateDisplay () |
Something has changed in plug-in, request an update display like program (MIDI too) and parameters list in Host. | |
virtual bool | sizeWindow (VstInt32 width, VstInt32 height) |
Requests to resize the editor window. | |
virtual bool | openFileSelector (VstFileSelect *ptr) |
Open a Host File selector (see aeffectx.h for VstFileSelect definition). | |
virtual bool | closeFileSelector (VstFileSelect *ptr) |
Close the Host File selector which was opened by openFileSelector. | |
virtual VstInt32 | getNextShellPlugin (char *name) |
This opcode is only called, if the plug-in is of type kPlugCategShell, in order to extract all included sub-pluginīs names. | |
Tools | |
virtual bool | allocateArrangement (VstSpeakerArrangement **arrangement, VstInt32 nbChannels) |
Allocate memory for a VstSpeakerArrangement. | |
virtual bool | deallocateArrangement (VstSpeakerArrangement **arrangement) |
Delete/free memory for an allocated speaker arrangement. | |
virtual bool | copySpeaker (VstSpeakerProperties *to, VstSpeakerProperties *from) |
Copy properties from to to. | |
virtual bool | matchArrangement (VstSpeakerArrangement **to, VstSpeakerArrangement *from) |
"to" is deleted, then created and initialized with the same values as "from" ones ("from" must exist). |
bool AudioEffectX::allocateArrangement | ( | VstSpeakerArrangement ** | arrangement, | |
VstInt32 | nbChannels | |||
) | [virtual] |
Allocate memory for a VstSpeakerArrangement.
arrangement | Pointer to a VstSpeakerArrangement structure | |
nbChannels | Number of Channels |
bool AudioEffectX::beginEdit | ( | VstInt32 | index | ) | [virtual] |
To be called before setParameterAutomated (on Mouse Down). This will be used by the Host for specific Automation Recording.
It tells the Host that if it needs to, it has to record automation data for this control.
index | Index of the parameter |
VstInt32 AudioEffectX::beginLoadBank | ( | VstPatchChunkInfo * | ptr | ) | [inline, virtual] |
Called before a Bank is loaded.
ptr |
VstInt32 AudioEffectX::beginLoadProgram | ( | VstPatchChunkInfo * | ptr | ) | [inline, virtual] |
Called before a Program is loaded. (called before beginSetProgram).
ptr |
bool AudioEffectX::beginSetProgram | ( | ) | [inline, virtual] |
Called before a program is loaded.
VstInt32 AudioEffectX::canDo | ( | char * | text | ) | [inline, virtual] |
Reports what the plug-in is able to do (plugCanDos in audioeffectx.cpp).
Report what the plug-in is able to do. In general you can but don't have to report whatever you support or not support via canDo. Some application functionality may require some specific reply, but in that case you will probably know. Best is to report whatever you know for sure. A Host application cannot make assumptions about the presence of the new 2.x features of a plug-in. Ignoring this inquiry methods and trying to access a 2.x feature from a 1.0 plug, or vice versa, will mean the plug-in or Host application will break. It is not the end-users job to pick and choose which plug-ins can be supported by which Host.
text | A string from plugCanDos |
VstInt32 AudioEffectX::canHostDo | ( | char * | text | ) | [virtual] |
Reports what the Host is able to do (hostCanDos in audioeffectx.cpp).
Asks Host if it implements the feature text. A plug-in cannot assume a 2.x feature is available from the Host. Use this method to ascertain the environment in which the plug-in finds itself. Ignoring this inquiry methods and trying to access a 2.x feature in a 1.0 Host will mean your plug-in or Host application will break. It is not the end-users job to pick and choose which plug-ins can be supported by which Host.
text | A string from hostCanDos |
bool AudioEffectX::canParameterBeAutomated | ( | VstInt32 | index | ) | [inline, virtual] |
Indicates if a parameter can be automated.
Obviously only useful when the application supports this.
index | Index of the parameter |
bool AudioEffectX::closeFileSelector | ( | VstFileSelect * | ptr | ) | [virtual] |
Close the Host File selector which was opened by openFileSelector.
ptr |
bool AudioEffectX::copySpeaker | ( | VstSpeakerProperties * | to, | |
VstSpeakerProperties * | from | |||
) | [virtual] |
Copy properties from to to.
Feed the to speaker properties with the same values than from 's ones. It is assumed here that to exists yet, ie this function won't allocate memory for the speaker (this will prevent from having a difference between an Arrangement's number of channels and its actual speakers...)
to | ||
from |
bool AudioEffectX::deallocateArrangement | ( | VstSpeakerArrangement ** | arrangement | ) | [virtual] |
Delete/free memory for an allocated speaker arrangement.
arrangement | Pointer to a VstSpeakerArrangement structure |
bool AudioEffectX::endEdit | ( | VstInt32 | index | ) | [virtual] |
To be called after setParameterAutomated (on Mouse Up).
It notifies the Host that this control is no longer moved by the mouse.
index | Index of the parameter |
bool AudioEffectX::endSetProgram | ( | ) | [inline, virtual] |
Called after a program was loaded.
VstInt32 AudioEffectX::getAutomationState | ( | ) | [virtual] |
VstInt32 AudioEffectX::getCurrentMidiProgram | ( | VstInt32 | channel, | |
MidiProgramName * | currentProgram | |||
) | [inline, virtual] |
Fill currentProgram with information for the current MIDI program.
channel | ||
currentProgram |
VstInt32 AudioEffectX::getCurrentProcessLevel | ( | ) | [virtual] |
Returns the Host's process level.
A plug-in is like a black box processing some audio coming in on some inputs (if any) and going out of some outputs (if any). This may be used to do offline or real-time processing, and sometimes it may be desirable to know the current context.
void * AudioEffectX::getDirectory | ( | ) | [virtual] |
Returns the plug-in's directory.
bool AudioEffectX::getEffectName | ( | char * | name | ) | [inline, virtual] |
Fill text with a string identifying the effect.
name | A string up to 32 chars |
virtual VstInt32 AudioEffectX::getGetTailSize | ( | ) | [inline, virtual] |
Returns tail size; 0 is default (return 1 for 'no tail'), used in offline processing too.
VstInt32 AudioEffectX::getHostLanguage | ( | ) | [virtual] |
bool AudioEffectX::getHostProductString | ( | char * | text | ) | [virtual] |
Fills text with a string with product name.
text | String of maximum 64 char |
bool AudioEffectX::getHostVendorString | ( | char * | text | ) | [virtual] |
Fills text with a string identifying the vendor.
text | String of maximum 64 char |
VstInt32 AudioEffectX::getHostVendorVersion | ( | ) | [virtual] |
Returns vendor-specific version (for example 3200 for Nuendo 3.2).
VstInt32 AudioEffectX::getInputLatency | ( | ) | [virtual] |
Returns the Audio (maybe ASIO) input latency values.
bool AudioEffectX::getInputProperties | ( | VstInt32 | index, | |
VstPinProperties * | properties | |||
) | [inline, virtual] |
Return the properties of output index.
index | The index to the input, starting with 0 | |
properties | A pointer to a VstPinProperties structure |
bool MyPlug::getInputProperties (VstInt32 index, VstPinProperties* properties) { bool returnCode = false; if (index < kNumInputs) { sprintf (properties->label, "My %1d In", index + 1); properties->flags = kVstPinIsStereo | kVstPinIsActive; returnCode = true; } return returnCode; }
bool AudioEffectX::getMidiKeyName | ( | VstInt32 | channel, | |
MidiKeyName * | keyName | |||
) | [inline, virtual] |
Fill keyName with information for 'thisProgramIndex' and 'thisKeyNumber'.
channel | ||
keyName | If keyName is "" the standard name of the key will be displayed |
VstInt32 AudioEffectX::getMidiProgramCategory | ( | VstInt32 | channel, | |
MidiProgramCategory * | category | |||
) | [inline, virtual] |
Fill category with information for 'thisCategoryIndex'.
channel | ||
category |
VstInt32 AudioEffectX::getMidiProgramName | ( | VstInt32 | channel, | |
MidiProgramName * | midiProgramName | |||
) | [inline, virtual] |
Fill midiProgramName with information for 'thisProgramIndex'.
Ask plug-in if MidiPrograms are used and if so, query for names, numbers (ProgramChange-Number + BankSelect-Number), categories and keynames of each MIDI Program, on each MIDI-channel. If this function is called, your plug-in has to read MidiProgramName::thisProgramIndex, fill out the other fields with the information assigned to a certain MIDI Program and return the number of available MIDI Programs on that MIDI Channel.
channel | MidiChannel: 0-15 | |
midiProgramName | Points to MidiProgramName struct |
Host calls getMidiProgramName with idx = 0 and MidiProgramName::thisProgramIndex = 0. Plug fills out: MidiProgramName::name[64] = "Program A" MidiProgramName::midiProgram = 0 MidiProgramName::midiBankMsb = -1 MidiProgramName::midiBankLsb = -1 MidiProgramName::parentCategoryIndex = -1 MidiProgramName::flags = 0 (if plug isn't "Omni"). Plug returns 3. Host calls getMidiProgramName with idx = 0 and MidiProgramName::thisProgramIndex = 1. Plug fills out: MidiProgramName::name[64] = "Program B" MidiProgramName::midiProgram = 1 MidiProgramName::midiBankMsb = -1 MidiProgramName::midiBankLsb = -1 MidiProgramName::parentCategoryIndex = -1 MidiProgramName::flags = 0 (if plug isn't "Omni"). Plug returns 3. Host calls getMidiProgramName with idx = 0 and MidiProgramName::thisProgramIndex = 2. Plug fills out: MidiProgramName::name[64] = "Program C" MidiProgramName::midiProgram = 2 MidiProgramName::midiBankMsb = -1 MidiProgramName::midiBankLsb = -1 MidiProgramName::parentCategoryIndex = -1 MidiProgramName::flags = 0 (if plug isn't "Omni"). Plug returns 3.
VstInt32 AudioEffectX::getNextShellPlugin | ( | char * | name | ) | [inline, virtual] |
This opcode is only called, if the plug-in is of type kPlugCategShell, in order to extract all included sub-pluginīs names.
name | Points to a char buffer of size 64, which is to be filled with the name of the plug-in including the terminating zero |
//---From the Host side : if found plugin is a Shell category----------- if (effect->getCategory () == kPlugCategShell) { // scan shell for subplugins char tempName[64] = {0}; VstInt32 plugUniqueID = 0; while ((plugUniqueID = effect->dispatchEffect (effShellGetNextPlugin, 0, 0, tempName)) != 0) { // subplug needs a name if (tempName[0] != 0) { ...do what you want with this tempName and plugUniqueID } } } //---From the Host side : Intanciate a subplugin of a shell plugin--- // retreive the uniqueID of this subplugin the host wants to load // set it to the host currentID currentID = subplugInfo->uniqueID; // call the its shell plugin (main function) main (); // the shell plugin will ask for the currentUniqueID // and should return the chosen subplugin ... //---From the plugin-Shell Side: for enumeration of subplugins--------- category = kPlugCategShell; ->can ask the host if "shellCategory" is supported // at start (instanciation) reset the index for the getNextShellPlugin call. myPluginShell::index = 0; // implementation of getNextShellPlugin (char* name); VstInt32 myPluginShell::getNextShellPlugin (char* name) { strcpy (name, MyNameTable[index]); return MyUniqueIDTable[index++]; } .... //---From the plugin-Shell Side: when instanciation----- VstInt32 uniqueID = host->getCurrentUniqueID (); if (uniqueID == 0) // the host instanciates the shell {} else // host try to instanciate one of my subplugin...identified by the uniqueID {}
VstInt32 AudioEffectX::getNumMidiInputChannels | ( | ) | [inline, virtual] |
Returns number of MIDI input channels used [0, 16].
Called by the host application to determine how many MIDI input channels are actually used by a plugin e.g. to hide unused channels from the user. For compatibility with VST 2.3 and below, the default return value 0 means 'not implemented' - in this case the host assumes 16 MIDI channels to be present (or none at all).
VstInt32 AudioEffectX::getNumMidiOutputChannels | ( | ) | [inline, virtual] |
Returns number of MIDI output channels used [0, 16].
Called by the host application to determine how many MIDI output channels are actually used by a plugin e.g. to hide unused channels from the user. For compatibility with VST 2.3 and below, the default return value 0 means 'not implemented' - in this case the host assumes 16 MIDI channels to be present (or none at all).
VstInt32 AudioEffectX::getOutputLatency | ( | ) | [virtual] |
Returns the Audio (maybe ASIO) output latency values.
While inputLatency is probably not of concern, outputLatency may be used in conjunction with getTimeInfo(). samplePos of VstTimeInfo is ahead of the 'visual' sequencer play time by the output latency, such that when outputLatency samples have passed by, our processing result becomes audible.
bool AudioEffectX::getOutputProperties | ( | VstInt32 | index, | |
VstPinProperties * | properties | |||
) | [inline, virtual] |
Return the properties of input index.
index | The index to the output, starting with 0 | |
properties | A pointer to a VstPinProperties structure |
bool MyPlug::getOutputProperties (VstInt32 index, VstPinProperties* properties) { bool returnCode = false; if (index < kNumOutputs) { sprintf (properties->label, "My %1d Out", index + 1); properties->flags = kVstPinIsStereo | kVstPinIsActive; returnCode = true; } return (returnCode); }
Example 2 : plug-in with 1 mono, 1 stereo and one 5.1 outputs (kNumOutputs = 9):
bool MyPlug::getOutputProperties (VstInt32 index, VstPinProperties* properties) { bool returnCode = false; if (index >= 0 && index < kNumOutputs) { properties->flags = kVstPinIsActive; if (index == 0) // mono { strcpy (properties->label, "Mono Out"); properties->arrangementType = kSpeakerArrMono; } else if (index == 1) // stereo (1 -> 2) { strcpy (properties->label, "Stereo Out"); properties->flags |= kVstPinIsStereo; properties->arrangementType = kSpeakerArrStereo; } else if (index >= 3) // 5.1 (3 -> 8) { strcpy (properties->label, "5.1 Out"); properties->flags |= kVstPinUseSpeaker; properties->arrangementType = kSpeakerArr51; for old VST Host < 2.3, make 5.1 to stereo/mono/mono/stereo (L R C Lfe Ls Rs) if (index == 3 || index == 7) properties->flags |= kVstPinIsStereo; if (index == 5) strcpy (properties->label, "Center"); else if (index == 6) strcpy (properties->label, "Lfe"); else if (index == 7) // (7 -> 8) strcpy (properties->label, "Stereo Back"); } returnCode = true; } return returnCode; }
bool AudioEffectX::getParameterProperties | ( | VstInt32 | index, | |
VstParameterProperties * | p | |||
) | [inline, virtual] |
Return parameter properties.
index | Index of the parameter | |
p | Pointer to VstParameterProperties |
VstPlugCategory AudioEffectX::getPlugCategory | ( | ) | [virtual] |
Specify a category that fits the plug (VstPlugCategory).
bool AudioEffectX::getProductString | ( | char * | text | ) | [inline, virtual] |
Fill text with a string identifying the product name.
text | A string up to 64 chars |
bool AudioEffectX::getProgramNameIndexed | ( | VstInt32 | category, | |
VstInt32 | index, | |||
char * | text | |||
) | [inline, virtual] |
Fill text with name of program index (category deprecated in VST 2.4).
Allows a Host application to list the plug-in's programs (presets).
category | unused in VST 2.4 | |
index | Index of the program in a given category, starting with 0. | |
text | A string up to 24 chars. |
bool AudioEffectX::getSpeakerArrangement | ( | VstSpeakerArrangement ** | pluginInput, | |
VstSpeakerArrangement ** | pluginOutput | |||
) | [inline, virtual] |
Return the plug-in's speaker arrangements.
pluginInput | A pointer to the input's VstSpeakerArrangement structure. | |
pluginOutput | A pointer to the output's VstSpeakerArrangement structure. |
Here an example code to show how the host uses getSpeakerArrangement() VstSpeakerArrangement *plugInputVstArr = 0; VstSpeakerArrangement *plugOutputVstArr = 0; if (getFormatVersion () >= 2300 && getSpeakerArrangement (&plugInputVstArr, &plugOutputVstArr)) ....
VstTimeInfo * AudioEffectX::getTimeInfo | ( | VstInt32 | filter | ) | [virtual] |
Get time information from Host.
A plug-in will request time info by calling the function getTimeInfo() which returns a VstTimeInfo pointer (or NULL if not implemented by the Host). The mask parameter is composed of the same flags which will be found in the flags field of VstTimeInfo when returned, that is, if you need information about tempo. The parameter passed to getTimeInfo() should have the kVstTempoValid flag set. This request and delivery system is important, as a request like this may cause significant calculations at the application's end, which may take a lot of our precious time. This obviously means you should only set those flags that are required to get the information you need. Also please be aware that requesting information does not necessarily mean that that information is provided in return. Check the flags field in the VstTimeInfo structure to see if your request was actually met.
filter | A mask indicating which fields are requested, as some items may require extensive conversions. See the flags in VstTimeInfo |
bool AudioEffectX::getVendorString | ( | char * | text | ) | [inline, virtual] |
Fill text with a string identifying the vendor.
text | A string up to 64 chars |
VstInt32 AudioEffectX::getVendorVersion | ( | ) | [inline, virtual] |
Return vendor-specific version.
VstInt32 AudioEffectX::getVstVersion | ( | ) | [inline, virtual] |
Returns the current VST Version (kVstVersion).
bool AudioEffectX::hasMidiProgramsChanged | ( | VstInt32 | channel | ) | [inline, virtual] |
Return true if the MidiProgramNames, MidiKeyNames or MidiControllerNames had changed on this MIDI channel.
Ask plug-in for the currently active program on a certain MIDI Channel. Just like getMidiProgramName(), but MidiProgramName::thisProgramIndex has to be filled out with the currently active MIDI Program-index, which also has to be returned.
channel |
VstIntPtr AudioEffectX::hostVendorSpecific | ( | VstInt32 | lArg1, | |
VstIntPtr | lArg2, | |||
void * | ptrArg, | |||
float | floatArg | |||
) | [virtual] |
No specific definition.
bool AudioEffectX::ioChanged | ( | ) | [virtual] |
Tell Host numInputs and/or numOutputs and/or initialDelay (and/or numParameters: to be avoid) have changed.
The Host could call a suspend() (if the plug-in was enabled (in resume() state)) and then ask for getSpeakerArrangement() and/or check the numInputs and numOutputs and initialDelay and then call a resume().
void AudioEffectX::isSynth | ( | bool | state = true |
) | [virtual] |
Set if plug-in is a synth.
Tells the Host that the plug-in is an instrument, i.e. that it will call wantEvents().
state |
|
bool AudioEffectX::matchArrangement | ( | VstSpeakerArrangement ** | to, | |
VstSpeakerArrangement * | from | |||
) | [virtual] |
"to" is deleted, then created and initialized with the same values as "from" ones ("from" must exist).
to is deleted, then created and initialized with the same values as from (must exist!). It's notably useful when setSpeakerArrangement() is called by the Host.
to | ||
from |
void AudioEffectX::noTail | ( | bool | state = true |
) | [virtual] |
Plug-in won't produce output signals while there is no input.
Enables Host to omit processReplacing() when no data is present on any input.
bool AudioEffectX::openFileSelector | ( | VstFileSelect * | ptr | ) | [virtual] |
Open a Host File selector (see aeffectx.h for VstFileSelect definition).
ptr |
Called when new MIDI events come in.
bool AudioEffectX::processVariableIo | ( | VstVariableIo * | varIo | ) | [inline, virtual] |
Used for variable I/O processing (offline processing like timestreching).
If called with varIo NULL, returning true indicates that this call is supported by the plug-in. Host will use processReplacing otherwise. The Host should call setTotalSampleToProcess before starting the processIO to inform the plug-in about how many samples will be processed in total. The Host should provide an output buffer at least 5 times bigger than input buffer.
varIo |
bool AudioEffectX::sendVstEventsToHost | ( | VstEvents * | events | ) |
Send MIDI events back to Host application.
Can be called inside processReplacing.
events | Fill with VST events |
bool AudioEffectX::setBypass | ( | bool | onOff | ) | [inline, virtual] |
For 'soft-bypass' (this could be automated (in Audio Thread) that why you could NOT call iochanged (if needed) in this function, do it in fxidle).
process still called (if Supported) although the plug-in was bypassed. Some plugs need to stay 'alive' even when bypassed. An example is a surround decoder which has more inputs than outputs and must maintain some reasonable signal distribution even when being bypassed. A CanDo 'bypass' allows to ask the plug-in if it supports soft bypass or not.
If the plug-in supports SoftBypass and it has a latency (initialDelay), in Bypassed state the plug-in has to used the same latency value.
onOff |
bool AudioEffectX::setPanLaw | ( | VstInt32 | type, | |
float | val | |||
) | [inline, virtual] |
bool AudioEffectX::setProcessPrecision | ( | VstInt32 | precision | ) | [inline, virtual] |
Set floating-point precision used for processing (32 or 64 bit).
Is called in suspended state, similar to setBlockSize. Default (if not called) is single precision float.
precision | kVstProcessPrecision32 or kVstProcessPrecision64 |
bool AudioEffectX::setSpeakerArrangement | ( | VstSpeakerArrangement * | pluginInput, | |
VstSpeakerArrangement * | pluginOutput | |||
) | [inline, virtual] |
Set the plug-in's speaker arrangements.
Set the plug-in's speaker arrangements. If a (VST >= 2.3) plug-in returns true, it means that it accepts this IO arrangement. The Host doesn't need to ask for getSpeakerArrangement(). If the plug-in returns false it means that it doesn't accept this arrangement, the Host should then ask for getSpeakerArrangement() and then can (optional) recall setSpeakerArrangement().
pluginInput | A pointer to the input's VstSpeakerArrangement structure. | |
pluginOutput | A pointer to the output's VstSpeakerArrangement structure. |
Called in offline mode before process() or processVariableIo ().
It indicates how many samples will be processed in total.
value | Number of samples to process |
Requests to resize the editor window.
width | The window's width in pixel | |
height | The window's height in pixel |
virtual VstInt32 AudioEffectX::startProcess | ( | ) | [inline, virtual] |
Called one time before the start of process call. This indicates that the process call will be interrupted (due to Host reconfiguration or bypass state when the plug-in doesn't support softBypass).
virtual VstInt32 AudioEffectX::stopProcess | ( | ) | [inline, virtual] |
Called after the stop of process call.
bool AudioEffectX::string2parameter | ( | VstInt32 | index, | |
char * | text | |||
) | [inline, virtual] |
Convert a string representation to a parameter value.
Especially useful for plug-ins without user interface. The application can then implement a text edit field for the user to set a parameter by entering text.
index | Index of the parameter | |
text | A textual description of the parameter's value. A NULL pointer is used to check the capability (return true). |
VstInt32 AudioEffectX::updateBlockSize | ( | ) | [virtual] |
Returns block size from Host (may issue getBlockSize()).
bool AudioEffectX::updateDisplay | ( | ) | [virtual] |
Something has changed in plug-in, request an update display like program (MIDI too) and parameters list in Host.
double AudioEffectX::updateSampleRate | ( | ) | [virtual] |
virtual VstIntPtr AudioEffectX::vendorSpecific | ( | VstInt32 | lArg, | |
VstIntPtr | lArg2, | |||
void * | ptrArg, | |||
float | floatArg | |||
) | [inline, virtual] |
No definition, vendor specific handling.