Last modified: Thu Dec 23 17:24:31 EST 2021
This page describes how to play MIDI (.MID) files on baremetal DOS to certain sound card synths that do not have a MIDI interpreter. This is mostly irrelevant for a DOS box in Windows or DOS running in a VM.
In sections below, the tags OPL3 GF1 InterWave EMU8000 ES137x EMU10K1 indicate to which of the synths the information applies.
OPL3 GF1 InterWave EMU8000 ES137x EMU10K1 The DOS drivers package for the sound card is needed to initialize the card, set mixer volumes, and possibly load a sound font or play music. See the particular sound cards linked at the top of this page for details.
OPL3 MIDIer version 2.50.
GF1 InterWave UltraSound Playmidi Version 5.12 (PLAYMIDI.EXE) is included with the old GUS drivers. It uses sound fonts distributed as collections of PAT files. It has an insanely great visualization, which rightly inspired the even more awesome MegaMID. On the other hand, it plays some MIDI files incorrectly. It works with GUS PnPs, but only if they have optional RAM installed.
InterWave UltraSound Audio Player Version 2.00 (PLAY.EXE) is included with the GUS PnP drivers. It uses the ROM soundfont that is present on InterWave cards. It lacks the visualization of the old PLAYMIDI.
GF1 InterWave Do not install any of the TSRs UltraMID, [IW]SBOS, or Mega-Em.
EMU8000 Option 1 is AWEPLAY v1.0 by Guenther Klaming (not to be confused with other software of the same name), which uses SF2 sound fonts. Option 2 is Creative's Play Utility Version 1.03 (PLAY.EXE), which uses SBK sound fonts.
EMU8000 Do not install AWEUTIL as a TSR. It should be used with only the /S flag to initialize the sound card.
ES137x EMU10K1 MegaMID version 1.66 is a "real" MIDI player. The TSRs for ES137x and EMU10K1 emulate MPU-401 well enough for MegaMID to work.
My links for AWEPLAY and MegaMID keep breaking, so just search for them at the DOS abandonware archives du jour.
The batch file MIDIER.BAT loads the Creative MIDI Driver Version 1.22 for SB16 / SB Pro 2 / SB Pro 2 MCV (SBMIDI.EXE) with no switches. That means it defaults to "Extended MIDI" instead of General MIDI. Based on this Vogons post I'd say it's a good idea to add the /G switch so you'll get 16 MIDI channels instead of only 10.
SBSIM.COM and its config file SBSIM.CFG are obscure. The only other place I have found them is with the older Creative Music Player (MUSIC.EXE) included in the Sound Blaster Pro Deluxe Drivers. In that archive, the line MidiMap=0 is commented "General," so I presume that this is the correct value for General MIDI.
If your sound card is of an older type, you can swap SBMIDI.EXE for the included Creative MIDI Driver Version 1.22 for Sound Blaster 1.5 and 2.0 (SB122OLD.EXE).
Creative's Play Utility Version 1.03 (PLAY.EXE) and two different versions of the Creative Loadable MIDI Driver (CTMIDI-A.DRV and CTMIDI-S.DRV) were included in a 1997 generic distribution from Creative called 95dosapp.exe. Various other, probably earlier versions will appear in the driver packs for specific Sound Blasters.
65230 Jun 6 1996 CTMIDI-A.DRV DOS-based MIDI driver for EMU8000 (SB32/AWE32/AWE64 users only) Creative Loadable MIDI Driver, Version 1.23 Creative Sound Blaster AWE32
18008 Aug 18 1995 CTMIDI-S.DRV DOS-based MIDI driver for SB16 FM (SB16 users only) Creative Loadable MIDI Driver, Version 1.22 Creative Sound Blaster 16
I advise using MIDIer instead, even though both apps use Creative drivers on the backend, because for whatever reason MIDIer does a better job keeping tempo. The problem seems specific to OPL3.
Tested this with a Labway YMF719B card to confirm that Creative's app works with clones.
Untested Might work with MIDI=SYNTH:2 MAP:G and the SB16 version of CTMIDI.DRV?
Sound fonts distributed as collections of PAT files are usable with GUS Classics and those GUS PnPs that have optional RAM installed. You can choose among the stock Gravis patch set, the also popular Pro Patches Lite, or another sound font.
The ULTRADIR environment variable must be set such that the PAT files reside in a subdirectory of that called MIDI (i.e., in %ULTRADIR%\MIDI). For example, SET ULTRADIR=C:\LOCAL\SNDFONTS\GRAVIS
The default mapping from MIDI instrument numbers to PAT files must be at %ULTRADIR%\MIDI\DEFAULT.CFG. This file is missing in later versions of the Gravis soundfont distribution but can be copied over from an earlier one. It is possible to provide a different mapping on a per-MID-file basis by creating a file with the same name as the MID file but with the .CFG extension.
What will fit in your sound card's RAM is a function of both the sound font and the mapping, as PAT files that are not referenced in the mapping will never be loaded.
There is not much choice here.
For Option 1, AWEPLAY, use whichever of these Creative SF2 soundfonts will fit into the RAM on your sound card.
2090170 2GMGSMT.SF2 4174814 4GMGSMT.SF2 7557598 8MBGMSFX.SF2
Although many other sound fonts are available in SF2 format, AWEPLAY almost always rejects them with "error loading sound font." N.B., I was unable to test the ones larger than 4 MiB. Someone with one of the AWE cards loaded with 32 MiB of RAM might succeed with Unison.sf2 or Roland_SC-55.sf2.
For Option 2, Creative's Play Utility, the names of the three Creative SBK soundfonts are hardcoded into the EMU8000 version of CTMIDI.DRV. These soundfonts make use of the 1 MiB sample ROM included on AWE cards in addition to at most 0.5 MiB of new samples.
bash-4.3$ strings CTMIDI-A.DRV | fgrep SYNTH SYNTH: \SFBANK\SYNTHGM.SBK \SFBANK\SYNTHGS.SBK \SFBANK\SYNTHMT.SBK
34832 SYNTHGM.SBK 577322 SYNTHGS.SBK 62466 SYNTHMT.SBK
Should you find another .SBK file in the wild, you'd have to overwrite one of the hardcoded files or binary patch CTMIDI.DRV to try to use it.
There is not much choice here either. Only ECW soundfonts are supported.
2259070 EAPCI2M.ECW 4986999 EAPCI4M.ECW 8292462 EAPCI8M.ECW
The largest and ostensibly best of these is EAPCI8M.ECW, but the drivers installation process always chooses something else as the default. You fix this by changing the value of a variable in an .INI file that is read by the drivers when they initialize at boot time.
There was a long series of drivers in which things kept getting renamed but the basic structure and functionality did not change.
Example 1: In SNDSCAPE.INI, set
Example 2: In SBPCI.INI, set
Example 3: In CTSYN.INI, set
OPL3 GF1 InterWave EMU8000 ES137x EMU10K1 Using the relevant configurator from the drivers distribution (e.g., MIXER.EXE, MIXERSET.EXE, APMIXER.EXE, SBMIXER.EXE, or SBEMIXER.EXE), make sure the Master output volume is at some audible level and that the input(s) marked "FM," "MIDI," "Synth," "WaveTable," or "Music" are unmuted and set to maximum volume. (Just "Wave" typically means PCM like from a .WAV file, not a WaveTable synth.)
This does not apply to older versions of the GUS Classic, including the tested Rev. 2.4, which have no mixer and thus no volume controls.
OPL3 MIDIer expects you to CD into its directory to run it. You can run MIDIER.BAT and use its built-in file browser to select and play a .MID file, or you can give a path to the .MID file on the command line when you run the batch file.
GF1 InterWave PLAYMIDI IGOTYOU.MID or just PLAYMIDI to launch the file browser.
InterWave PLAY IGOTYOU.MID
EMU8000 (Option 1) AWEPLAY IGOTYOU.MID 4GMGSMT.SF2 or (Option 2) PLAY IGOTYOU.MID. Note that AWEPLAY rejects .. directory syntax.
ES137x EMU10K1 MEGAMID IGOTYOU.MID or MX to launch the file browser.
The TSRs vary depending on the version of the driver set.
Some people evidently got SBOS or Mega-Em to work. My own experiences were disgusting. [IW]SBOS worked poorly at best and not at all with protected-mode games. Mega-Em always complained about the memory manager and quit immediately. Since they were unnecessary for playing MIDI or for playing DOOM, I gave up on them.
Loading AWEUTIL as a TSR with the /EM switch is supposed to emulate an MPU-401 using the EMU8000 synth. This TSR is notoriously incompatible with EMMs, DOS extenders, and chipsets whose NMI implementation it does not like. At best, it remained in memory after complaining "ERR014: Feedback Path error." It never worked though.
ISA sound cards
PCI sound cards
Playing MIDI files to OPL2/3, EMU8000, or EMU10K1 on Linux/ALSA KB