Extreme MIDI (Synth) Latency

Just trying Ardour again after many years, and experiencing extreme (250 ms???) latency between playing a note on my USB MIDI keyboard and hearing it (default piano patch).

The problem seems on the audio end, not MIDI, as there’s also delay when playing the virtual keyboard, and the audio meters show the sound before I hear it. I know light travels faster than sound, but I’m just not that far from my speakers…

Hints please…

(M1 MacMini)

1 Like

What system are you running? Sometimes we ask too much from built-in soundcards on slower computers…

That not being the case, what’s your buffer size setting (session start window) ?
Sem Título

(M1 MacMini)

Buffer 1k, but trying the smallest didn’t help…

The only time I’ve experienced that was when trying to push a computer beyond its capabilities and having to dial a very high latency on purpose…

Have you tried setting up your session through JACK?

On windows for Low latency you have to use Driver: ASIO

MME (Microsoft Multimedia Extensions) is the default Windows desktop driver that is not not really usable for pro-audio (but handy if you’re traveling with a laptop and no real soundcard).

If you don’t have ASIO drivers for your soundcard: https://asio4all.org/

I have found that the WASAPI driver is not bad, much better than MME, and allows sharing with other applications (I have been using it recently to have Ardour audio presented in Zoom calls which as far as I understand is not possible with the ASIO driver).

But the original poster clearly stated Mac Mini with M1 processor, the response from pedcab was providing some general buffer setting advice, but not directly applicable to the OP system.

Need someone with more CoreAudio experience to give advice on reducing latency.

1 Like

I see. I was misled by @pedcab’s screenshot.

yeah. on macOS/Coreaudio it’s surprising. That usually just works fine with buffersizes of 256 samples or therearbouts.

PS. Ignore the suggestion about JACK. That’d sit on top of Coreaudio and will not help here (besides it’s tricky to setup on recent macOS).

Sorry for that… Not at my audio computer at the time. I run Linux Mint with either a Scarlett or a Fender IO with no such latency issues on any of them… I was just trying to highlight the relevant setting on my work PC…

Just fired it up, and when I play a note, I get a double strike!!! The first is unnoticeable normal latency I think, the second, the ~250ms latency. Wha?!?

And, after a few minutes of this & that, I’m back to only the 250ms note.

OK, I bet I just set up Ardour wrong. It’s very confusing. Will try to reset to factory settings and start over…

OK, I deleted the Ardour Preferences folder from library/preferences. Started it up, went thru the opening dialogs, created one MIDI track, and, well, at least I got sound. But still the 1/4sec delay :frowning:

I don’t have an idea how this can even be possible. Ardour does not even support buffers that long.

So either the audio signal is delayed elsewhere on the way out, or incomingMIDI data arrives late (or with wrong timestamp). To find out which it is:

  • Can you check visually:
    • When you hit a key on the MIDI keyboard, how long does it take until the meter moves on the MIDI track in Ardour’s mixer
    • Ardour Menu > WIndow > MIDI Tracer (select the MIDI input), does the tracer instantly show the note (without 1/4 second delay)
  • Can you try with Ardour’s Virtual Keyboard (Menu > Window > Virtual Keyboard)? Does that also have a long latency.

What soundcard do you use, and how do you connect the MIDI keyboard to the mac?

Please see my original post for most info.

No “soundcard”. USB speaker.

USB keyboard.

So USB speaker acts as soundcard (aka audio interface). What speaker/interface is that? If this is a consumer device intended only for playback it may cause the delay.

  • Do you perhaps use a USB-hub? Those are known to cause issues when connecting audio/MIDI gear.

  • Do you also get a long delay when you use the mac’s internal speakers?

It’s just a speaker. Using the Mac’s audio out.

Like I said above,
Just fired it up, and when I play a note, I get a double strike!!! The first is unnoticeable normal latency I think, the second, the ~250ms latency. Wha?!?

So, there’s a low latency path hiding in there somewhere, but that’s the only time it appeared.

You previously wrote that it was a “USB speaker.” Is it an analog powered speaker connected to the Mac’s analog audio output, or is it a USB connected speaker?