- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# AudioEffectX Class Reference

`#include <audioeffectx.h>`

Inheritance diagram for AudioEffectX:

List of all members.

## 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).
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 ()
| Return number of MIDI input channels.
virtual VstInt32 | getNumMidiOutputChannels ()
| Return number of MIDI output channels.
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).

## Detailed Description

Extended VST Effect Class (VST 2.x).

## Constructor & Destructor Documentation

AudioEffectX::AudioEffectX | ( | audioMasterCallback | audioMaster,
|  | VstInt32 | numPrograms,
|  | VstInt32 | numParams
| ) |

| Create an AudioEffectX object. See also: AudioEffect()

## Member Function Documentation

bool AudioEffectX::allocateArrangement | ( | VstSpeakerArrangement ** | arrangement,
|  | VstInt32 | nbChannels
| ) | `[virtual]`

  | Allocate memory for a VstSpeakerArrangement. Parameters:
  | arrangement | Pointer to a VstSpeakerArrangement structure
  | nbChannels | Number of Channels
Returns: Returns true on success See also: deallocateArrangement(), copySpeaker(), matchArrangement()

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. Parameters:
  | index | Index of the parameter
Returns: Returns true on success See also: endEdit()

VstInt32 AudioEffectX::beginLoadBank | ( | VstPatchChunkInfo * | ptr | ) | `[inline, virtual]`

  | Called before a Bank is loaded. Parameters:
  | ptr |
Returns: -1: if the Bank cannot be loaded, 1: if it can be loaded 0: else (for compatibility) See also: beginLoadProgram()

VstInt32 AudioEffectX::beginLoadProgram | ( | VstPatchChunkInfo * | ptr | ) | `[inline, virtual]`

  | Called before a Program is loaded. (called before beginSetProgram). Parameters:
  | ptr |
Returns: -1: if the Program cannot be loaded, 1: it can be loaded else, 0: else (for compatibility) See also: beginLoadBank()

bool AudioEffectX::beginSetProgram | ( |  | ) | `[inline, virtual]`

| Called before a program is loaded. Returns: true: the plug-in took the notification into account false: it did not... See also: endSetProgram()

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. Parameters:
  | text | A string from plugCanDos
Returns: 0: don't know (default) 1: yes -1: no Note: This should be supported.

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. Parameters:
  | text | A string from hostCanDos
Returns: 0 : don't know (default) 1 : yes -1: no

bool AudioEffectX::canParameterBeAutomated | ( | VstInt32 | index | ) | `[inline, virtual]`

  | Indicates if a parameter can be automated. Obviously only useful when the application supports this. Parameters:
  | index | Index of the parameter
Returns: if supported

bool AudioEffectX::closeFileSelector | ( | VstFileSelect * | ptr | ) | `[virtual]`

  | Close the Host File selector which was opened by openFileSelector. Parameters:
  | ptr |
Returns: Returns true on success See also: openFileSelector()

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...) Parameters:
  | to |
  | from |
Returns: Returns true on success See also: allocateArrangement(), deallocateArrangement(), matchArrangement()

bool AudioEffectX::deallocateArrangement | ( | VstSpeakerArrangement ** | arrangement | ) | `[virtual]`

  | Delete/free memory for an allocated speaker arrangement. Parameters:
  | arrangement | Pointer to a VstSpeakerArrangement structure
Returns: Returns true on success See also: allocateArrangement(), copySpeaker(), matchArrangement()

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. Parameters:
  | index | Index of the parameter
Returns: Returns true on success See also: beginEdit()

bool AudioEffectX::endSetProgram | ( |  | ) | `[inline, virtual]`

| Called after a program was loaded. Returns: true: the plug-in took the notification into account false: it did not... See also: beginSetProgram()

VstInt32 AudioEffectX::getAutomationState | ( |  | ) | `[virtual]`

| Returns the Host's automation state. Returns: VstAutomationStates in aeffectx.h

VstInt32 AudioEffectX::getCurrentMidiProgram | ( | VstInt32 | channel,
|  | MidiProgramName * | currentProgram
| ) | `[inline, virtual]`

  | Fill currentProgram with information for the current MIDI program. Parameters:
  | channel |
  | currentProgram |
Returns: programIndex of the current program -1 if not supported

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. Returns: VstProcessLevels in aeffectx.h

void * AudioEffectX::getDirectory | ( |  | ) | `[virtual]`

| Returns the plug-in's directory. Returns: FSSpec on MAC, else char*

bool AudioEffectX::getEffectName | ( | char * | name | ) | `[inline, virtual]`

  | Fill text with a string identifying the effect. Parameters:
  | name | A string up to 32 chars
