fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] Crackling sound when more than 4 notes are played simult


From: Aere Greenway
Subject: Re: [fluid-dev] Crackling sound when more than 4 notes are played simultaneously
Date: Thu, 20 Aug 2015 15:09:11 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.8.0

On 08/19/2015 06:30 AM, Herschel Karunaratne wrote:
I am using an ARM board with Ubuntu Linaro 13.04 and Alsa as the sound and MIDI driver. I have a SF with 13 different instruments and playing through USB MIDI. As the Fluidsynth starts I use CC 0 7 0.... command to reduce the volume of all the MIDI channels to zero. When a key is pressed the MIDI sends  Note ON command to all 16 MIDI channels. I switch ON/OFF instruments by setting the MIDI channel volume 0 or 127 again by using cc command again.
My issue is when I start FS, I get the following warnings,
fluidsynth warning: Requested a period size of 64, got 1024 instead
fluidsynth warning: Requested 16 periods, got 8 instead
 
When I play 4 notes(up to 4 notes) simultaneously it plays perfectly but when I press the 5th key (or more) there is a crackling sound like a buffer underrun and when I release one note (4 again) it plays perfectly again.
 
I tried using -c and -z to change the period size but cannot reduce the period size less than 1024 and cannot increase number of periods to more than 8.
 
Any suggestion how this can be fixed?
 
Regards
 
Herschel


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev
Herschel:

On slower machines, FluidSynth/Qsynth works better using JACK (qjackctl). 

Another thing that helps on slower machines, is to set the polyphony down to 64 (rather than the default value of 256). 

But there is another change worth trying.  I got it from David on this e-mail list.  I have documented it below.

If you're still getting audio drop-outs after having made the foregoing changes, there is yet another change you can make to prevent them.

This change works on Ubuntu variants, and I don't know if it is applicable to other Linux distributions.

In the “/etc/security/limits.d/” directory, specific limits are set for specific users. Each file in that directory corresponds to a user-ID, and it specifies the limits for that user.

For example, my user-ID is “aere”, and in the “/etc/security/limits.d/” directory on my system, there is a file named “aere.conf”, which specifies specific limits (or extra capabilities) for me (user “aere”).

The contents of that file on my system, are as follows:

aere - rtprio 85

aere - memlock unlimited

Note that each line starts with my user-ID (“aere”).

You need to create a similar file (for your user-ID) in that directory.

You can do that by running your system's terminal program, and cut-and-pasting the line highlighted below into it, and transmitting that line. If you don't know how to use (or don't have) the “vi” editor, substitute the name of the editor you use (such as “leafpad” or “gedit”) in place of “vi” in the line below. Also, substitute your user-id in place of “userid”.

sudo vi /etc/security/limits.d/userid.conf

After transmitting the above line, you'll have to enter your sign-in password (and the cursor won't advance while you do it).

After successfully entering your password, an empty file will be displayed in the editor. Enter the following two lines, substituting your user-ID in place of “userid” in the two lines you enter:

userid - rtprio 85

userid - memlock unlimited

After doing-so, save the file. You have to log-off and sign back in (or possibly even reboot) before the change takes effect.

With the above change in my system, I can successfully run Qsynth on a very slow (450 megahertz) machine.

So do take the time to try this configuration change. It can make a big difference.

-- 
Sincerely,
Aere

reply via email to

[Prev in Thread] Current Thread [Next in Thread]