I spent months writing a very capable MIDI driver. In those days, writing a MIDI driver was a truly non-trivial exercise, as you had to have a MIDI adapter that fed back a 1MHz clock, which you would then program their UART to clock down.
That UART was also a pretty hairy bit of hardware. You had to program it with ASM, and the chip was set up so that a 16-bit address range corresponded to various control states. Setting control states for the chip meant a LOT of homework.
MIDI drivers basically were about as difficult as you could get, as you needed to step down an external clock, and set up things like ring buffers that were large enough to not trip over their own feet during an intense session.
Anyhoo, after a couple of months of working on the driver (and buying a DX-7 as a test bed), I was just about to announce it, when Apple came up with a package of OS utilities that included...a MIDI driver.
I don't think that theirs was as good as mine, but that was beside the point.
I open-sourced the driver, but the OS community wasn't particularly well-established back then, and I believe that it's lost in the sands of time.