hi, is there any tutorial available? couldn´t find any in the VST SDK doc save for a sendMidiEvents declaration ...
trying to implement a pitch to midi plugin, sending CC (pitchbend) data. thank you...
pablo.
how to send midi events in a VSTplugin
-
- KVRAF
- 1940 posts since 16 Aug, 2004 from Vienna, Austria
I hope that I did understand your request correctly...
You can replace lDelta with 0 if you don't know/don't care for the delta. Or remove the line and the next one, since all following structure elements are set to 0 anyway.
To get the host to use the MIDI data correctly is a totally different thing, however...
Just the same as with receiving MIDI from the host. Here's an example for exactly 1 Pitch Bend message...yesno wrote:hi, is there any tutorial available? couldn´t find any in the VST SDK doc save for a sendMidiEvents declaration ...
trying to implement a pitch to midi plugin, sending CC (pitchbend) data.
Code: Select all
VstMidiEvent mEv = /* the one MIDI event */
{
kVstMidiType, /* event type */
(sizeof(mEv) - 2*sizeof(long)), /* byte size */
lDelta, /* delta frames */
0, /* flags */
/* rest is zero anyway */
};
VstEvents ev = /* the event list */
{
1, 0, { (VstEvent *)&mEv, NULL }
};
mEv.midiData[0] = 0xE0;
mEv.midiData[1] = 0x00;
mEv.midiData[2] = 0x40;
sendVstEventsToHost(&ev); /* blow out the event */
To get the host to use the MIDI data correctly is a totally different thing, however...