*********************************************************************************
*										*
*                 MODULAR ROLAND MPU-401 MIDI INTERFACE DRIVER                  *
*                            MIDI/Sequencer library                             *
*										*
*			    written by Kim Burgaard				*
*		     copyright (c) 1994, 1995 Kim Burgaard			*
*										*
*********************************************************************************

		     *** CHANGE LOG started 1994-12-03 ***

1995-08-07:

Changed all Makefiles to handle dependencies correctly and removed some obsolete
pattern matching rules.

1995-08-06:

Fixed the time calculation algorithm in midifile.c. Now, the correct playing time
is calculated for all kinds of MIDI files, even if they have stored their tempo
information in a braindead way.

1995-07-30:

The driver now manually sends various kinds of MIDI and General MIDI reset
commands upon driver release and removal. Thus, hanging notes shouldn't be a
problem, even if you are not using a GS/GM compatible synthesizer.

1995-07-28:

Fixed a problem with smfrecord. Sometimes the driver chocked on the input from
MIDI IN. Especially many pitch bender events caused the driver to stop recording.

mpuconfig now automatically remaps IRQ 2 to IRQ 9.

1995-07-27:

Fixed some problems pertaining to the recently implemented metronome functions.

1995-07-20:

Began working on a C++ implementation of the MIDI library. Still in a very early
design phase, and I've got to refresh my pretty rusty C++ before some serious
work can be done.

Changed SysEx recording from using a fixed size buffer to dynamically allocate
memory.

Implemented a blocking sync io control, which can be used to ``synchronice''
e.g. a sequencers graphic output on a per beat basis (denominator subdivision of
a measure that is).

Implemented a metronome, which per default supports Roland GS metronome sound
patches, but it can of course be user programmed.

Code clean-up in the driver subdir. Removed redundancy in blocking message
system + small changes to the blocking system.

Compiled and tested the driver under Linux 1.3.11 with no problems.

Added simple tempo, time signature and GM/GS SysEx support to smfrecord.

Added a track filter to smfedit.

1995-07-18:

Fixed overdub recording.

1995-07-15:

Fixed MPUIOC_PUT_IMMEDIATE. I'm not sure whether this I/O control call has ever
worked before, but now it certainly does.

Wrote some queue examples in libmidifile.tex.

1995-07-12:

Rewrote much of the queue algorithm -- now it actually works! The old versions
had several serious bugs which unfortunately never showed up until recently.

Fixed many problems with the new blocking message system. Made minor
optimizations in the midi library.

Plain recording now works correctly, but overdubbing still have to be fixed.

1995-07-02:

Fixed an error in the queue algorithm that made the driver hang the kernel.
Located and fixed the problem that made it impossible to use mpuinfo -f while the
driver was playing or recording.

1995-06-24:

smfplay now uses the highest possible timebase available from the MPU (192).

1995-06-23:

Changed the location of mpu401.conf from /etc/ to /var/lib/ since the file format
is binary and thus, the previous placement was a violation of the FSSTND.

Hopefully, the package now compiles without warnings on an ELF system, but I'm
not sure, since I'm still running under an a.out system...

1995-06-20:

Fixed hordes of bugs introduced by the changes mentioned below. 

1995-06-11:

*Major* code clean up in almost all files. Most changes made in the driver, where
all structures have been rewritten, and many functions have been changed. Further
more I've changed the IOCTL interface and introduced some new blocking methods.

The driver now verifies whether the given irq is correct at insertion time.
Changed type declarations to take care of signed/unsigned char/int etc.

1995-06-08:

Went berserk with ispell on practically all text files. Corrected numerous
spelling errors in libmidifile.tex.

Fixed up mpuinfo -f. Among other things, it now automatically adjust its ouput to
the size of the tty.

1995-06-07:

Implemented support for saving in format 1 in the midi file library.

1995-06-02:

Continuous debug dump mode in mpuinfo now uses ncurses, which produces a much
more readable output. It's quite a spectacle and nice for showing off!

1995-06-01:

Changed the algorithm described at 1995-05-21 to a more ``intelligent''
implementation, which removes some rare problems due to unbalanced NOTE ON/OFF
pairs.

The following illustrates the way the new algorithm works:

   ON                             OFF
   |------------NOTE 1-------------|

                            ON                             OFF
                            |------------NOTE 2-------------|

The situation depicted above (NOTE 1 and 2 are on the very same channel *and* key)
will be converted as depicted below: 

   ON                     OFF
   |------------NOTE 1-----|
                            ON                             OFF
                            |------------NOTE 2-------------|

I.e. the intersection between the two notes will be removed. In the old
algorithm, note 1' NOTE OFF were simply removed...

1995-05-29:

Created a doc directory and began writing some documentation for the library.

Changed major device number to 31 after official allocation approved by
<hpa@yggrasil.com>

1995-05-28:

