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 /? transimf -h
Normal usage is like this:
transimf -i input.imf -o output.midThe 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.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.