C++:
VstIntPtr function dispatcher(AEffect* e, VstInt32 opcode, VstInt32 index, VstIntPtr value,
void* ptr, float opt);
Delphi:
function dispatcher(e: PAEffect; opcode, index: VstInt32; value: VstIntPtr; ptr: pointer;
opt: Single): VstIntPtr; cdecl;
always returns 0, unless otherwise defined.
all string-pointers points to zero terminated strings.
e[ ]: = plugin receives as entry parameter
x[ ]: = plugin returns to host
dispatcher() function using opcode 56:
56. effGetParameterProperties
56. effGetParameterProperties
>= VST2.0
@see AudioEffectX::getParameterProperties()
e[index]: index of parameter
e[ptr]: pointer to VstParameterProperties* structure
x[return]: 1 = successful
C++ method:
bool AudioEffectX::getParameterProperties(VstInt32 index, VstParameterProperties* p)
Delphi method:
function AudioEffectX.getParameterProperties(index: VstInt32; p: PVstParameterProperties): boolean;
VstParameterProperties structure:
struct VstParameterProperties
{
float stepFloat; // float step
float smallStepFloat; // small float step
float largeStepFloat; // large float step
char label[kVstMaxLabelLen]; // parameter label
VstInt32 flags; // @see VstParameterFlags
VstInt32 minInteger; // integer minimum
VstInt32 maxInteger; // integer maximum
VstInt32 stepInteger; // integer step
VstInt32 largeStepInteger; // large integer step
char shortLabel[kVstMaxShortLabelLen]; // short label, recommended: 6 + delimiter
The following are for remote controller display purposes.
Note that the kVstParameterSupportsDisplayIndex flag must be set.
Host can scan all parameters, and find out in what order to display them:
VstInt16 displayIndex; // index where this parameter should be displayed (starting with 0)
Host can also possibly display the parameter group (category), such as...
-------------------------------------
Osc 1
Wave Detune Octave Mod
-------------------------------------
...if the plug-in supports it (flag #kVstParameterSupportsDisplayCategory)
VstInt16 category; // 0: no category, else group index + 1
VstInt16 numParametersInCategory; // number of parameters in category
VstInt16 reserved; // zero
char categoryLabel[kVstMaxCategLabelLen]; // category label, e.g. "Osc 1"
char future[16]; // reserved for future use
};
VstParameterFlags constants:
enum VstParameterFlags
{
kVstParameterIsSwitch = 1 << 0, // parameter is a switch (on/off)
kVstParameterUsesIntegerMinMax = 1 << 1, // minInteger, maxInteger valid
kVstParameterUsesFloatStep = 1 << 2, // stepFloat, smallStepFloat, largeStepFloat valid
kVstParameterUsesIntStep = 1 << 3, // stepInteger, largeStepInteger valid
kVstParameterSupportsDisplayIndex = 1 << 4, // displayIndex valid
kVstParameterSupportsDisplayCategory = 1 << 5, // category, etc. valid
kVstParameterCanRamp = 1 << 6 // set if parameter value can ramp up/down
};