On Sun, 2010-07-04 at 22:56 +0200, Ralf Mardorf
wrote:
Good to read about this issue. I always disable
the on-board audio
devices, but I would add a second PCI card to my PC and sync it with
the
already installed sound card, so I better
don't do it. It at least
would
be nice to have several MIDI IO by simply using
some cheap Envy24
cards.
Unfortunately those cheap cards seems to use just
one of the two MPUs
supported by the Envy24.
Note that I didn't say Linux does this (it would break separation
between the midi and audio subsystems), just that you can do it if you
know when developing the midi ISR exactly what hardware you have
available on the audio side (Specifically what address the cards
playback position register is).
The thing is you really want that timestamp to be based on the soundcard
clock that will ultimately be outputting the samples generated as a
result of that midi, difficult with things like Pulse (and to an extent
Jack) in the way and obviously unworkable with netjack.
This sort of issue is what the ALSA midi sequencer is really intended to
fix, by making midi timing a kernel problem rather then a user space
one. It sort of solves HALF the problem, in that it makes getting midi
messages out on time more or less possible (at least on paper), but it
does nothing for reliably timestamping incoming midi using a clock that
can be related simply to the audio sample clock and which would thus be
useful when building software synths.
I cannot help but noting that the 'most bone-headed way of doing
low-latency audio' called firewire provides timestamps related to the
sample clock for midi messages (even each MIDI byte). The timestamps are
valid accross multiple devices.
The FFADO backend uses these to position the midi messages in the jack
buffers with sample accuracy. Therefore all jitter you see when using
the a firewire device with FFADO and jack is either due to MIDI itself
or due to the hardware you use. But not due to the software stack
(modulo bugs), the protocol nor the 1394 bus.
Regards,
Pieter