I’ve run into an odd problem with the timing of midi out from Cabbage.
When I use Csound/Cabbage to generate fast midi notes, it seems the note offs have some odd quantiziation. The note ons have correct timing as far as I can see, but the note offs are misplaced in a manner that looks like time quantization.
If I set the tempo low (say 5 notes per second), it sounds ok, but with tempos above 10, it sounds as if I’m missing some of the notes. When I record the midi output, I see that I do indeed have all the notes, but some of the note durations have become very short.
Here’s a pianoroll view of the recorded midi from Csound/Cabbage, and also the csd I’ve used.
midi_speednote.csd (5.3 KB)
The csd has 4 voices of this mechanism, but I did also simplify it to make sure it was not a coding kludge from me that made the issue pop up. Also tried other methods of midi out (using the midiout opcode, triggered in various ways etc).
I’ve tested running Csound offline and creating a midi file with --midioutfile=“filename.mid”
This creates a midi file with correct note offs.
Also, if I take this as a midi item in Reaper, and just scale the time, so it plays at a faster speed, the note offs are also good.
So it is somehow related to the realtime communication between the DAW and the plugin. Not sure if the problem is with Cabbage or if it is the DAW quantizing to audio buffer boundaries. Just so strange that the note ons are not affected, just the note offs.
Any clues appreciated.
All best
Øyvind


