The host will fill the MIDI event structure with the repeated status, yes, but it won't translate a note-on velocity 0 into a note-off event. That's up to you.martin_l wrote:I guess the host will take care of the "running status" bit, and as a plugin, I always see correctly formed events (albeit with NoteOn, velocity 0), as I get them through the VSTMidiEvent structure.AdmiralQuality wrote: That's very common and is to support MIDI's "running status" feature, where additional data bytes sent after a status byte are interpreted to be new events of the same, previous status type. For dense streams of notes it reduces the bandwidth by up to half, by not needing to constantly switch between note-on and note-off statuses.
Is the voice allocator/assigner part of the WDL framework or your own?Yes, in the ProcessMidiMsg (a wdl routine), translate all messages into an internal format which then is sent to and processed by the voiceallocator. It was in this routine, where I passed on the wrong message to some voices.AdmiralQuality wrote: You should of course only be interpreting the MIDI in one single piece of code. The voice assigner should be called downstream from the MIDI interpreter and entirely unaware of the raw MIDI data.
Cheers,
Martin
Voice allocation is one of the trickiest parts of coding a synth -- hardware or software. (Though even in a hardware synth it's software. Polyphonic synths didn't exist until computer scanned keyboards started to appear in the mid to late 70s.) Everyone just assumes voice assignment is "free" but it's not. (Or they don't think about it at all.) And it gets even more complicated when we have synths with variable numbers of voices, unison modes, different assignment modes, note priorities, and the fact that the user might be changing all and any of those parameters while existing voices are still held down! There's still a few things in mine that aren't quite right, and probably won't be until I start over from scratch. (Further complicated by the fact that I have a GUI keyboard which generates notes but also reflects incoming notes, AND a new feature that lets you lock down held notes as part of the patch. I nearly went insane sorting all that out!
So yes, bear with Martin on this stuff. It makes the voice generation seem easy!

