[Jack-Devel] major change in jack1 MIDI handling

PrevNext  Index
DateFri, 11 Oct 2013 14:57:35 -0400
From Paul Davis <[hidden] at linuxaudiosystems dot com>
ToJACK <[hidden] at lists dot jackaudio dot org>
Follow-UpTim E. Real Re: [Jack-Devel] major change in jack1 MIDI handling
* the old code that was in drivers/alsa-midi has been set aside
* that code was the basis for a2jmidid, which then formed the basis for the
alsa_midi client that i recently added as an internal client
* that client has now been removed/converted into a "slave" driver that can
be loaded into the server at startup time

This improves the latency characteristics because the major distinguishing
feature of a driver is that it reads incoming data before the rest of the
process cycle and writes outgoing data after the process cycle has finished.

a2jmidid and the new internal client could not do this, because they were
just normal clients with a single process() callback. If they were (as is
typically true) connected in both directions to a client (e.g. Ardour or
QTractor), one direction of the MIDI data flow would be unnecessarily
delayed (which one was an implementation detail of the server).

The new implementation as a driver means that this is no longer true. Data
that arrived just before a process callback will be available for clients
to read and data generated by clients during that same process callback
will be written back (e.g. to hardware) within the same cycle.

This implementation as a driver means that the correct way to get MIDI
working is a bit different. It used to be:

       jackd ...server options... -d alsa ...alsa options ... -X seq

the new form is:

      jackd ...server options -X alsa_midi -d alsa ...alsa options...

But ... this also means that it is possible to use this driver even if you
are NOT using the ALSA backend. This means that users of jack1 who are
using FFADO can also interact with the ALSA MIDI subsystem with driver-like
characteristics, and similarly for netjack.

Finally: the "raw" version of the MIDI interface has been (temporarily)
removed. It will return as a port of devin's anderson's code in jack2, but
also as a slave driver.

Obviously this is all in git right now, not in any release.

--p
PrevNext  Index

1381517863.3829_0.ltw:2, <CAFa_cKmWK88fjtLs6D01QML27LYrbsNhhFayhQvyRj81iGCLjg at mail dot gmail dot com>