Syncing Problem: Audio arrives much later than MIDI data. Why?

Hello there!

I stumbled upon a problem that I find very weird (and annoying) when trying to sync VCV Rack with external gear. My Audio input comes in quite a bit later than the MIDI signal, although I use a very small buffer.

In this example I have connected a Korg Volca and monologue, the sync pulse from the Volca goes through the monologue and to an audio input of the sound card, the MIDI from the monologue is connected with USB. (Volca and monologue are synced perfectly.)

I had the exact same issue when connecting just a Beatstep Pro, clock pulse on the audio input, MIDI over USB.

This is what I get: pulses

In this picture the clean squares are the MIDI gates, the oddly shaped pulses are the sync signal from the audio. The buffer size of my sound card is set to 64 samples at 48kHz, which gives me a roundtrip latency of 5ms… The Audio pulses are 8th notes, MIDI pulses 16th notes, the speed is 93bpm… The MIDI pulses closest to the audio pulses are definitely the corresponding ones. (The audio is definitely later than the MIDI, not the other way around). I don’t know how to measure it exactly, but the difference I see here is more in the range of 100ms and it’s very clearly audible and destroys rhythms.

So… how can it be that the audio comes in THAT much later than the MIDI?

I have lined the pulses up with the NYSTHI Xatto Delayer at 0027.00… so I guess it’s 27ms between the MIDI and the audio… not as much as I guessed, but still a lot, considering that other software notes my input latency at 2.3ms.

PS: The audio is connected to with an AUDIO-8 module, the MIDI with a MIDI-CV, so the AUDIO-8 module has to be sending it out with a significant delay.

Outside of Rack I think there will be various ADC/DAC buffers introducing latency in an audio chain, 27ms doesn’t sound abnormal to me. Also note that in Rack V1 incoming MIDI is not very reliable and jittery. See Andrew’s response here:

1 Like

That’s quite common. Although big name DAWs should probably have a better driver compability, in addition to placing great importance on MIDI compliance. For VCV, whilst in its early development stages, this certainly isn’t top of the list.

What could help? ASIO drivers, unless you already use one. A dedicated Audio Interface… unless you already use one. (Soundcard as in on-board?)

  • maybe: A dedicated Audio Interface with MIDI in… to send MIDI and Audio via the same device and USB connection.

And you already solved the worst case: Use a Delay to make up for latency. TIP: Using Stoermelder STRIP you can save whole Rows of modules including their cable connections. Add all MIDI modules to a row, merge all outputs with 23Volts Merge modules then merge all merge modules with their polymerge. Now run the polymerge signal through a polyphonic signal delay. Split them back up. Allign all modules without gaps into a row, add STRIP, rightclick and save as. Now when you need MIDI, open a STRIP module, rightclick and load your saved preset. All modules and connections will be loaded into the current row and all you have to do is readjust one delay knob in case there’s fluctuations.

Not the most elegant solution, but you’ll have synced/instantly syncable signals. If you always use the same Set-up with corresponding MIDI outs… that’d remarkably reduce the size of this preset.

2 Likes

Do we have one?

Thank you for your replies!

I use an RME Multiface II with PCI express card and ASIO drivers. The latencies that other software shows me with the current settings (64 samples buffer @48kHz) look like this: 2.3ms input latency (This should include conversion, right?) + 1.3ms processing latency + 1.4ms output latency = 5ms roundtrip latency.

If anything I was hoping that Rack would be even a bit faster on the processing side, an additional 27ms is a real problem.

I’m very aware of the MIDI-jitter problem, but it has nothing to do with this and the jitter is much smaller than the audio delay, although it somehow is also dependent on the buffer size of the audio.

So… I don’t know anything about the coding part, but I really hope that this can be improved by someone who knows how to… because this is a real hybrid-system killer.

@Vortico Could you please explain what is going on here and if there is hope for improvements?

This is the procedure for bug reports and feature requests: Bugs and Features — VCV Rack documentation

Maybe this one?

Or this?

2 Likes

ok, so this is a known issue then… thanks! Didn’t know if this is a bug or just how Rack works…

So resetting the audio module might help… will test that, really hope it does.

Initializing the AUDIO-8 module helped a lot, this is what it looks like after the reset: pulses after reset

This looks a lot more like what I was expecting… still a tiny bit of delay and of course a bit of MIDI-jitter, but I think I can work with this. So: Don’t forget to initialize your AUDIO-8 each time you open up a patch when doing something hybrid. :slight_smile:

Ok, that was… surprising.

Could be a useful addition to the hybrid-system guides on this forum.

I might add that I’m on Windows 10, so don’t know if this behaves the same on OSX or Linux, but definitely good to know this.

1 Like

I use two BOGAUDIO CVD CV Delay modules set to 0.9 to delay a clock and gate I send to an external synthesizer from Rack to keep it fairly aligned with the audio coming out of Rack and the computer. I realize that setting is completely relative. In my case, I have an old computer, I’m using WASAPI audio and my audio device buffer is set to 512 samples.

1 Like