Ever try to playback a MIDI (Sequencer) File on a General MIDI sound module,
but for some reason, the patches don't seem correct? Or, a MIDI File may
sound different each time you play it, depending upon what state a previously
played MIDI file left the GM module? Well, the reason for this is because the
MIDI File either doesn't use the General MIDI Patch set, or it doesn't contain
all of the MIDI events that it should (at the start of the file) in order to
properly initialize the card to playback that sequence. MAKEGM alters a MIDI
File so that it conforms to the General MIDI (and GS) specification, and
therefore will allow the file to properly setup a GM/GS module to playback
that file. MAKEGM is run from an OS/2 2.0+ command prompt.
    Furthermore, MAKEGM has the ability to intelligently filter out MIDI
controller, pitch bend, and program change events that are redundant. Such
events don't serve any purpose except to make the MIDI file larger. But,
such events can typically be found in MIDI files made by sequencers that
don't perform this pruning process. MAKEGM also has an Extract option (ie, /x)
to filter out certain MIDI events that occur while no notes are actually
playing (ie, turned on). Unless patches with long release times are being
used, these events also don't serve any purpose. In MIDI files that use such
MIDI events, filtering out redundant and extraneous MIDI events can
significantly reduce the size of MIDI files (and loaded tracks) and streamline
playback.
    MAKEGM can also be used to filter out undefined controllers with the
Undefined (ie, /u) option. Some MIDI files may have such if the composer used
equipment setup to utilize undefined controllers in a proprietary, custom
manner.
    In order to initialize the sound module, MAKEGM ensures that certain MIDI
messages appear at the start of the file. All MIDI channels used (to transmit
note data) in the file must have an initial Program Change event. If there is
MIDI note data upon some channel, but no initial Program Change, MAKEGM
will attempt to deduce an appropriate GM patch based upon any of the track
names assigned to that channel. For example, assume that there's MIDI data
upon channel 1, but no Program Change. One of the tracks with note data upon
channel 1 is named "Piano". MAKEGM will then deduce that the "Grand Piano"
GM patch should be used for channel 1. (MAKEGM will ask if this assignment
is OK, and you can type Y to accept or N to reject, then press ENTER).
    If a track has the word "Drum" in its name, or matches the name of one of
the GM Drum Key Names, then MAKEGM will assume that the track is a drum
part. If  the track is not upon MIDI channel 10, MAKEGM will ask you if this
is indeed a drum part,	and you can type Y to accept or N if the track is not
supposed to be a drum part, then press ENTER. MAKEGM will then ask if you
wish to change the track's MIDI events to channel 10. If you accept, MAKEGM
will also change all other events upon that original MIDI channel to channel
10.
    If MAKEGM just can't deduce a Program Change for a track (ie, it just
can't find an appropriate match to the name), then it will ask you to type in
the name of some GM Patch. Type in a name and press ENTER. It doesn't have
to be the full name, as MAKEGM will match any partial name that you enter.
Here are the GM names that you can type. You don't need to type the part in
parentheses.  (Usually the first 3 or 4 letters of most patch names is
sufficient).

Gra(nd Piano) or Piano
Bri(ght Piano)
Ele(ctric Grand)
Hon(ky Tonk)
(Elec.) Piano 1
(Elec.) Piano 2
Har(psichord)
Cla(vinet)

Cel(leste)
Glo(ckenspiel)
(Music) Box
Vib(raphone)
Mar(imba)
Xy(lophone)
Tub(ular Bells) or Bells
Dul(cimer)

Dra(wbar Organ)
Per(c. Organ)
Roc(k Organ)
Pip(e Organ)
Ree(d Organ)
Acc(ordian)
Harm(onica)
Tan(go Accord)

Nyl(on Guitar)
Ste(el Guitar)
Jaz(z Guitar)
Cle(an Guitar)
Mut(ed Guitar)
Ove(rdrive Gtr)
Dis(torted Gtr)
Harmo(nics Gtr)

Aco(us. Bass)
Fin(ger Bass)
Pic(ked Bass)
Fre(tless Bass)
(Slap) Bass 1
(Slap) Bass 2
Synth Bass 1
Synth Bass 2

Violin
Viola
Cello
Con(tra Bass)
Tre(molo Strs)
Piz(zicato Str)
Orc(h. Harp)
Tim(pani)

Str(ings)
Slo(w Strings)
Syn. 1 (String)
Syn. 2 (String)
(Choir) Aahs
(Choir) Oohs
Synth Voice
(Orchestra) Hit

