Re: [LAD] automation on Linux (modular approach)

From: <fons@email-addr-hidden>
Date: Thu Mar 25 2010 - 12:22:40 EET

On Thu, Mar 25, 2010 at 10:19:50AM +0100, Philipp wrote:

> Very strange, -Xraw is said to perform better than -Xseq.
> Maybe there's a difference between outboard and software?
>
> In software land jack midi is the clear winner, -Xraw is said to perform
> better than -Xseq, so if it's different for outboard gear, where does
> the difference come from?

I haven't looked closely at the MIDI code in Jack's Alsa
backend, so I can't tell. But AFAIK

1. Alsa's Raw interface does not provide scheduling of
   events to be transmitted at some particular time,
   nor timestamps on received events.

   If timing is important to your use, you have to do
   it yourself, by calling the write() function at the
   right time, and by reading some timer for received
   data.

   Assuming that the backend is not doing this, event
   timing would be quantised to audio period boundaries.
   Note that doing your own timing in this case requires
   a separate thread - the backend as seem from Jack's
   engine must never wait, except for audio period
   boundaries.

   Also to ensure immediate transmission when calling
   the write() function, the caller has to either open
   the device with the SYNC flag set, or use the drain()
   function. Failure to do either could explain the very
   large quantisation I observed with the raw interface
   - it leaves it up to the Alsa code when to transfer
   data from user space to kernel (driver) space, and
   this decision will probably be based on the number
   of bytes waiting etc.

2. The Alsa Sequencer interface allows to put a timestamp
   on transmitted data, and then Alsa will ensure it gets
   transmitted at the right time. It will also provide
   timestamps on received data.

  
Ciao,

-- 
FA
O tu, che porte, correndo si ?
E guerra e morte !
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Thu Mar 25 16:15:01 2010

This archive was generated by hypermail 2.1.8 : Thu Mar 25 2010 - 16:15:01 EET