>IMHO a MIDI driver should be a (real time) user space process able to >accurately transmit MIDI events on the hardware from >CLOCK_MONOTONIC or something similar.
IMHO, to "accurately transmit" means that you have to be able to schedule with an accuracy at a resolution of 1 MIDI byte (320usec). CLOCK_MONOTONIC cannot, by itself, accomplish this, and isn't necessary. One might say its an unnecessary and insufficient condition :) What is needed is an extraordinarily (by comparison with most systems) high resolution timer. This can only be provided by (1) a device like the timer on the old GUS boards or (2) something like what the KURT patches do (constantly reprogram the system timer to interrupt when needed). Without them, I don't see how this can ever be done with the correct timing. I define correct to be the timing that would be obtained from a device driver that blocked all interrupts but its own, and had a queue of say 4kB of MIDI data that it delivered in an uninterrupted stream via a h/w MIDI port. --p
