[linux-audio-dev] LADSPA and TiMidity++
David Olofson
david at gardena.net
Wed Sep 18 20:00:27 UTC 2002
On Wednesday 18 September 2002 19.18, Peter L Jones wrote:
[...]
> Well, when I had "-B 8,11" (8 x 2^11 byte buffers), the latency
> was, um, rather amusing :-). Dropping this to "-B 4,4" means I
> can't feel any latency between key press and sound.
That's really rather good for an off-line synth, I'd say! ;-)
> (Dropping to
> -B 3,3 caused very strange behaviour (that lead to an uncontrolled
> reboot)
Oops... If that's three buffers of 8 bytes, I'm not surprized - but
still, the worst accident that should be possible (with SCHED_FIFO
and no watchdog) should be a user space freeze. Was that what
happened?
> and -B 2,2 was too small - very strange noises produced.)
Well, you should never use less than 3 buffers for anything if you
can avoid it (applies to video as well, BTW), and you should probably
stay above the minimum PCI DMA burstsize limit of 64 bytes. :-)
> > (I'm talking about low latency mixing with live MIDI input,
> > rather than playing back MIDI files with a large audio buffer.
> > And no, I don't know how well timidity performs in this regard.
> > Just pointing out some potential issues to keep in mind with any
> > soft synth setup, basically.)
>
> Yup - my default set up is tuned for file playback, so it's tuned
> to even out any problems caused by system performance. For manual
> play, it needs to be tuned for low latency, which -B 4,4 appears to
> achieve (at least, I've not yet come across further problems...).
Well, buffering is obvious, but there's a *lot* more than that to it,
if you want reliable real time performance. It's all about the design
of the synth engine; chosing determinism before faster average speed,
avoiding (standard) dynamic memory allocation, avoiding certain ways
of talking to devices and other processes etc...
//David
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`---------------------------> http://www.linuxdj.com/maia/ -'
.- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`-------------------------------------> http://olofson.net -'
More information about the Linux-audio-dev
mailing list