Split the package into a more logic subdirectory structure.

1995-05-23:

Fixed embarrassing bug in note on/off parser in `midifile.c'.

1995-05-21:

Multiple NOTE ON/OFF pairs on the same channel *and* key is now handled
correctly. e.g.:

  VOICE CHANNEL 02 NOTE #036    ON   VELOCITY   069
  VOICE CHANNEL 02 NOTE #036    ON   VELOCITY   072
  VOICE CHANNEL 02 NOTE #036    OFF  VELOCITY   075 <-ERROR, premature note off)!
  VOICE CHANNEL 02 NOTE #036    OFF  VELOCITY   077

The ``offending'' NOTE OFF is simply removed.

Now `twogirls.mid' is actually played 100% correctly! I've suspected this problem
and finally found a solution.

1995-05-20:

Added Martins' (mkp@unixlab.socsci.auc.dk) man pages for all configuration tools
and utilities.

Now using RCS (Revision Control System).

1995-05-19:

Changed locking policy of IRQ. Now, the driver only acquires the IRQ vector when
needed, i.e. when the device is opened. Similar, the IRQ is released when the
device is closed. This enables the possibility of having more cards on the same
IRQ (as long as their driver have the same locking policy). Though, no two cards
with the same IRQ can *never* be used simultaneously!

1995-04-27:

Removed embarrassing bugs in the recording interface; recording never worked in
previous versions. It should work OK now, though I haven't tested it
exhaustively. See `smfrecord.c' for a quick demonstration.

1995-04-26:

Fixed some minor bugs in `midiprint.c'

1995-04-24:

Moved the device number from 0x14 (SOUND_MAJOR) to 0x3F.

Relaxed the tight restrictions on I/O port address and IRQ number.

1995-04-19:

Wrote a simple demonstration application which implements recording. Fixed some
minor bugs in mpu401.c related to recording.

1995-04-02:

I finally located the bug that made the driver hang on certain conditions. The
guilty is partly the MPU-401 card, since it only arose during a SysEx message. I
believe I've fixed this by now and undone some useless changes made in previous
releases concerning race condition and mutual exclusion checking in mpu401.c.

1995-03-31:

Driver state debug information is no longer dumped onto the kernel
log. Now, this information is fetched and displayed by mpuinfo.

The problem with hanging kernel on certain conditions seems to arise from the use
of a dynamically allocated buffer in mpu_control_out (control_old_event) in
mpu401.c. This have been changed.

1995-03-30:

Changed the driver to comply with the new module interface in 'mpu401.c' and
'mpu401.h'. Removed some obsolete files as well (module.c and related files).

Made a minor improvement to the queue algorithm, which now makes it faster than a
similar splay-tree algorithm ;-D -- thanks to <ip@nessie.mcc.ac.uk> (Ian
Pallfreeman)!

Made some long wanted improvements to smfplay. It now handles random replay more
reasonable, i.e. all selected files are indeed played in a random order, but now
all files have to played once before any repeated replay can happen. In other
words, you cannot risk hearing the same file out of 200 over and over any
more. This is implemented via two cyclic queues. Smfplay is now also capable of
skipping to the next file in sequence, simply press Ctrl-C or send a SIGINT.

The sleep/wake_up mechanism inside the driver has been strengthened in order to
avoid race conditions and deadlocks. Finally I dare hope the problems. with
hanging kernels are over.

Fixed problem with smfplay/driver hanging on MIDI files with over 100 META events
(tempo, beat per measure etc.). Both voice and META events are send on demand,
where ALL META events were send to the driver at once in previous versions.

1994-12-04:

Changed the driver device file name '/dev/mpu401' to '/dev/mpu401data'.
(`Makefile', `gsreset'.c and `smfplay.c').

Fixed bug in `midifile.c', function `midi_save_0()'. I calculated a wrong track
size since I counted the track size field with too, effectively making the track
size value 4 bytes too large. This did not cause problems with any of mine
utilities as I do not use the size field but rely on proper META EOT handling
instead. Thus, my MIDI songs (which were processed with the library) did not load
into e.g. WinJammer... :-(

Removed my song collection from the package. They simply took up too much room
:-(

1994-12-03:

Changed MPU_IOP_RETRY from 1000000 to 100000 in `mpu401.c'

Fixed evil bug in `mpu401.c' and `smfplay.c'. It caused the kernel to hang (!)
because of careless use of interruptible_sleep_on/wake_up_interruptible. This
only happened if the user terminated the replayer *exactly* when the driver
attempted to wake up the replayer.

Fixed timeout bug in `mpu401.c', in function `mpu_RqDta'. Forgot cli()/sti()
pairs in mpu_RqDta which caused sync problems between driver and device.

*********************************************************************************
* $Id: CHANGELOG,v 1.8 1995/08/07 06:01:39 burgaard Exp $
* Local variables:
*   fill-column: 81
* End:
