3

Ubuntu 20.04.1 (upgraded from Ubuntu 16.04 -> 18.04 -> 20.04 if that matters)...

I recently bought a USB MIDI keyboard (MAudio Hammer 88), with Yoshimi soft synthesizer I had noticeable lag between pressing a key and hearing the sound. There is a bit of a real physical sound when pressing the keyboard key (the internal hammer mechanism), and the delay between that sound and the MIDI sound was not just a subtle slight lag, but pretty much like the delay in a 2-sylable word, totally unplayable musically.

I read elsewhere that "apt install linux-lowlatency" should fix it but the problem is still about the same. I don't have precise science or timings on how bad it is but it is still like a 2-sylable word. Or if I play a triplet, I don't think I'm hearing the first note until I'm hitting the 3rd.

$ uname -a
Linux [myhostname] 5.4.0-53-lowlatency #59-Ubuntu SMP PREEMPT Wed Oct 21 11:21:50 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 20.04.1 LTS

What other improvements or can I make? or other steps to diagnose the source of the problem?

  • The problem is not with the MIDI or the scheduling, but with the synthesizing and playback of the sounds. Are you using PulseAudio, or ALSA, or Jack? – CL. Nov 16 '20 at 21:32
  • @CL. thanks for following up. https://askubuntu.com/questions/1292895/how-would-i-know-if-im-using-pulseaudio-alsa-or-jack – Martin Moops Nov 17 '20 at 01:37
  • I guess PulseAudio is the default in Ubuntu. Try configuring Yoshimi for Jack, and configuring Jack for low latency. Alternatively, configure a smaller buffer (fewer, smaller fragments) for PulseAudio. – CL. Nov 17 '20 at 15:15

1 Answers1

0

This fixed it for me when using pulseaudio

https://www.reddit.com/r/linux_gaming/comments/e1ougw/how_to_fix_high_sound_latency/'

I used the below settings

default-fragments = 2default-fragment-size-msec = 15