Difference between revisions of "MUS"

From DoomWiki.org

[checked revision][checked revision]
m (Limitations: MUS program size limit.)
(Notes)
(16 intermediate revisions by 11 users not shown)
Line 1: Line 1:
 
{{stub}}
 
{{stub}}
The '''MUS''' format is a slightly altered [[Wikipedia:Musical Instrument Digital Interface|MIDI]] format, created for [[DMX]] and used in the [[Doom engine]] soundtracks. MUS files are nearly identical to MIDI files, only slightly more compact.  The file format has a size limit of 65536 bytes.
+
The '''MUS''' format is a slightly altered [[MIDI]] format, created for [[DMX]] and used in the [[Doom engine]] soundtracks. MUS files are nearly identical to MIDI files, only slightly more compact.  The file format has a size limit of 65536 bytes.
  
Support for standard MIDI files in [[vanilla Doom]] was added  in [[Versions of Doom and Doom II#v1.5|version 1.5]], which meant [[WAD]] authors no longer needed to convert MIDI files to MUS. However, since this was achieved by the game running MIDI2MUS internally when needed, authors looking for vanilla compatibility should make sure that the MIDI file they include ''can'' be successfully converted.
+
Support for standard MIDI files in [[vanilla Doom]] was added  in [[Versions of Doom and Doom II#v1.5|version 1.5]], which meant [[WAD]] authors no longer needed to convert MIDI files to MUS. However, since this was achieved by the game running MIDI2MUS internally when needed, authors looking for vanilla compatibility should make sure that the MIDI file they include ''can'' be successfully converted.  Vanilla [[Heretic]] and [[Hexen]], derived from version 1.2 of the Doom code, still require that music be converted to MUS format before inclusion in a WAD.
 +
 
 +
In the DMX source code, the MUS format is referred alternatively as MUS, RTM, Real Time Music, and Game Music Format.
  
 
==Limitations==
 
==Limitations==
The MUS format can only use the first 9 MIDI channels using the first 8 for music instruments and the 9th for drums. The reason this is forced upon the format is that [[OPL2]] cards ({{wp|Ad Lib, Inc.|Adlib}}, {{wp|Sound Blaster#First generation Sound Blasters, 8-bit ISA & MCA cards|Sound Blaster 1.0, SB 1.5, SB 2.0}}) had only nine channels. FM cards with dual OPL2 ({{wp|Sound Blaster#Second-generation Sound Blasters, 16-bit ISA & MCA cards|SB Pro}}, {{wp|Media Vision Pro AudioSpectrum|Pro AudioSpectrum}}) or OPL3 ({{wp|Sound Blaster#Sound Blaster Pro 2, CT1600|SB Pro 2}}, {{wp|Sound Blaster#Third generation Sound Blasters, 16-bit ISA cards|SB 16}}) had 18 channels, and any card fully compliant with the {{wp|General MIDI}} standard had to support at least 16 channels; but the success of the earlier 9-channel FM cards required going with the lower common denominator for compatibility reasons.
+
The MUS format can only use the first 9 MIDI channels, using the first 8 for music instruments and the 9th for drums. The reasoning for this implementation detail in the DMX library seems to be that [[OPL2]] cards ({{wp|Ad Lib, Inc.|Adlib}}, {{wp|Sound Blaster#First generation Sound Blasters, 8-bit ISA & MCA cards|Sound Blaster 1.0, SB 1.5, SB 2.0}}) had only nine channels.  
 +
 
 +
FM cards with dual OPL2 ({{wp|Sound Blaster#Second-generation Sound Blasters, 16-bit ISA & MCA cards|SB Pro}}, {{wp|Media Vision Pro AudioSpectrum|Pro AudioSpectrum}}) or OPL3 ({{wp|Sound Blaster#Sound Blaster Pro 2, CT1600|SB Pro 2}}, {{wp|Sound Blaster#Third generation Sound Blasters, 16-bit ISA cards|SB 16}}) had 18 channels, and any card fully compliant with the {{wp|General MIDI}} standard had to support at least 16 channels; but the success of the earlier 9-channel FM cards dictated going with the lowest common denominator for compatibility reasons.
  
The size of MUS programs is limited to 64 kilobytes, due to use of 16-bit fields inside the file format.
+
The size of MUS files is limited to 64 kilobytes, due to use of 16-bit fields inside the file format.
  
 
==Notes==
 
==Notes==
The MIDI2MUS converter does not create perfect conversions; sometimes the created files can sound distorted.
+
The MIDI2MUS converter does not create perfect conversions; sometimes the created files can sound distorted. This can be most audibly heard with MIDI files that use pitch bend effects, such as "Oww!" and "How'd I Do?" from [[Rise of the Triad]].
  
 
The MIDI format uses the value 127 as the maximum possible volume in volume change events; MUS allows for higher values. A MUS->MIDI converter that does not take this into account might end up glitching the volume on certain channels. "[[Final Doom TNT music|Smells like Burning Corpses]]" is known to be affected by this problem.
 
The MIDI format uses the value 127 as the maximum possible volume in volume change events; MUS allows for higher values. A MUS->MIDI converter that does not take this into account might end up glitching the volume on certain channels. "[[Final Doom TNT music|Smells like Burning Corpses]]" is known to be affected by this problem.
 +
 +
The MIDI3MUS converter works under modern operating systems.
 +
 +
The tempo of the MUS format depends on constants defined in DMX. For the Doom engine, the time division is 140 Hz, so one MUS tick lasts 1/140th of a second, and this value is what is used in most third-party software to play or convert MUS files. However, in ''[[Raptor: Call of the Shadows]]'', the only other game using DMX outside of the Doom engine, the time division is 70 Hz. As a result, the ''Raptor'' MUS tracks are played at double speed by most third-party software.
  
 
==External links==
 
==External links==
*[http://www.doomworld.com/idgames/index.php?id=5770 MUS file format description] at [[Doomworld]]
+
*{{idgames|id=5770|title=MUS file format description}}
 
*{{idgames|id=115|title=MIDI2MUS converter}}
 
*{{idgames|id=115|title=MIDI2MUS converter}}
 
*{{idgames|id=1123|title=MUS2MIDI converter}}
 
*{{idgames|id=1123|title=MUS2MIDI converter}}
 
*{{idgames|id=4525|title=QMUS2MIDI converter}}
 
*{{idgames|id=4525|title=QMUS2MIDI converter}}
*[http://www.shikadi.net/moddingwiki/MUS_Format MUS format] at the [http://www.shikadi.net/moddingwiki/Main_Page DOS Game Modding Wiki]
+
*{{dwforumsp|id=980861|title=MIDI3MUS converter}} on [[Doomworld forums]]
 +
*{{moddingwiki|title=MUS Format}}
  
 
[[Category:Music]]
 
[[Category:Music]]
 
[[Category:WAD lumps]]
 
[[Category:WAD lumps]]

Revision as of 19:13, 19 February 2021

Under construction icon-yellow.svgThis article or section is a stub. Please help the Doom Wiki by adding to it.

The MUS format is a slightly altered MIDI format, created for DMX and used in the Doom engine soundtracks. MUS files are nearly identical to MIDI files, only slightly more compact. The file format has a size limit of 65536 bytes.

Support for standard MIDI files in vanilla Doom was added in version 1.5, which meant WAD authors no longer needed to convert MIDI files to MUS. However, since this was achieved by the game running MIDI2MUS internally when needed, authors looking for vanilla compatibility should make sure that the MIDI file they include can be successfully converted. Vanilla Heretic and Hexen, derived from version 1.2 of the Doom code, still require that music be converted to MUS format before inclusion in a WAD.

In the DMX source code, the MUS format is referred alternatively as MUS, RTM, Real Time Music, and Game Music Format.

Limitations

The MUS format can only use the first 9 MIDI channels, using the first 8 for music instruments and the 9th for drums. The reasoning for this implementation detail in the DMX library seems to be that OPL2 cards (Adlib, Sound Blaster 1.0, SB 1.5, SB 2.0) had only nine channels.

FM cards with dual OPL2 (SB Pro, Pro AudioSpectrum) or OPL3 (SB Pro 2, SB 16) had 18 channels, and any card fully compliant with the General MIDI standard had to support at least 16 channels; but the success of the earlier 9-channel FM cards dictated going with the lowest common denominator for compatibility reasons.

The size of MUS files is limited to 64 kilobytes, due to use of 16-bit fields inside the file format.

Notes

The MIDI2MUS converter does not create perfect conversions; sometimes the created files can sound distorted. This can be most audibly heard with MIDI files that use pitch bend effects, such as "Oww!" and "How'd I Do?" from Rise of the Triad.

The MIDI format uses the value 127 as the maximum possible volume in volume change events; MUS allows for higher values. A MUS->MIDI converter that does not take this into account might end up glitching the volume on certain channels. "Smells like Burning Corpses" is known to be affected by this problem.

The MIDI3MUS converter works under modern operating systems.

The tempo of the MUS format depends on constants defined in DMX. For the Doom engine, the time division is 140 Hz, so one MUS tick lasts 1/140th of a second, and this value is what is used in most third-party software to play or convert MUS files. However, in Raptor: Call of the Shadows, the only other game using DMX outside of the Doom engine, the time division is 70 Hz. As a result, the Raptor MUS tracks are played at double speed by most third-party software.

External links