MIDI & Audio timing

As I had searched over the net and especially here I know there were relatively lot of issues describing timing problem either on MIDI or audio side (or both). But I did not find any relatively new one (Cubase 11+) and in any of the others I did not see any functional solution. And yes - I had read the SOS article Martin Jirsak posted the link in couple of topics. So here is mine:
I tried to analyze some question from another man from FB and due to that I found this:

  • recording MIDI data from MIDI track to another MIDI track via external HW synth (either connected directly via USB cable or via USB-MIDI combination) always leads to shifted data (approx. 2-55ms) in new track comparing to the original. This might be OK due to some delay in MIDI communication which is not handled (probably) in Cubase like audio latency is - but why this delay is NOT stable and fixed?
  • recorded audio based on the original MIDI track (again - external HW synth) is not time accurate too, but here can be seen “oscillating” values (again approx. -2…+2ms comparing to the start position of MIDI notes) - again why this value is not fixed again?
    Couple of screenshots to illustrate:

Is this normal or am I missing something?
Intel platform, W11 22H2, C12.0.52, used Argon8 synth (direct USB connection) and Virus b via Midex8. These result were the best and “WinRT Device” had been used. As a sondcard was Antelope Discrete 8 Pro used via USB connection, Antelope ASIO driver. All drivers are running on their latest versions.
Thnx for any discussion - I would be glad to find the answers (if possible).
Regards, Pavel

The data rate of MIDI is extremely low. You can send about 3000 bytes per second. This might just barely give you millisecond precision of note-on and note-off, as long as there’s only a single note. Chords will be broken across multiple milliseconds, for example, just inherent in the protocol; with additional latency on CPU, USB, and hardware, it gets worse.

Many more advanced commands in MIDI, such as parameter automation, use SysEx, which use a lot more time on the wire. A 100 byte sysex message might easily end up using 40 milliseconds. Pitch bend and other controllers also take their toll.
Also, when some data are waiting behind other data, there will be queuing – note-ons right after a sysex will be late, and will hopefully start catching up as long as you’re not saturating the wire, making subsequent notes be less delayed again.

Debugging this problem exactly, requires some analyzers. Ideally, both software analyzers on the MIDI busses in Cubase (the “midi monitor” type tools,) and hardware analyzers on the bus to/from your hardware (something like a stand-alone MIDI analyzer, or a logic analyzer.)
The problem could be in cubase software, could be in drivers, could be in your MIDI interface, could be in the USB bus, or could be in your synth, could be in your actual data, or a combination of all. It’s really hard to say exactly where it will be for you – you have to eliminate one cause at a time until you’re left with the culprit.

Hi jwatte - many thanx for your answer! I think I know MIDI well thus your answer just “fit” into my mind´s ideas where the (maybe small) problems might be. Definitely this is not mandatory for me (even my expectations were a bit different prior making such this test) and I cannot see any practical utilization of this re-recording MIDI data.
I would focus to the second part then which might be more important then. Again - I am sure (based on my practical experiences) this is not so mandatory if we will discuss the impacts on the whole mix of instruments, vocals etc. It could be seen like “humanization” or how to say :slight_smile: so the only unknown thing for me is the unstable timing. If it correspond to the re-recorded MIDI notest then everything would be clear I think.
Well…actually as I am watching my screenshots again and again I think I found the answer. The recorded audio has got fixed difference comparing to the re-recorded MIDI notes. So if I am right then the “MIDI problem” in timing leads to the audio timing since Cubase`s audio engine processes the incomming audio singnal - which varies in its essential.
OK, probably no further discussion needed. If anyone can bring here some more ideas it could be nice but I think there is nothing more to discuss here.
Regards, Pavel