Tru(mpet)
Tro(mbone)
Tuba
Muted Trumpet
(French) Horn
Bra(ss 1)
Syn. Brass 1
Syn. Brass 2

Sop(rano Sax)
Alt(o Sax)
Tenor (Sax)
Bari(tone Sax)
Oboe
Eng(lish Horn)
Bas(soon)
Clar(inet)

Picc(olo)
Flu(te)
Rec(order)
Pan (Flute)
Bot(tle Blow)
Sha(kuhachi)
Whi(stle)
Oca(rina)

Squ(are Wave)
Saw (Wave)
(Syn.) Calliope
Chi(ffer Lead)
Cha(rang)
Sol(o Voice)
(Saw) 5th's
(Bass) + Lead

New (Age)
War(m Pad)
Pol(ysynth)
Spa(ce Voice)
Bow(ed Glass)
Met(al Pad)
Hal(o Pad)
Swe(ep Pad)

Ice (Rain)
Sou(ndtrack)
Cry(stal)
Atm(osphere)
Brightness
Gob(lin)
Ech(o Drops)
Star (Theme)

Sit(ar)
Ban(jo)
Sham(isen)
Koto
Kal(imba)
Bag (Pipes)
Fid(dle)
Shan(nai)

Tin(kle Bell)
Ago(go)
Steel Drums
Woo(dblock)
Tai(ko)
(Melodic) Tom
Synth Drum
Rev(erse Cym.)

(Gt.)Fret (Noise)
Bre(ath Noise)
Sea(shore)
Birds
Tele(phone)
Heli(copter)
App(lause)
Gun (Shot)

    Alternately, you could type the name of a Drum Key such as Kick, Snare,
