IMS Format

From ModdingWiki
Jump to navigation Jump to search
IMS Format
Format typeMusic
Notation typeMIDI
Max channel count9 or 11
Max track count1
Max pattern count1
Max order count0

The IMS Format is an Ad Lib music format, based on the standard MIDI format. It is commonly seen in Korean DOS games.

The format is very similar to the AdLib MIDI Format, but has an additional instrument table appended. The instruments themselves are stored in a separate instrument bank in AdLib Instrument Bank Format.

File format

The file consists of a MIDI part that mostly matches the AdLib MIDI Format v1.0 and an instrument table that tells the player what instruments are to be loaded.

The instrument table is appended to the end of the MIDI data and has the following header:

Data type Name Description
BYTE[2] cSignature 0x77 0x77 ("ww")
UINT16LE numInstruments Number of instruments used by the song

This is followed by a list of instrument names, repeated numInstruments times:

Data type Name Description
char[9] name Instrument name - must be NULL-terminated

Each of the instrument names refers to the name of an instrument of an external instrument bank.

MIDI Commands

  • Except for 8#, all commands match the AdLib MIDI Format.
  • As with usual MIDI files, the "running status" is supported for commands 8#..E#.
MIDI message Meaning Notes
8# nn vv Note Retrigger Stops the current note, then plays a new note if (vv > 0)
9# nn vv Note On Plays a note (vv > 0) or stops it (vv = 0)
A# vv Volume Change Changes the volume of the current note (also works after Note Off)
B# xx xx ignored MIDI Control Change
C# ii Instrument Change references an instrument from the instrument table
D# xx ignored MIDI Channel Aftertouch
E# ll mm Pitch Bend usual MIDI pitch bend, usually in the range of 1 semitone up/down
F0 7F 00 ii ff F7 Tempo Change new Tempo = Initial Tempo * (ii + ff/0x80)
F0 xx ... xx F7 ignored MIDI SysEx (without length)
F8 Delay Overflow causes a delay of 240 ticks
FC Song End stops the song or restarts it from the beginning if looping is enabled


The following tools are able to work with files in this format.

Name PlatformPlay? Create new? Modify? Convert/export to other? Import from other? Access hidden data? Edit metadata? Notes


This file format was reverse engineered by Valley Bell from IMS songs used by Family Production games and by disassembling Lychnis. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)

Also thanks to MaliceX for helping to identify games that use IMS songs.