Returns: true on success

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]`

| Returns the Host's language (VstHostLanguage). Returns: VstHostLanguage in aeffectx.h

bool AudioEffectX::getHostProductString | ( | char * | text | ) | `[virtual]`

  | Fills text with a string with product name. Parameters:
  | text | String of maximum 64 char
Returns: true if supported

bool AudioEffectX::getHostVendorString | ( | char * | text | ) | `[virtual]`

  | Fills text with a string identifying the vendor. Parameters:
  | text | String of maximum 64 char
Returns: true if supported

VstInt32 AudioEffectX::getHostVendorVersion | ( |  | ) | `[virtual]`

| Returns vendor-specific version (for example 3200 for Nuendo 3.2). Returns: Host vendor version

VstInt32 AudioEffectX::getInputLatency | ( |  | ) | `[virtual]`

| Returns the Audio (maybe ASIO) input latency values. Returns: ASIO input latency See also: getOutputLatency()

bool AudioEffectX::getInputProperties | ( | VstInt32 | index,
|  | VstPinProperties * | properties
| ) | `[inline, virtual]`

  | Return the properties of output index. Parameters:
  | index | The index to the input, starting with 0
  | properties | A pointer to a VstPinProperties structure
  Returns: true on success See also: getOutputProperties() Note: Example
      	bool MyPlug::getInputProperties (long 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'. Parameters:
  | channel |
  | keyName | If keyName is "" the standard name of the key will be displayed
Returns: Return false if no MidiKeyNames defined for 'thisProgramIndex'

VstInt32 AudioEffectX::getMidiProgramCategory | ( | VstInt32 | channel,
|  | MidiProgramCategory * | category
| ) | `[inline, virtual]`

  | Fill category with information for 'thisCategoryIndex'. Parameters:
  | channel |
  | category |
Returns: number of used categoryIndexes. 0 if no MidiProgramCategory supported/used.

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. Note: plug-in canDo "midiProgramNames". No effect, if 0 is returned. Warning: don't mix concepts: the MIDI Programs are totally independent from all other programs present in VST. The main difference is, that there are upto 16 simultaneous active MIDI Programs (one per channel), while there can be only one active "VST"-Program. (You should see the "VST"-Program as the one single main global program, which contains the entire current state of the plug-in.) This function can be called in any sequence. Parameters:
  | channel | MidiChannel: 0-15
  | midiProgramName | Points to MidiProgramName struct
  Returns: Number of available MIDI Programs on that channel number of used programIndexes 0 if no MidiProgramNames supported Note: Example : plug-in has 3 MidiPrograms on MidiChannel 0.
      	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. Parameters:
  | 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
  Returns: Return the next plug-in's uniqueID Note: Example of Implementation
      	//---From the Host side : if found plugin is a Shell category-----------
      	if (effect->getCategory () == kPlugCategShell)
      	{
      		// scan shell for subplugins
      		char tempName[64] = {0};
      		long 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);
      	long myPluginShell::getNextShellPlugin (char* name)
      	{
      		strcpy (name, MyNameTable[index]);
      		return MyUniqueIDTable[index++];
      	}
      	....
      	//---From the plugin-Shell Side: when instanciation-----
      	long 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]`

| Return number of MIDI input channels. Returns: Number of MIDI Input Channels: 1-15, otherwise: 16 or no MIDI Channels at all See also: getNumMidiOutputChannels()

VstInt32 AudioEffectX::getNumMidiOutputChannels | ( |  | ) | `[inline, virtual]`

| Return number of MIDI output channels. Returns: Number of MIDI Output Channels: 1-15, otherwise: 16 or no MIDI Channels at all See also: getNumMidiInputChannels()

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. Returns: ASIO output latency See also: getInputLatency()

bool AudioEffectX::getOutputProperties | ( | VstInt32 | index,
|  | VstPinProperties * | properties
| ) | `[inline, virtual]`

  | Return the properties of input index. Parameters:
  | index | The index to the output, starting with 0
  | properties | A pointer to a VstPinProperties structure
  Returns: true on success See also: getInputProperties() Note: Example 1
      	bool MyPlug::getOutputProperties (long 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 (long 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. Parameters:
  | index | Index of the parameter
  | p | Pointer to VstParameterProperties
Returns: Return true on success

VstPlugCategory AudioEffectX::getPlugCategory | ( |  | ) | `[virtual]`

| Specify a category that fits the plug (VstPlugCategory). Returns: Plug-in's category defined in VstPlugCategory

bool AudioEffectX::getProductString | ( | char * | text | ) | `[inline, virtual]`

  | Fill text with a string identifying the product name. Parameters:
  | text | A string up to 64 chars
Returns: true on success

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). Parameters:
  | 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.
Returns: true on success

bool AudioEffectX::getSpeakerArrangement | ( | VstSpeakerArrangement ** | pluginInput,
|  | VstSpeakerArrangement ** | pluginOutput
| ) | `[inline, virtual]`

  | Return the plug-in's speaker arrangements. Parameters:
  | pluginInput | A pointer to the input's VstSpeakerArrangement structure.
  | pluginOutput | A pointer to the output's VstSpeakerArrangement structure.
  Returns: true on success Note: setSpeakerArrangement() and getSpeakerArrangement() are always called in suspended state. (like setSampleRate() or setBlockSize()).
      Here an example code to show how the host uses getSpeakerArrangement()
      	VstSpeakerArrangement *plugInputVstArr = 0;
      	VstSpeakerArrangement *plugOutputVstArr = 0;
      	if (getFormatVersion () >= 2300 && getSpeakerArrangement (&plugInputVstArr, &plugOutputVstArr))
      		....
See also: setSpeakerArrangement()

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. Parameters:
  | filter | A mask indicating which fields are requested, as some items may require extensive conversions. See the flags in VstTimeInfo
Returns: A pointer to a VstTimeInfo structure or NULL if not implemented by the Host

bool AudioEffectX::getVendorString | ( | char * | text | ) | `[inline, virtual]`

  | Fill text with a string identifying the vendor. Parameters:
  | text | A string up to 64 chars
Returns: true on success

VstInt32 AudioEffectX::getVendorVersion | ( |  | ) | `[inline, virtual]`

| Return vendor-specific version. Returns: The version of the plug-in Note: This should be upported

VstInt32 AudioEffectX::getVstVersion | ( |  | ) | `[inline, virtual]`

| Returns the current VST Version (kVstVersion). Returns: 2xxx : the last VST 2.x plug-in version (by default) 0 : older versions

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. Parameters:
  | channel |
Returns: true: if the MidiProgramNames, MidiKeyNames or MidiControllerNames had changed on this 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(). Returns: true on success See also: setSpeakerArrangement(), getSpeakerArrangement()

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(). Parameters:
  | state | true: is an instrument (default) false: is a simple audio effect

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. Parameters:
  | to |
  | from |
Returns: Returns true on success See also: allocateArrangement(), deallocateArrangement(), copySpeaker()

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). Parameters:
  | ptr |
