DMX

DMX was a sound library written by Paul Radek of Digital Expressions, Inc., which was used in the Doom engine to provide sound and music playback under DOS.

Features

 * PC speaker sound effects support.
 * Support for, , and compatible sound cards for stereo digital audio output on up to 8 channels. Output was strictly at a sample rate of 11025 Hz up until the version of the library utilized in Doom 1.4, at which point it was upgraded to 22050 Hz.
 * Support for General MIDI, Gravis wavetable, and OPL music playback.

Use in Doom
References to DMX can be found in Doom (although not in the game directly): a DMXOPTION environment variable allows a couple sound options to be set, and the DMXGUS lump contains instrument mapping data for use on the Gravis Ultrasound card.

DMX only supports its own native sound effect formats, two of which are used in Doom: format 0 is used for PC speaker sound effects while format 3 is used for digitized sounds. Formats 1 and 2 are unknown, though reverse-engineering efforts showed that they do exist as there is a function dedicated to handling them both.

Up until the version used in Doom v1.5, DMX also only accepted MUS-format music lumps. After that point, it integrated its own MIDI-to-MUS converter. However, due to the conversion process, MIDIs to be played back in this manner are subject to all of the limitations of the MUS format - in particular, they must not exceed 64 KB in size after the conversion, nor can they utilize more than nine channels.

Problems
Various sources imply that id Software's programmers were dissatisfied with the DMX library. John Romero was quoted in an alt.games.doom newsgroup post as having called Radek a "shithead", "sound code dork" and "incompetent". John Carmack later described the use of DMX as "a mistake" in the release notes to the Doom source code.

Probably prompting the above, several features of DMX broke and then were fixed during Doom's development, including spurious issues with high IRQs, temporary loss of support for the Ultrasound altogether, and total permanent loss of support for pitch bending of sound effects after the sample rate upgrade.

The use of this external library meant that when the Doom source code was later released, only the source code to the Linux port could be made public, as disclosure of the copyrighted DMX APIs could have resulted in an infringement lawsuit; either Radek was unwilling to agree to the release of his code, or id was disinterested in attempting to negotiate at all.

Despite id's unwillingness to release any DMX-related code, Raven took a much more relaxed attitude to the issue, and DMX-related code was included with the Heretic and Hexen source releases, although not the DMX library itself. As a result, neither of those games can be compiled "out of the zip," and must have these calls commented out or replaced with an equivalent library.

The only known game other than Doom to have used the DMX library is Raptor: Call of the Shadows by Cygnus Studios.