TranslateIMF Home

by Andrew J. Apted.   August 2006


TranslateIMF is a program which converts the IMF music format into MIDI format. This IMF format is used by some classic games by Apogee Software, such as Wolfenstein 3D and its sequel Spear of Destiny.

Note: there is another music format called IMF, which is module-based and loaded/saved by the Imago Orpheus tracker program (as far as I know anyway). That format is not handled by TranslateIMF.


You can download source code and Windows binary <here>


TranslateIMF assumes you already have the raw IMF music data (e.g. extracted from the AUDIOT.WL6 file in the Wolfenstein 3D directory). There are special programs for doing this (like the eXtensible Wad Editor, XWE).

TranslateIMF must be run from a console / terminal. You can get a short help screen by typing one of these commands:

  transimf /?
  transimf -h

Normal usage is like this:

  transimf -i input.imf -o output.mid
The output filename can be omitted, in which case the ".mid" extension is added to the input filename (removing any existing extension). The input filename is compulsory, except when using the pipe option.

Each option has a short form (e.g. "-i") and a long form with two hyphens (e.g. "--input"). Options can be given in any order. When an option needs a value, there must be a space in between.

Full list of options:

  -i --input  file : input filename (IMF)
  -o --output file : output filename (MIDI)
  -d --debug  file : debugging output filename
  -p --pipe        : read from stdin, write to stdout
  -q --quiet       : suppress any warnings
  -h --help        : show the help text


Apogee's IMF format is nothing more than a sequence of raw register data for the ADLIB (OPL2) sound card, along with timing information. This is very different to MIDI data, which contains messages for what notes to play, what instruments to use (from a standard set), etc.

That means TranslateIMF has to do a lot of guesswork, and the results are sometimes not very good. For example, just determining whether an instrument is supposed to be melodic or a drum cannot be done 100% accurately. Any song that uses the same instrument on two channels could be a big problem, since there is no way to tell (from the IMF data) which notes are which, or even that there are two channels!

Other problems are possible too. In some songs, the volume levels of some of the channels seem too low (although it depends on the instruments used to play the output MIDI, and how well the A/D/S/R envelopes match the originals).


For a Linux/BSD/MacOSX system, edit the "Makefile" and change any bits that need changing (probably nothing, since there is nothing special going on). Then issue the "make" command in a terminal to build the binary.

Under Windows, you need to install the free "Dev-C++" IDE (by Bloodshed Software). Then simply open the Dev-C++ project file and click the Execute::Compile button in the menus to make the binary.


  1. Handle the alternative header formats.
  2. Some user control over selected instruments.
  3. Fix the remaining loose ends (every FIXME in the code).



Email: ajapted AT