Hat, etc, if the track is for a drum part on channel 10. (Note: if you want a
Tom in the Drum Part, as opposed to the GM Patch "Melodic Tom", then you
need to type a more explicit Tom name such as "High 1", "High 2", "Mid 1",
"Mid 2", "Low 1", or "Low 2". If you want a cymbal in the Drum Part, as
opposed to the Reverse Cymbal GM Patch, type "Crash 1", "Crash 2", "Splash",
"Chinese", "Bell Ride", "Ride 1", or "Ride 2". If you want an agogo in the
Drum Part, as opposed to the Agogo GM Patch, type "High Agogo" or "Low
Agogo". If you want a woodblock in the Drum Part, as opposed to the Woodblock
GM Patch, type "High Wood" or "Low Wood".
    Here are the GM Drum Key names that you use if you want to assign a
track to the Drum Part.

Kick 2
Kick 1
Side (Stick)
Snare 1
Snare 2
(Hand) Clap
Low 1 (Tom)
Low 2 (Tom)
Mid 1 (Tom)
Mid 2 (Tom)
High 1 (Tom)
High 2 (Tom)
Closed (HiHat)
Pedal (HiHat)
Open Hi(Hat)
Crash 1 (Cym.)
Crash 2 (Cym.)
Ride 1 (Cym.)
Ride 2 (Cym.)
Chinese (Cym.)
Bell (Ride)
Splash (Cymbal)
Tamb(ourine)
Cow(bell)
Vibra-Slap
High Bongo
Low Bongo
Mute Hi Conga
Open Hi Conga
Low Conga
High Tim(bale)
Low Tim(bale)
High Agogo
Low Agogo
Cabasa
Maracas
Short Whistle
Long Whistle
Short Guiro
Long Guiro
Claves
High Wood (Blk)
Low Wood (Blk)
Mute Cuica
Open Cuica
Mute Tri(angle)
Open Tri(angle)

    If you specify the Verify option (ie, /v), then MAKEGM will always try to
deduce an appropriate Program Change for each MIDI channel from the track
names, even if the MIDI channel already has a Program Change. This option is
useful if you're trying to convert a file that was made for equipment whose
Patches weren't setup to follow General MIDI. Avoid use this option if you're
sure that you're already dealing with a MIDI file that follows the GM Patch
Set.
    Of course, if MAKEGM can't find any track names to deduce a Program
Change for a channel, then it will default to using a Grand Piano patch for
that channel, and report that it can't deduce a Program Change for that
channel.
    In fact, MAKEGM reports quite a bit of information about the conversion
that it is performing. If you wish to suppress this output (to speed up the
conversion), use the Quiet (ie, /q) option. Alternately, if you wish to save
this information to a text file, use the Output (ie, /o) option, followed by a
filename. There must be no space between the /o and the filename. (Do not
redirect the output with the redirection symbol >). When deleting a MIDI
event that is unneeded and occurs at the beginning of a track (ie, before
any note events), MAKEGM reports that it is deleting "Setup" information.
When deleting redundant or extraneous events later in the track, MAKEGM
reports the Time (expressed as Measure:Beat:Clock -- see the manual for
MIDIDSM for an explanation) that the event has occurred upon.
    If there is no initial Pan controller (ie, at the start of the file) for a
given channel, then MAKEGM inserts one with a centered position.
    If there is no initial Volume controller (ie, at the start of the file)
for a given channel, then MAKEGM inserts one with a volume of 100 (out of
127).
    If there is no initial Bank Select controller (ie, at the start of the
file) for a given channel, then MAKEGM inserts one selecting the first bank.
Furthermore, if you specify the Wind (ie, /w) option, then MAKEGM will
consider all controller 0 messages to be for a Breath Controller rather than
a Bank Select, and will change these to Expression Controller. Early Yamaha
units used controller 0 for Breath Controller rather than controller 2. These
units didn't understand Bank Select at all. Of course, GM units understand
Bank Select to be controller 0, and Breath to be controller 2, so this option
allows MIDI files created by old Yamaha breath controllers to conform to
GM/GS spec.
    If there is no initial Effect controller (ie, at the start of the file)
for a given channel, then MAKEGM inserts one with a value of 64. (MAKEGM
assumes that this is being used to set the reverb level).
    If there is no initial Chorus controller (ie, at the start of the file)
for a given channel, then MAKEGM inserts one with value of 0 (ie, off).
    If there is no initial RPN controller (ie, at the start of the file) to
set the Pitch Bend Range for a given channel, (and there are actually Pitch
Bend messages upon this channel) then MAKEGM inserts the appropriate RPN and
Data Slider controllers to set pitch bend to +/- 2 steps.
    Among the other MIDI messages that MAKEGM ensures are at the start of the
file include ones that set the Pitch Wheel, the Modulation Wheel, the Hold
Pedal, Expression, and Channel Pressure. If any of these don't appear at the
start of the file, MAKEGM inserts them with default values. The default values
are to center the Pitch Wheel, turn Modulation, Hold Pedal, and Channel
Pressure off, and set Expression to full. If your sound modules understand the
RESET ALL CONTROLLERS controller message, then this one message can replace
all of the preceding messages for a smaller MIDI file with less initialization
overhead. In this case, specify the Reset (ie, /r) option. If your sound
modules don't implement the RESET ALL CONTROLLERS, then don't specify this
option.
    If MAKEGM detects that a track is empty (ie, it contains no MetaEvents,
nor MIDI data or it contains data upon a channel that has no note events nor
system realtime/common/exclusive), then MAKEGM will delete the track.
    If the MIDI file is format 1, and you specify the Name (ie, /n) option,
then MAKEGM will add Track Names for any tracks that don't already have
names. The names will be based upon the GM Patch chosen for that track's
MIDI channel.
    With no options, MAKEGM defaults to inserting individual controllers for
setup (instead of RESET ALL CONTROLLERS), doesn't add track names to Format 1,
doesn't verify the Program Changes against track names, doesn't strip
undefined controllers, and doesn't strip extraneous controllers.
    The last two arguments to MAKEGM are the name of the MIDI file to convert,
followed by the name of the new file to be created.  If you don't supply the
new filename, then the original file is converted and overwritten. THE OPTIONS
MUST APPEAR BEFORE THE FILENAMES. Running MAKEGM without any args displays
help info.
    For example, to convert Blort.mid to GM/GS, and create a new file called
Test.mid:

makegm blort.mid test.mid

    To convert Blort.mid to GM/GS, strip extraneous controllers, and create a
new file called Test.mid:

makegm /x blort.mid test.mid

    To convert Blort.mid to GM/GS, use RESET ALL CONTROLLER, save the output
information to C:\INFO, and rewrite Blort.mid:

makegm /r /oc:\info blort.mid

      MAKEGM 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, MAKEGM 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.
      MAKEGM requires that the files MIDIFILE.DLL and GENMIDI.DLL be placed in
some directory along your CONFIG.SYS's LIBPATH.  Usually, the same directory
as where you place MAKEGM.EXE will suffice.
      This is version 1.0.

     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):

MAKEGM 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.
