On Friday 30 December 2005 18:06, Florian Schmidt wrote:
On Fri, 30 Dec 2005 17:37:13 +0100
Werner Schweer <ws(a)seh.de> wrote:
...
Last note about RT-linux kernels: its not _that_
important. Its
only a micro optimization. A normal recent kernel works pretty well.
If your normal kernel does not operate with sufficient low latencies,
the RT-kernel will most likely also not work.
I do not agree. While this is true for an otherwise unloaded system, it
is rather easy (on a vanilla kernel) to produce xruns by putting other
load on the system.
The IRQ priorization provided by -rt kernels is extremely useful to
avoid these. It is _vital_ to run jackd with a priority higher than
those IRQ handlers not doing audio/midi stuff (network, disk, etc). The
soundcard IRQ handler must run with a high prio for this to work, too.
I'm not all too sure about whether it matters which of the two (jack or
soundcard irq) is higher though, as long as both are higher than other
irq handlers.
higher priority thread can interrupt lower priority threads. What do
you gain if the soundcard can interrupt the jack thread? I believe
it does not matter.
Interrupt routines on a well behaved system are using only some
microseconds so it should not matter at all for audio purposes.
Or do i miss something here?
It is very useful to be able to do other stuff while audio/midi is
working uninterrupted. I got used to be able to compile a kernel
alongside running jackd with a periodsize of 32 or 16 frames :) which
means, i can play o.e. guitar while waiting for the damn compile to
finish.
32 or 16 frames is IMHO insanely low. Lets assume your keyboard is
only 3.5m away from the drummer, you are about 10msec out of sync, which
translates to about 256 frames. This works reliable on a vanilla kernel
whatever you are doing in the background.
An interesting question is what max. latencies are accepted for real live
situations?
I can comfortably play keyboard at 20msec latency.
Something really bad is a timing _jitter_ of midi events. For
some drumloops you can hear a jitter of 2ms or lower. Latencies are
not so important for me but low jitter is.
Flo
P.S.: softsynths need to have their midi thread higher prio than jackd,
too, for the flawless midi timing to work. So i suppose it's time for
some bug reports to softsynth authors :)