From Video Game Music Preservation Foundation Wiki
(Redirected from Output - MIDI)
Jump to: navigation, search
Musical Instrument Digital Interface
Developer: Dave Smith
Header: SMF
Content: Notational
Instruments: Optional
Target Output
Output - Digital Audio - No.png Output - MIDI.png Output - FM Synthesis.png Output - PSG.png
Released: 1983-??-??
First Game: ?
  • *.mid
  • *.midi
  • *.mff
  • *.smf
  • *.kar

Musical Instrument Digital Interface (MIDI) is a sound format created in the early 1980s by Dave Smith (1950-2022) of Sequential Circuits, Inc. in order to make a standard format for storing music definitions. Unlike PCM audio which stores the exact audio, or tracked audio that stores samples, MIDI doesn't store the any sound itself. Instead, MIDI stores the instructions for the audio (kind of like sheet music) which a MIDI device can play back. This allows for much smaller file sizes and consistent, exact timing. However, since all MIDI devices may synthesize sound differently, MIDI music will sound different everywhere it's played.

Most MIDI files are type 1, which means that they have a header for track information and allow multiple tracks. Some MIDI files are type 0, which don't support multiple tracks, and take up slightly less space. There is also a rarely seen type 2 MIDI file which is a type 1 MIDI file with several embedded type 0 MIDI tracks.

Some MIDI files use outdated extensions like MFF (MIDI File Format) or SMF (Standard MIDI File). The KAR extension is used by karaoke software, but is still a plain MIDI file.


MIDI itself is only a standard for a communication format between computers and other digital instruments. The mapping of MIDI "programs" to specific musical instruments was entirely dependent on the MIDI synthesizer. One of the most popular in computer gaming was the Roland MT-32, which appeared in 1987.

To provide a unified standard and avoid cacophony, the MIDI Manufacturer Association created the General MIDI standard in 1991 (often abbreviated GM). The majority of MIDI files are written for this standard. However, finding the standard quite limited and eager to compete by offering additional features, Roland and Yamaha both started to expand on the GM by developing their own proprietary but backward-compatible standards: the Roland GS and the Yamaha XG. Finally, the MMA released a "second level" to the General MIDI standard, called GM2, which is mostly derived from GS.

An XG, GS or GM2 synthesizer will play a GM MIDI file without problem. Inversely, a GM synthesizer will usually play an XG, GS or GM2 file without much loss beyond a few special effects, although it is possible that they use more simultaneous voices than what the GM standard offers, or undefined instruments. (The XG standard offers up to 1149 different instruments and 128 simultaneous voices; GM is limited to 128 instruments and 24 simultaneous voices.)

However, a MT-32 synthesizer playing a GM song, or a GM synthesizer playing an MT-32 song, will produce fundamentally incorrect playback as the instruments are mapped differently.

In addition to the features offered by the various standards, some sound cards offered additional functions, such as the possibilities to reprogram instruments. Of particular importance are the AdLib and SoundBlaster cards and the Gravis UltraSound (abbreviated GUS) cards.

The AdLib offered FM synthesis with its YM3812 sound chip (better known as OPL2). The OPL2 chip could be reprogrammed by changing the values in its registers to modify the sounds produced. Ad Lib Inc. created MDI derivative format for this purpose.

The GUS used a system of "instrument patches" containing instrument samples to offer high-quality MIDI playback. However, the limited RAM on-board the card made it impossible to give each General MIDI instrument its own patch simultaneously. To reduce memory use, configuration files (ultramid.ini) were used to remap instrument to similar patches, making it necessary to optimize such configurations for the instruments used in the songs played. But it was possible to use custom patches, either to improve the quality of certain instruments, or make the patches smaller so more of them could be loaded at once, or even provide entirely new custom instruments.

Many games included multiple variants of their MIDI soundtracks, offering for example an MT-32 version, a GM OPL2 version and a GM wave table version.

For all these reasons, there exist OPL emulators, GUS emulators, and MT-32 emulators in addition to generic MIDI players.







MIDI to ?

? to MIDI



These are 20 of the more popular games that use MIDI, for the complete list, view the category.

Released Title Sample
1990-09-?? Prince of Persia (DOS)
1991-09-19 Wordtris (DOS)
1991-10-?? Windows 3 (DOS)
1991-??-?? Baby Jo In Going Home (DOS)
1991-??-?? SimAnt (DOS)
1991-??-?? Super Tetris (DOS)
1991-??-?? Where In the World Is Carmen Sandiego?: 1991 Edition (DOS)
1992-??-?? A-Train (DOS)
1992-??-?? Chip's Challenge (W16)
1992-??-?? SimCity (W16)
1992-??-?? SimLife (W16)
1994-02-19 Pirates! Gold (W16)
1994-10-17 Wacky Wheels (DOS)
1994-12-21 Rise of the Triad: Dark War (DOS)
1995-09-30 Monopoly (W16)
1996-??-?? The Elder Scrolls II: Daggerfall (DOS)
1996-??-?? SimFarm (W16)
1997-05-31 Blood (DOS)
1997-10-15 Age of Empires (W32)
1999-09-30 Age of Empires II: The Age of Kings (W32)

How to Obtain

MIDI files usually have to be manually extracted from game files, a process that is different for pretty much every game that uses them.


All MIDI files begin with "MThd" which is the start of the MIDI header. There may also be sub-headers in the MIDI file. Inside each header there will be a "MTrk" which signifies the beginning of a track. Type-0 MIDI files only have 1 track, but type-1 files may contain multiple tracks.

All properly formatted MIDI files should end with same three bytes, 0xFF 0x2F 0x00.

MIDI can have a minimum tempo of 16 BPM and a maximum of 500 BPM.