fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] What is the best way start fluidsynth with zero/low late


From: Joan Quintana
Subject: Re: [fluid-dev] What is the best way start fluidsynth with zero/low latency?
Date: Thu, 21 May 2009 00:59:31 -0700 (PDT)

--- On Wed, 5/20/09, Louis B. <address@hidden> wrote:

> From: Louis B. <address@hidden>
> Subject: [fluid-dev] What is the best way start fluidsynth with zero/low 
> latency?
> To: address@hidden
> Date: Wednesday, May 20, 2009, 8:57 PM
> Hi all,
> 
> I am the developer of Piano Booster and I have written
> some
> instructions on how to start fluidsynth see this link.
> 
> http://pianobooster.sourceforge.net/faq.html#how-do-i-hear-the-sound-on-linux-ubuntu
> 
> 
> However I cannot get fluidsynth to run with zero/low
> latency. I
> estimated the latency delay  is about 100msec.  I
> can hear a delay
> when I play on the Piano which is always a bad sign. I do
> not get a
> noticeable delay when I play using an external synth. See
> this link
> for more info on my set-up.
> 
> http://n2.nabble.com/Poll---What-system-are-you-running--td2595879.html
> 
> Please tell me what I have to do to  get fluidsynth to
> run as close to
> real time as possible so that I can improve the
> instructions on the
> PianoBooster web site. Please bear in mind that
> PianoBooster also uses
> the CPU fairly heavily and that I and other users are using
> a netbook
> which sits on top of the piano nicely so we also want
> reduce
> fluidsynth CPU usage (as well as Piano Booster CPU usage).
> 
> Do you have an examples page for non technical users on how
> to run
> fluid synth? If there is not one, may I suggest it would be
> very
> useful addition.
> 
> 
> Thanks
> 
> L o u i s   J a m e s    B a r m an

to control latency you can use audio driver jack, or alsa directly.

With Jack is quite easy to control de latency. Go to Setup in Jack Audio 
Connection Kit and tune periods, period size and sample rate. 5msec latency 
must be fine.

You can see how fluidsynth create the alsa driver with your settings:

$ fluidsynth -a jack -m alsa_seq AI-APiano02trans.sf2 
...
creating alsa driver ... hw:0|hw:0|1024|2|44100|0|0|nomon|swmeter|-|32bit
...
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 2 periods
...

to calculate latency: (1024/44100)*2 = 46.4 msec

if you avoid Jack and use alsa directly, I have my doubts in setting latency 
(help is appreciated):

$ fluidsynth -a alsa -m alsa_seq -l AI-APiano02trans.sf2
> settings
audio.periods            16
audio.period-size        64
synth.sample-rate        44100.000
-> 64 * 16 / 44100 = 23.2 ms
these are default values. But if I try my own settings, I find the same 
settings.

$ fluidsynth -m alsa_seq -a alsa -o synth.sample-rate=44100.000 audio.periods=2 
audio.periods-size=32 -l  AI-APiano02trans.sf2

> settings
audio.periods            16
audio.period-size        64
synth.sample-rate        44100.000

How can I tune and control real latency using -a alsa?

Another question is:
If pianobooster is gonna be used by normal users... how to explain them all 
this staff? Of course, pianobooster needs low latency, and it will be necessary 
to use an rt kernel. I needed about six months to be confident with all these 
subjects, understand latency and XRuns...

Joan Quintana

http://wiki.empresalibre.org/index.php/P%C3%A0gina_principal#Inform.C3.A0tica_musical







reply via email to

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