MIDI, or Musical Instrument Digital Interface, is a set of standards for synthesized music. The Doom engine uses MIDI music, stored in the IWADs in the MUS format and played through the DMX audio driver. MIDI music only contains metadata and instructions for synthesizers rather than actual sound wave recordings, so the output will depend on which synthesizer is used for playback. The Doom engine, in particular, has specific handling for OPL synthesizers (found notably in the popular Ad Lib and Sound Blaster cards) and for Gravis Ultrasound cards, using the GENMIDI and DMXGUS lumps respectively.
Although the MUS format is used in the IWADs, the Doom engine is able to read standard MIDI files if they can be converted on-the-fly to MUS format by the MIDI2MUS code that was integrated in version 1.5 of the engine. Converting from MIDI to MUS is a lossy operation, since track data is flattened (as in MIDI format 0), tempo information is transformed to be based on a time division value of 70, and all metadata information is stripped out.
On modern systems, notably Microsoft Windows since Windows Vista, the implementation of the MIDI standards has declined in quality as it becomes less relevant for the average user. Problems have forced source port developers and maintainers to take control of MIDI playback and mix it with the audio output directly instead of letting the operating system handle it. This is usually done by integrating software synthesizers in the source port, with FluidSynth, TiMidity, PortMIDI, and various OPL emulators being the most frequent choices.