Deathtrack Music Format

From ModdingWiki
Jump to navigation Jump to search
Deathtrack Music Format
Format typeMusic
Notation typeMIDI
InstrumentsRoland, OPL
Max channel count16
Max track count1
Max pattern count1
Max order count0
Tags?None
Games

DANGER.MUS and TRAX.MUS are the two music tracks of Deathtrack. Each file is a single compressed chunk containing a complete Standard MIDI File written for the Roland MT-32. The game has separate music drivers for the MPU-401/MT-32 and for AdLib; both are fed from this data.

File format

The file is a top-level leaf chunk (not a container) of the resource chunk format:

Data type Name Description
char[4] tag SND:
UINT32LE length Payload length (bit 31 clear)
BYTE[length] payload Compression envelope followed by the encoded MIDI file

The decoded data is a Standard MIDI File, format 0, one track, 96 ticks per quarter note. MIDI header fields are big-endian. The files contain Roland SysEx to program MT-32 timbres, so on General MIDI synthesisers the instruments sound different.

File MIDI bytes Notes Duration
DANGER.MUS 2,807 299 32.2 s
TRAX.MUS 44,814 5,924 99.5 s

The decoded file must fit in 64 KiB: the game reads it with a single 16-bit read. The MT-32 driver forwards the MIDI bytes through the MPU-401 UART. How the AdLib driver maps the MIDI events to OPL2 instruments is documented in the port's hardware notes.

Source code

From re-deathtrack, the open-source browser port:

Credits

This file format was reverse engineered by VorticonCmdr. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)