[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
Re: [fluid-dev] What is the best way start fluidsynth with zero/low latency?
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
> To: address@hidden
> Date: Wednesday, May 20, 2009, 8:57 PM
> Hi all,
> I am the developer of Piano Booster and I have written
> instructions on how to start fluidsynth see this link.
> 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.
> 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
> 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
> useful addition.
> 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
-> 64 * 16 / 44100 = 23.2 ms
these are default values. But if I try my own settings, I find the same
$ fluidsynth -m alsa_seq -a alsa -o synth.sample-rate=44100.000 audio.periods=2
audio.periods-size=32 -l AI-APiano02trans.sf2
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...
Re: [fluid-dev] What is the best way start fluidsynth with zero/low latency?, Pedro Lopez-Cabanillas, 2009/05/21