2

I'm trying to run amsynth on a rpi. Latest version of raspbian, fresh install.

I tested amsynth on my x86 desktop and it works great, no latency.

On the rpi however, I get a delay of around 1 sec between sending a midi command (using vkeybd) and hearing the tone.

Setting a better niceness doesn't seem to help.

I wrote a small script in python using the mido library to control amsynth also but I still hear the lag.

How would I go about trying to debug what is causing this? I am basically just an end user.

I'm guessing either the midi command is getting delayed somehow, or amsynth itself is lagging (seems unlikely).

Load average is 0.4 during these tests, vs 0.1 idling.

top shows amsynth hovering at 12% CPU utilization.

A low latency kernel shouldn't be needed for this right? I would imagine that application would be for getting the latency down from 50 ms to 10 ms, for example, vs what I want to do here is just get the latency down from 1000 ms to 50 ms.

Edit: Using alsa, and not getting any sort of audio lag with any other programs, ie, playing audio from youtube in chromium works in real time. When I press play and pause, the delay is not even noticeable.

  • amsynth, not asynth – cat pants Oct 2 '18 at 20:04
  • First thing I would do is write a little script to output text to a tty or something you can monitor for every keypress to see if it's the input or output that is delayed. Is the delay pretty consistent ? – Patrick Taylor Oct 3 '18 at 6:30
1

Try to determine what you use with amsynth and vkeybd: Jack, alsa, etc Then you can try:

Hard way it's use:

0

Make sure the process has realtime privileges (this is typically done per-user).

As mentioned by Ivan, a kernel with the PREEMPT_RT patchset maybe more suitable.

In my experience, JACK is better than ALSA for low latency audio.

http://jackaudio.org/faq/linux_rt_config.html

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.