I just noticed that you schedule MIDI messages on the tempo clock:
|
thisThread.clock.sched(latency, { |
|
instruments[vstName].midi.noteOn(0, note, velocity); |
|
}); |
|
|
|
thisThread.clock.sched(sustain + latency, { |
|
instruments[vstName].midi.noteOff(0, note, velocity); |
|
}); |
For accurate timing, the MIDI messages should be scheduled as OSC bundles instead. For example:
~dirt.server.makeBundle(latency, {
instruments[vstName].midi.noteOn(0, note, velocity);
});
~dirt.server.makeBundle(sustain + latency, {
instruments[vstName].midi.noteOff(0, note, velocity);
});
I just noticed that you schedule MIDI messages on the tempo clock:
TidalVST/TidalVST.scd
Lines 91 to 97 in a625ad6
For accurate timing, the MIDI messages should be scheduled as OSC bundles instead. For example: