Wow, that looks awesome.
One silly question: how do you provide a MIDI input to other programs on the computer? That is, what does it mean to define a MIDI endpoint (if that's the right terminology)? Or, rather, what's ALSA MIDI?
Also, I added a link to ttymidi to the MIDI section of communication section of the interfacing with hardware page on the playground. There's a link there for a similar program for the Mac.