DRO2IMF is a conversion tool that can read in DosBox .dro captures and convert them into .imf files, suitable for using as custom background music in Keen 4-6 mods.
Since IMF and DRO are essentially identical formats (they both store OPL2, just in a slightly different arrangement), converting between the two formats is virtually lossless. There would be small rounding errors as DRO files play at a speed of 1000Hz, whereas IMF files commonly play at rates like 560Hz and 700Hz. This difference however is too small to notice, and may not surface even after dozens of conversions.
Usage of DRO2IMF, version 1.1, is very simple:
$ ./dro2imf -in somemus.dro -out somemus.imf Data is 106388 bytes long. IMF Rate: 560Hz Type of IMF file: Type-0 Wrote somemus.imf
One can choose an IMF Rate other than 560Hz (e.g. 700Hz as used in Wolfenstein 3D), along with a different IMF Type. Furthermore, the program can also write tags to the IMF file, which are visible if the file is played back with a program like AdPlug. Tags are added to Type-1 files only.
$ ./dro2imf DOSBox OPL capture to id Software Music Format converter. Written by email@example.com in June 2007. Usage: dro2imf -in <drofile> -out <imffile> [optional arguments] drofile is the DOSBox capture to convert. imffile is the output IMF file that will be created. Optional arguments: -rate <rate>: IMF rate in Hz. By default, 560Hz is set (for Keen). -type <type>: Output a Type-0 IMF file (Keen) or a Type-1 file (Wolf3D), passing 0 or 1 after "-type". By default, Type-0 is chosen. -tags <title> <composer> <remarks>: IMF tags. Use with Type-1 files. * IMF rates to use: 560Hz for Commander Keen, 700Hz for Wolfenstein 3D, 280Hz for Duke Nukem II. * IMF tags are optional, but if given all three tags must be specified (use "" to leave a field blank). Examples: dro2imf -in mycapt.dro -out convcapt.imf dro2imf -in rmus.dro -out omus.wlf -rate 700 -type 1 -tags "My song" Squirb ""