[linux-audio-dev] Audio/Midi system - RT prios..

Florian Schmidt mista.tapas at gmx.net
Sat Dec 31 13:15:32 UTC 2005


On Fri, 30 Dec 2005 19:01:46 +0100
Werner Schweer <ws at seh.de> wrote:

> 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. 

Midi input is generating IRQ's, too (at least it appears so by watching
/proc/interrupts with midi activity only (i.e. hook up your midi in to a
midi monitor, as it seems withouth connections ALSA doesn't bother about
the MIDI at all)). So having the soundcard IRQ handler thread prio
higher than jackd makes sense to get stable midi input timing.

> 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?

I'm not sure. But experience shows (to me at least) that a -rt kernel,
where i can make i.e. the hard disk controller IRQ's lower prio than
jackd and the soundcard irq, is handling additional load on the system
better than a non -rt kernel without this tuning.

> > 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.

It didn't for me. Vanilla generally is a bit more prone to xruns than
-rt is, even at large periodsizes (> 64 frames). But if its good enough
for you.. ;) I suppose it also depends on what exact hw you use.

> An interesting question is what max. latencies are accepted for real live
> situations?

Well, we had this discussion earlier :) Always keep in mind that
latencies are accumulative and people are different. I like to use 32
frames when playing my guitar through the computer, although 64 frames
is good enough, too. 128 or 256 frames definitely start to feel weird,
especially when effects add additional latency. Keep in mind that i
additionally run around in my room :) So the distance from the speakers
produces additional latency.

> 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.

20ms would be way too much for me. I agree though that midi jitter is
also bad :) 

Flo

-- 
Palimm Palimm!
http://tapas.affenbande.org



More information about the Linux-audio-dev mailing list