Returns: Returns true on success See also: closeFileSelector()

VstInt32 AudioEffectX::processEvents | ( | VstEvents * | events | ) | `[inline, virtual]`

| Called when new MIDI events come in. Returns: 0 means 'wants no more'...else return 1! See also: VstEvents, VstMidiEvents, wantEvents()

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. Parameters:
  | varIo |
Returns: on success

bool AudioEffectX::sendVstEventsToHost | ( | VstEvents * | events | ) |

  | Send MIDI events back to Host application. Can be called inside processReplacing. Parameters:
  | events | Fill with VST events
Returns: Returns true on success

bool AudioEffectX::setBypass | ( | bool | onOff | ) | `[inline, virtual]`

  | For 'soft-bypass' (this could be automated). 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. Note: This bypass feature could be automated by the Host (this means avoid to much CPU requirement in this call) 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. Parameters:
  | onOff |
Returns: true: supports SoftBypass, process will be called, the plug-in should compensate its latency, and copy inputs to outputs false: doesn't support SoftBypass, process will not be called, the Host should bypass the process call See also: processReplacing()

bool AudioEffectX::setPanLaw | ( | VstInt32 | type,
|  | float | val
| ) | `[inline, virtual]`

  | Set the Panning Law used by the Host. Parameters:
  | type |
  | val |
Returns: Returns true on success Note: Gain: for Linear : [1.0 => 0dB PanLaw], [~0.58 => -4.5dB], [0.5 => -6.02dB]

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. Parameters:
  | precision | kVstProcessPrecision32 or kVstProcessPrecision64
Returns: Returns true on success See also: VstProcessPrecision

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(). Parameters:
  | pluginInput | A pointer to the input's VstSpeakerArrangement structure.
  | pluginOutput | A pointer to the output's VstSpeakerArrangement structure.
Returns: true on success Note: setSpeakerArrangement() and getSpeakerArrangement() are always called in suspended state. (like setSampleRate() or setBlockSize()). See also: getSpeakerArrangement()

VstInt32 AudioEffectX::setTotalSampleToProcess | ( | VstInt32 | value | ) | `[inline, virtual]`

  | Called in offline mode before process() or processVariableIo (). It indicates how many samples will be processed in total. Parameters:
  | value | Number of samples to process

bool AudioEffectX::sizeWindow | ( | VstInt32 | width,
|  | VstInt32 | height
| ) | `[virtual]`

  | Requests to resize the editor window. Parameters:
  | width | The window's width in pixel
  | height | The window's height in pixel
Returns: true on success

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. Parameters:
  | 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).
Returns: true on success Note: Implies setParameter (). text==0 is to be expected to check the capability (returns true)

VstInt32 AudioEffectX::updateBlockSize | ( |  | ) | `[virtual]`

| Returns block size from Host (may issue getBlockSize()). Returns: The Host's block size Note: Will cause application to call AudioEffect's setSampleRate() to be called (when implemented).

bool AudioEffectX::updateDisplay | ( |  | ) | `[virtual]`

| Something has changed in plug-in, request an update display like program (MIDI too) and parameters list in Host. Returns: true if supported

double AudioEffectX::updateSampleRate | ( |  | ) | `[virtual]`

| Returns sample rate from Host (may issue setSampleRate()). Returns: The Host's sample rate

virtual VstIntPtr AudioEffectX::vendorSpecific | ( | VstInt32 | lArg,
|  | VstIntPtr | lArg2,
|  | void * | ptrArg,
|  | float | floatArg
| ) | `[inline, virtual]`

| No definition, vendor specific handling.

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

- audioeffectx.h
- audioeffectx.cpp

Empty

Copyright Đ2006 Steinberg Media Technologies. All Rights Reserved.