Adding custom music

From DoomWiki.org

Revision as of 14:44, 25 April 2020 by Gez (talk | contribs) (Finding MIDI files: some more)


PWADs can include music lumps for custom music when played. Originally, these lumps were encoded in the MUS format. WAD editors need to convert between that and a format used by music authoring tools, such as MIDI.

Since v1.5, Doom has been able to read standard format MIDI files for music, as long as they can be successfully converted. The Windows 95 version of Doom, Doom95, however does not have the ability to play MIDI files, nor do vanilla Heretic or Hexen.

Most modern ports will accept MIDI lumps without any limitation. In fact, they usually need to convert MUS back to MIDI internally, since DMX is the only audio library that natively supports the MUS format.

Requirements

To add music to a WAD you will need:

Importing

  1. Open your map in SLADE 3. Drag and drop your MIDI file in the list of entries, but make sure not to insert it between map lumps or *_START/*_END markers.
  2. Rename your MIDI lump to the name appropriate for its map slot. For example, MAP01 of Doom II, TNT, or Plutonia uses the name D_RUNNIN. See music for lists of names associated with map slots.

Note that Hexen lets you choose arbitrary names for the music track by way of SNDINFO, while some advanced source ports do likewise via MAPINFO.

Creating MIDI files

There are several sequencers that can create MIDI files. Just search for MIDI sequencer and you'll most likely find one that suites your needs.

When creating a MIDI file make sure that no notes stretch out beyond the end of the MIDI file, or else your song will end with a silent bar of music.

Finding MIDI files

The Doom community is full of composers, most of which gracefully allow for their work to be reused in mods for Doom and other Doom-engine games. A non-exhaustive list of free-to-use MIDI download links follow:

In addition, sites such as BitMidi, KH Insider, Mirsoft, VGMusic, or the Video Game Music Preservation Foundation can be used.

Make sure to properly credit the author and source and to list the song name.

MUS format

  • A MUS file cannot be larger than 65535 bytes. Since MUS is more compact than MIDI, a MIDI file slightly larger than 64kb may still be successfully converted to MUS.
  • Doom MUS format uses 9 channels, using channel 1-8 for sounds and channel 9 for drums. General MIDI allows for 16 channels.
  • Each channel can only play 1 note at the time, so if you want to add a chord then you have to set 3 channels to the same patch and split the notes up that way.
  • MUS format uses the same MIDI patch layout as in General MIDI.
  • Conversion from MIDI to MUS is destructive: converting the MUS back to MIDI will not give you the original MIDI file.