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: Pedro Lopez-Cabanillas
Subject: Re: [fluid-dev] What is the best way start fluidsynth with zero/low latency?
Date: Thu, 21 May 2009 10:31:12 +0200
User-agent: KMail/1.9.6 (enterprise 20070904.708012)

On Wednesday, May 20, 2009, Louis B. wrote:
> Please tell me what I have to do to  get fluidsynth to run as close to
> real time as possible 

There are several factors, but a very important one is the buffer size. It can 
be controlled by two command line options:

 -c, --audio-bufcount=[count]
    Number of audio buffers

 -z, --audio-bufsize=[size]
    Size of each audio buffer

The real buffer size is the product of the two option values. Keep it as low 
as possible to reduce the latency. Too much low values would produce noise  
and distorted sound. The minimum value for -c is 2, but many (Intel HDA) 
cards need a minimum of 3 periods or more.

If you use Jack with FluidSynth, the buffer options must be given in the jackd 
command line (or using a GUI control program, like qjackctl.)

For instance, this command line (Linux, ALSA):

$ fluidsynth -a alsa -c 3 -z 1024 -r 48000 soundfont.sf2

starts FluidSynth with the ALSA driver, a buffer of 3072 frames and a SR of 
48000 Hz. This means about 3*1024/48000 = 0.064 seconds of latency.

If you prefer a nice GUI interface instead of the command line program, you 
can use QSynth, available for Linux, Windows and Mac OSX.
http://qsynth.sourceforge.net

Regards,
Pedro




reply via email to

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