This is the midi driver
    you got it from psl (Peter Langston)
	    [89/02/21 - RCS mpu.c 1.12, mpureg.h 1.7, mpuvar.h 1.6]
    who got it from dss (Daniel Steinberg)
    who got it from psl (Peter Langston)
    who got it from dss (Daniel Steinberg) and mike (Mike Hawley)
    who got it from psl (Peter Langston)
    who got it from mike (Mike Hawley)
    who got it from rusty (Rusty Wright) and dgl (Gareth Loy).

See to_install* for instructions on incorporating this driver into
your system.

Things that you might not find in the copious documentation:

	ioctl(fd, MPU_IOC_TRACK, ip)
	int *ip;	/* contains track number */
		Sets track number for following writes; there are MPU_TTR_MAX
		tracks, MPU_DTR_NUM of them are data tracks, (numbered 0
		through 7 ... oops! ... I mean 0 through MPU_DTR_NUM - 1);
		the other two (MPU_TTR_MAX - MPU_DTR_NUM) are the command
		track, MPU_CTR_COM, and the conductor track, MPU_CTR_CND.

	ioctl(fd, MPU_IOC_LIMIT, ip)
	int *ip;	/* points to buffer limit (in MAXBSIZE units) */
		Sets the per-track buffer limit for holding write data
		waiting for output to the MPU.  The argument is in units
		of buffers (each MAXBSIZE long).  The default (MPUD_DEFBLIMIT)
		is set for 8k bytes with a minimum of 2.  8k bytes is a
		lot of data, but the MPU could conceivably eat ~3k bytes/sec.
		At present on the Sun3, each system buffer is 8k bytes.
		The default has a two buffer minimum so the the data can
		always be waiting when the MPU is ready for it.  The ioctl()
		can set the limit anywhere in the range 1 to MPUD_MAXBLIMIT
		(currently 256).  Limits bigger than the size of your buffer
		pool are silly but not dangerous.

	ioctl(fd, MPU_IOC_PURGE, 0)
		Stops the MPU dead in its tracks (yuk, yuk) and flushes
		track buffers.  You can still send it data and it should
		be able to play it...

	ioctl(fd, MPU_IOC_RESID, cnts)
	int cnts[MPU_TTR_MAX];
		Return the "residual" counts for the data tracks, the
		command track, and the conductor track.  Cnts[0] through
		cnts[MPU_DTR_NUM - 1] are the data tracks byte counts,
		cnts[MPU_CTR_COM] is the command track residual byte
		count and cnts[MPU_CTR_CND] is the conductor track count.


	The driver checks that time-tags are in the range 0-EF
	or are F8 (this checking is ONLY done on data tracks 0-7).
	Anything else is handled as one of three cases:
	1) FF or FC
		This byte is skipped.  MPU_RESET (FF) used to hang the driver
		badly and was often sent by accident (e.g. any data recorded
		with MPU commands or sys. excl. in it).
	2) F0
		System exclusive data is simply skipped over.  In other words,
		bytes up to a non-realtime command byte (bit 7 on) are skipped.
		Real-time messages are passed through.
	3) F1-F7, F9-FB, FD, or FE
		Anything else purges the track.  I've never had this happen
		except on test cases, but it looks like the right thing to do.
