I set up my MIDI keyboard with fluidsynth on raspbian, mostly according to this how to.

It all works fine, but I've got a ~1 second latency. Does anybody know how to fix this issue?

RPi model: B
Raspbian image: 2014-01-07-wheezy-raspbian
MIDI Keyboard: Behringer UMA 25S


I'd guess that you're gaining the delay due to some sort of buffering taking place or due to high CPU load. The later you can check by running the top command.

The FluidSynth Wiki suggests three command line options you can use to reduce latency.

-r=RATE (sample rate, default 44100)
-c=NUM  (number of audio buffers, default 16)
-z=SIZE (buffer size, default 64)

These go in the start_fluid script from that page. I'd suggest setting the latter two options to have, so 8 and 32 respectively and see if that improves performance. Edit, if sound starts to stutter, increase them until it stops and latency is acceptable. You can change them independently as well.

  • I would also suggest dropping the sample rate to 22050 if you are using the on-board audio. – reCover May 25 '18 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.