Mark of the Unicorn Midi Express XT driver for FreeBSD 3.0
author: John Galbraith (john@ece.arizona.edu)

This mtp driver is useful with MIDI hardware manufactured by Mark of
the Unicorn.  The Midi Express XT is what I have, and is known to work
with this driver.  They have other products too, and I don't know to
what level they are compatible with each other.  The sysex
specification refers to the "Midi Time Piece", which must be some
other product with a similar sysex implementation.  This is how I
named this driver, mtp.

To use, untar Makefile, mtp.c, mtp.h, and mtpdev.h into a directory.
"make load" should install the mtp driver as a loadable kernel module (lkm),
assuming that you have the ppbus configured into your kernel.  For instance,
this is what I have in my config file:

controller	ppbus0
controller	ppc0	at isa? port? tty irq 7 vector ppcintr
device		nlpt0	at ppbus?
device		ppi0 	at ppbus?

Notice that the ppbus is a new feature of FreeBSD 3.0, so you have to
be running 3.0 (or later), or prepare to hack this into something else 
like a 2.2 system.

You might be able to config this mtp driver into the kernel as well, but I
haven't tried it.

This driver uses major number 20, which is one "reserved for local
use", according to /sys/i386/conf/majors.i386.  So, make sure that
you aren't using anything else "locally" that will conflict.  If so,
change the #define in mtp.c

The special device looks like this:
crw-rw-rw-  1 root  wheel   20,   0 Nov 10 10:43 /dev/mtp0
this node is created with

mknod /dev/mtp0 c 20 0

run as root.

I have made no attempt whatsoever to be consistent or compatible with
the Voxware sound drivers, or any other driver.  I assume that most
people who actually own a Midi Express XT have other outboard synth
gear and have long since outgrown the cheesy gamer cards supported by
Voxware.  If you have a problem with this, fix it yourself.

TODO list:
  1.  Keep track of timecode information in the driver.  I would like
      to have an ioctl() that returns the current SMPTE time.
  2.  Timestamp all events read with SMPTE time, so a sequencer knows
      exactly when it happened.
  3.  Queue events so they happen at a particular SMPTE time, instead
      of "right now", which is the behavior now.
  4.  Discovery anybody else with the slightest interest in this
      driver.  (Hello? Anybody out there?)  None expected.
