For anyone interested, I have found that shortening the length of the MIDI notes can be very useful.
For example in my case I need to control visuals in real time, and often the MIDI notes were “too close” to each other (aka not enough time for the MIDI off to occur, resulting in missing some midi events).
I tried using .sustain() but for my particular application I found .legato() to be more suitable