DRO2MIDI

From ModdingWiki
Jump to navigation Jump to search
DRO2MIDI
There is no image of this tool in use — upload one!
PlatformLinux, Windows CLI
Release date2007-06-16
Homepageshikadi.net
DownloadLinux/source
Windows
GamesNone

DRO2MIDI is an open source command-line program to create MIDI files from DOSBox .dro captures, id Software IMF songs and Rdos .raw Adlib captures. It was originally based on IMF2MIDI by Günter Nagler, but has since added many more features and greatly improved the accuracy of the conversion. The output MIDI files can be played or edited in most audio applications (which support type-0 files), or the notes can be extracted to be played on a real instrument.

Features

  • Converts DOSBox .dro captures, id Software .imf songs and Rdos .raw captures
  • Fully supports MIDI pitchbends
  • Tries to map Adlib instruments to MIDI instruments as best it can, but these mappings can be easily changed
  • Instruments can also be mapped to MIDI percussion
  • OPL rhythm-mode percussion is converted

Usage

Linux:

$ dro2midi file.imf file.mid

Windows:

C:\>dro2midi file.imf file.mid

For a list of the command line options run dro2midi with no parameters.

For best results, all the .txt data files should be in the current directory.

Instrument mappings between Adlib registers and MIDI instruments are stored in inst.txt. This file contains a number of existing mappings, but additional mappings can easily be added. During conversion, if an exact match cannot be found the mapping with the closest Adlib parameters will be used instead. A message will be printed when this happens, along with a line that can be copied into inst.txt to provide an exact match. This approximation can have the unfortunate side effect of providing some odd conversions, such as converting a bass-line into a monotonic drum.

To get a perfect conversion you may wish to delete all but the first "all-zero" instrument in inst.txt, which will cause all instruments to be converted as a piano. You can then copy the definitions printed during conversion one by one into inst.txt, to assign the best-sounding instrument without worring about any default mappings taking over. Alternatively the -i option can be used which will disable the closest-match algorithm, and only exact matches will be used (again, anything that can't be exactly matched will be mapped as a piano.)

inst.txt

The instrument mappings are stored in inst.txt, in a format like this:

07-12/4F-00/F2-F2/60-72/08/00-00: patch=15  # Tubular bells

The numbers at the start are hexidecimal values of the Adlib registers for that instrument. "patch=15" assigns MIDI instrument #15 for this Adlib instrument. For percussion, "drum=35" could be used instead. Anything after a # symbol is treated as a comment.

The instrument names (and values to supply to the patch= parameter) are stored in patch.txt, and the drum names (and numbers) in drum.txt. You may find these files helpful to reference when selecting instruments for conversion.

Note that the parser for this file is quick and dirty, so it's easy to get a syntax error - for example, an otherwise blank line with a single space on it will cause an error (so if you get an error about a blank line, make sure it really is blank!)

Links