There are 3 "formats" of MIDI files.  A Format 1 file can contain several
"tracks" representing the many instrumental parts of one pattern (ie, usually
one complete song).  These are the most common files because most sequencers
have several tracks upon which a musician can record the individual
instrumental parts of an arrangement, and format 1 allows these tracks to be
saved and later loaded again intact.  A Format 0 file has only 1 track.  All
of the instrumental parts are mixed together (but still retaining their
individual MIDI channel assignments) into that one track.  Some playback-only
sequencers favor format 0 because the device doesn't have to mix the
instrumental parts "on the fly".  The parts are loaded already fully mixed and
ordered by their musical "timing", and so playback of a format 0 file is more
straightforward than a format 1 file.  (There is also a Format 2 MIDI file,
which is like taking a bunch of Format 0 files, and putting them together.
The Format 2 file therefore contains not just one song or pattern, but perhaps
dozens of songs or patterns, with all of the instrumental parts for one given
song mixed into a single track like with Format 0.  This format is not very
common).
    Since some sequencers can read only one format and not another, I've
written a utility to allow a musician to convert a Format 1 (or 2) file to
Format 0, and vice versa.
    MIDIFORM is run from an OS/2 2.0+ command prompt.  It defaults to
converting a Format 0 file to Format 1.  It takes two arguments; the name of
the original file to convert, and the name of the new file to be created.  If
you don't supply the new filename, the original file is converted and
overwritten.  If you wish to convert a Format 1 file to Format 0, then specify
/0 before the filenames.  For example, to convert Blort.mid to Format 0,
and create a new file called Test.mid:

midiform /0 blort.mid test.mid

    Running MIDIFORM without any args, gives help information.
    When converting Format 0 to Format 1, MIDIFORM separates the MIDI
events by their MIDI channels.	(ie, The MIDI events on channel 1 are put
into a separate track from the MIDI events on channel 2, etc).	All Meta
Events such as Tempo, Time Signature, Lyrics, etc, as well as System
Exclusive, RealTime, and Common events are put into the first track, which is
the "tempo" or "conductor" track.
     When converting Format 1 to Format 0, all but one of the Instrument and
Track Name events are discarded (since there's only one track anyway).
      MIDIFORM can't convert Format 1 files that have > 33 tracks.  It will
only process the first 33 tracks of such a file.  It's a rare MIDI file that
has more tracks.  Also, MIDIFORM has a limitation of handling about 512,000
bytes of System Exclusive data and text characters in Meta Events, and a
limitation of handling about 64,000 MIDI events such as notes, pitch wheel,
controllers, etc, per track.  Again, most MIDI files do not exceed these
limitations.
      MIDIFORM requires that the file MIDIFILE.DLL be placed in some directory
along your CONFIG.SYS's LIBPATH.  Usually, the same directory as where you
place MIDIFORM.EXE will suffice.  Do not use a version of MIDIFILE.DLL dated
earlier than the one included with this release.
      This is version 1.1 which fixes a bug in 1.0 whereby the first event in
some tracks would be lost when converting format 0 to 1.

     The author is:

Jeff Glatt
6 Sycamore Drive East
New Hartford, NY 13413
(315) 735-5350

And now for something completely different (and yet really the same):

MIDIFORM is copyright 1995 by Jeff Glatt.  This program is freely
redistributable as long as this copyright notice is included unaltered.
The only price that you have to pay is the one that you're already paying
by spending all of your time in front of a computer instead of developing
healthier outlets.

 NOT SO STANDARD DISCLAIMER:
 These programs are provided "as is" without warranty of any kind either
expressed or implied or tatooed in a place that only a few people have
ever seen, including but not limited to the implied warranties of
merchantability, fitness for a particular purpose, and the dubious
assumption that the software has been created by a sane individual who
would never do anything that may hurt you. The entire risk as to the
results and performance of the programs is assumed by you or someone who
looks exactly like you.  Jeff Glatt does not guarantee that the functions
in these programs will meet your requirements, especially if your
requirements involve lots of latex and some docile, domesticated animal.
Nor does Jeff Glatt warranty the programs to be uninterruptable or
error-free, although mercifully free of "General Protection Faults".  If you
use said programs, you can not say anything nasty about the author, even
if the programs inadvertently cause the erasure of your collection of
X-rated GIFs of a conservative, overweight and overrated TV "personality"
plooking himself vigorously with his royalty checks from some rancid
paperback.  Jeff Glatt is not responsible for any damages as a result of
anything that he has done, or hasn't done, or was supposed to do but never
got around to it, and furthermore, he doesn't even care so leave him alone,
ratface.  You may have more or less protections in certain states of the
union, depending upon how far your local politician is willing to bend over
for some bribe from a business lobbyist.  Just remember that Jeff Glatt has no
money, so don't bother suing him as a result of any damages caused by this
OS/2 program.  Tell your greasy lawyer to go after IBM, and make sure that you
pick 12 really stupid pinheads for the jury.  If swallowed, induce vomiting
immediately by contemplating the asthetics of Microsoft Windows.

 OS/2 is a trademark of International Business Machines Corporation.
 Windows is a trademark of Microsoft Incorporated, and furthermore, Bill
Gates is to blame for it.
