The win32 midiIn callback timestamps the events with Time::getMillisecondCounter() , but MidiMessageCollector uses Time::getMillisecondCounterHiRes()
The problem is that those two counters are quite different here, their values differ by approximately 0.3 second ! As a consequence the sampleNumber of incoming midi messages is not correctly evaluated.
Should the win32 midi code use the HiRes counter or should the MidiMessageCollector use the normal counter ? It seems that the coremidi version uses getMillisecondCounterHiRes , and the linux ALSA version uses getMillisecondCounter