Midi clock sync drift with Korg Volcas

Hi,

I am running into Midi clock sync issues (drift) with my Korg Volca Keys and Korg Volca Beats. I’ve already spend some two hours on the issue and before I spend more time trying to analyse this maybe one of you has some pointers or hints.

Details: I am using Ardour 8.10 on Ubuntu 24.04. I use my old Edirol UA-25 interface for both audio and midi. I am currently using Jackd, but I had the same issue when directly using Alsa. The issue is that both Volcas get out of sync with Ardour quite quickly. It’s very noticable after about 3 minutes at BPM 110, so about 83 bars. The Volcas get ahead as compared to Ardour. I don’t have any other hardware to test with.

I do have a few ideas for further narrowing this down (use another midi clock source, test with another program as a midi clock slave), but maybe there’s something more obvious I am missing? If you have any ideas or sugestions that would be appreciated.

Regards,
Burkhard

Who’s supplying MIDI Clock and who’s trying to follow it?

I should have been more specific there: The Kork Volcas can only receive Midi Clock so Ardour is the clock source and the Volcas are the consumers. To be more accurate, I have exactly one Korg Volca as the Midi Clock follower, but the behaviour is the same with both − the Korg Volca Keys and the Korg Volca Beats. (The Korg Volcas can then be synced with each other over an audio cable, but that’s not relevant here.)

I would suggest testing with another MClk source first. As far as I recall, Ardour’s MClk output is pretty good at this point. I await being corrected :slight_smile:

It took me a bit of fiddling, but I now made some progress.

I am using jack_midi_clock (mostly, because it was easy to install) which generates midi clock from the jack transport. I couldn’t get Ardour’s transport running when setting Ardour up as a midi clock follower, controlling the Jack transport via QjackCtl − presumably, because in this scenario no position information is coming through via Midi Clock. It is also not clear to me if or how I can just tempo-sync Ardour to the Midi Clock, but use its own internal transport control.

I then used Ardour as the “time master” and enabled positional sync to Jack. So now Ardour controls the jack transport which drives jack_midi_clock which sends midi to my Korg Volca. And with this scenario Ardour and the Volca stay in sync. So this will work for me as a workaround for the time being…

Using Ardour’s MIDI tracer I can look at MIDI Clock out (Ardour generated midi clock) and MIDI Clock in (jack_midi_clock generated). They are not the same which kind of makes sense and explains the different behaviour.

Ardour generated midi clock:

+      350464        Position 4
+          70        Continue
+           0           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+        1090           Clock
+         584            Stop

jack_midi_clock generated midi clock:

+      125952        Position 15
+       53248           Start
+         256           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1090           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+        1090           Clock
+        1091           Clock
+        1091           Clock
+        1091           Clock
+         966            Stop
+           0        Position 18

It kind of does look like an issue in Ardour. Can I do anything to verify or cross-check this further? Should this go to the issue tracker?

Let’s wait for @x42 to be back around and commenting.

What’s odd is that the problem appears to be drift, whereas the output difference shown here is only the “startup sequence” …

jack_midi_clock does not correctly set initial position offset according to MIDI spec. I only fixed this in Ardour a few years ago.

Since I no longer use JACK, I have little interest in fixing jack_midi_clock.

I thought the relevant differences are the delta times. Ardour outputs every 1090 whatever-unit-this-is whereas jack_midi_clock outputs every 1091 and every once in a while every 1090. So Ardour’s midi clock is faster which is what I observe − the Korg Volca gets ahead of Ardour’s time.

Ah, yes, that could be relevant … however, the point of being an MClk receiver is that you should do what you are told :slight_smile:

What is the actual tempo and sample rate?

However for the case at hand jack_midi_clock seems to be correct. Assuming 48kHz
a pulse should be sent

48000 (sample/sec) * 60 (sec/min) / 24 (pulse/beat) / 110 (beat/min) = 1090.90 samples/pulse

So about 9 times 1091, and then one 1090 sample delta.

Exactly. I have 48kHz and 110 BPM. And just to reiterate, jack_midi_clock works correctly (no drift) whereas Ardour itself does not (drift, things getting out of sync).

While jack_midi_clock won’t drift in your case, there will be an initial offset, which may or may not be noticeable.

Fixed in Ardour 9.0-pre0-592.

(The issue was introduced in Ardour 7.4, though 7.0 was already slightly off.)

2 Likes

I’ve recently noticed that all my recordings from MIDI-slaved devices are a tiny bit ahead on the “timeline” after a take. Guess this explains why :slight_smile:

Thanks! I’ll try to test the latest version next time I sit down for some audio stuff. Might be days / weeks, though. Is the best way simply to download a nightly build and use that?