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 66:
66. effGetMidiKeyName
>= VST2.1
@see AudioEffectX::getMidiKeyName()
e[index]: MIDI channel
e[ptr]: points to MidiKeyName* structure initialized by host.
x[ptr]: struct will be filled with information for 'thisProgramIndex' and 'thisKeyNumber'. If keyName is "" the
standard name of the key will be displayed. If 0 is returned, no MidiKeyNames are defined for 'thisProgramIndex'.
x[return]: 1 = successful
C++ method:
bool AudioEffectX::getMidiKeyName(VstInt32 channel, MidiKeyName* keyName)
Delphi method:
function AudioEffectX.getMidiKeyName(channel: VstInt32; keyName: PMidiKeyName): boolean;
MidiKeyName structure:
struct MidiKeyName
{
VstInt32 thisProgramIndex; // 0 or greater: fill struct for this program index.
VstInt32 thisKeyNumber; // 0 - 127. fill struct for this key number.
char keyName[kVstMaxNameLen]; // key name, empty means regular key names
VstInt32 reserved; // zero
VstInt32 flags; // reserved, none defined yet, zero.
};