DMXGUS Gonna Give it to Ya

This WAD contains a replacement DMXGUS lump which you should probably load if you're building a retro PC with a Gravis Ultrasound card (or if you're emulatin...

Filenames
gusgonna.wad
Size
10.75 KB
MD5
88c11356f98e23fadfe8beb385fb7c7a
SHA-1
ee5b2f302a1c7faac4174d7802fc070ba73ba1f3
SHA-256
47f5e8ee187b4e29e5beab8c529f5802d6f477947e659a525a4bb064587cb493
WAD Type
PWAD
IWAD
Unknown
Engines
Doom
Lumps
2

Read Me

===========================================================================
Archive Maintainer      : Please place in sounds/
Advanced engine needed  : Vanilla Doom
===========================================================================
Title                   : DMXGUS Gonna Give it to Ya
Filename                : gusgonna.wad
Author                  : fraggle
Email Address           : [email protected]
Other Files By Author   : greenfish.wad, bsdmidi.zip

Description             : This WAD contains a replacement DMXGUS lump which
                          you should probably load if you're building a retro
                          PC with a Gravis Ultrasound card (or if you're
                          emulating one).

                          It does two things: firstly, it has a workaround
                          for the GUS instrument mappings bug present in
                          Vanilla Doom's DMX sound library; secondly, it has
                          an optimized instrument mapping table that is
                          statistically tailored for Doom's music.

                          I developed this for Freedoom but is useful on its
                          own, so I decided to release it as a standalone WAD.

===========================================================================
* Detailed technical description *

Gravis Ultrasound (GUS) cards have a limited amount of RAM onboard: either
256, 512, 768 or 1024KiB of RAM. This RAM is used to store digital samples
corresponding to MIDI instruments for playback. Because a typical instrument
set contains more samples than can fit into RAM, only a subset can be loaded.
The DMXGUS(C) lump stores the configuration for which samples get loaded
depending on the card RAM. When an instrument can't be stored in RAM, a
similar-sounding instrument is substituted; for example, General MIDI defines
7 different types of electric guitar; it's not necessary to load all of them.

Doom's GUS configuration is based on the standard configuration from the GUS
drivers, with some tweaks. Ideally the instruments in RAM should match the
instruments used in the game's MIDI. To gather some statistics, I dumped the
music from several different WAD files and analyzed them to determine which
instruments they used. These WADs were:

  Doom and Doom II; Alien Vendetta; Batman Doom; Eternal Doom; GothicDM and
  GothicDM 2; Hell Revealed and Hell Revealed 2; Memento Mori and Memento
  Mori 2; Plutonia 2; Scythe and Scythe 2.

I also built a table of the file sizes of the standard GUS patch set (can be
found in the idgames archive as dgguspat.zip). Between these two measures this
gave an estimate of cost (amount of consumed RAM) and benefit (number of MIDI
tracks) for each General MIDI instrument. The instruments could then be ranked
based on the ratio of benefit / cost to determine which instruments to prefer.
For example, Distortion Guitar (instrument 31) is quite large at 18KiB, but
still ranks highly because many MIDI tracks make use of it.

By listening the GUS patches in sequence I was then able to group the MIDI
instruments into sets of similar-sounding groups. Each set was assigned a
"leader" - a reasonable-sounding fallback for other instruments in the set
when they cannot be loaded. It is desirable that the leader be reasonably
small so that as many additional samples can be fitted into RAM. On 256KiB
GUS cards space is very tight and almost all RAM is taken up solely by the
leaders. Additional samples are added in sequence using the ranking scheme
described above, until no more RAM is available.

The end result sounds pretty good, I think even better than the Doom built-in
one on some tracks, and in particular it scales down well to the smaller
memory configurations, something that is ignored by most other instrument
mappings found in the idgames archive (eg. gus1m.zip, gus1m-ii.zip) which
all target 1024KiB cards.

The source code can be found in the Freedoom Git repository:

 <https://github.com/freedoom/freedoom/tree/master/lumps/dmxgus>


* What is included *

New levels              : None
Sounds                  : No
Music                   : No
Graphics                : No
Dehacked/BEX Patch      : No
Demos                   : No
Other                   : DMXGUS and DMXGUSC lumps.
Other files required    : None


* Play Information *

Game                    : Doom, Doom 2
Single Player           : Designed for
Cooperative 2-4 Player  : Designed for
Deathmatch 2-4 Player   : Designed for
Other game styles       : None
Difficulty Settings     : Not implemented


* Construction *

Base                    : Python code written from scratch.
May Not Run With        : Unknown
Tested With             : Chocolate Doom; Vanilla Doom in DOSbox using GUS
                          emulation
Known bugs              : Some MIDI instruments can sound silent (E2M2 is an
                          example).
                          The track by DMX referenced in the title of this
                          file is actually "X Gon' Give It to Ya", so the
                          reference is inaccurate.


* Copyright / Permissions *

Copyright © 2001-2017
Contributors to the Freedoom project.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
  * Neither the name of the Freedoom project nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS
IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* Where to get the file that this text file describes *

The Usual: ftp://archives.gamers.org/pub/idgames/ and mirrors
===========================================================================
Archive Maintainer      : Please place in sounds/
Advanced engine needed  : Vanilla Doom
===========================================================================
Title                   : DMXGUS Gonna Give it to Ya
Filename                : gusgonna.wad
Author                  : fraggle
Email Address           : [redacted]
Other Files By Author   : greenfish.wad, bsdmidi.zip

Description             : This WAD contains a replacement DMXGUS lump which
                          you should probably load if you're building a retro
                          PC with a Gravis Ultrasound card (or if you're
                          emulating one).

                          It does two things: firstly, it has a workaround
                          for the GUS instrument mappings bug present in
                          Vanilla Doom's DMX sound library; secondly, it has
                          an optimized instrument mapping table that is
                          statistically tailored for Doom's music.

                          I developed this for Freedoom but is useful on its
                          own, so I decided to release it as a standalone WAD.

===========================================================================
* Detailed technical description *

Gravis Ultrasound (GUS) cards have a limited amount of RAM onboard: either
256, 512, 768 or 1024KiB of RAM. This RAM is used to store digital samples
corresponding to MIDI instruments for playback. Because a typical instrument
set contains more samples than can fit into RAM, only a subset can be loaded.
The DMXGUS(C) lump stores the configuration for which samples get loaded
depending on the card RAM. When an instrument can't be stored in RAM, a
similar-sounding instrument is substituted; for example, General MIDI defines
7 different types of electric guitar; it's not necessary to load all of them.

Doom's GUS configuration is based on the standard configuration from the GUS
drivers, with some tweaks. Ideally the instruments in RAM should match the
instruments used in the game's MIDI. To gather some statistics, I dumped the
music from several different WAD files and analyzed them to determine which
instruments they used. These WADs were:

  Doom and Doom II; Alien Vendetta; Batman Doom; Eternal Doom; GothicDM and
  GothicDM 2; Hell Revealed and Hell Revealed 2; Memento Mori and Memento
  Mori 2; Plutonia 2; Scythe and Scythe 2.

I also built a table of the file sizes of the standard GUS patch set (can be
found in the idgames archive as dgguspat.zip). Between these two measures this
gave an estimate of cost (amount of consumed RAM) and benefit (number of MIDI
tracks) for each General MIDI instrument. The instruments could then be ranked
based on the ratio of benefit / cost to determine which instruments to prefer.
For example, Distortion Guitar (instrument 31) is quite large at 18KiB, but
still ranks highly because many MIDI tracks make use of it.

By listening the GUS patches in sequence I was then able to group the MIDI
instruments into sets of similar-sounding groups. Each set was assigned a
"leader" - a reasonable-sounding fallback for other instruments in the set
when they cannot be loaded. It is desirable that the leader be reasonably
small so that as many additional samples can be fitted into RAM. On 256KiB
GUS cards space is very tight and almost all RAM is taken up solely by the
leaders. Additional samples are added in sequence using the ranking scheme
described above, until no more RAM is available.

The end result sounds pretty good, I think even better than the Doom built-in
one on some tracks, and in particular it scales down well to the smaller
memory configurations, something that is ignored by most other instrument
mappings found in the idgames archive (eg. gus1m.zip, gus1m-ii.zip) which
all target 1024KiB cards.

The source code can be found in the Freedoom Git repository:

 <https://github.com/freedoom/freedoom/tree/master/lumps/dmxgus>


* What is included *

New levels              : None
Sounds                  : No
Music                   : No
Graphics                : No
Dehacked/BEX Patch      : No
Demos                   : No
Other                   : DMXGUS and DMXGUSC lumps.
Other files required    : None


* Play Information *

Game                    : Doom, Doom 2
Single Player           : Designed for
Cooperative 2-4 Player  : Designed for
Deathmatch 2-4 Player   : Designed for
Other game styles       : None
Difficulty Settings     : Not implemented


* Construction *

Base                    : Python code written from scratch.
May Not Run With        : Unknown
Tested With             : Chocolate Doom; Vanilla Doom in DOSbox using GUS
                          emulation
Known bugs              : Some MIDI instruments can sound silent (E2M2 is an
                          example).
                          The track by DMX referenced in the title of this
                          file is actually "X Gon' Give It to Ya", so the
                          reference is inaccurate.


* Copyright / Permissions *

Copyright © 2001-2017
Contributors to the Freedoom project.  All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

  * Redistributions of source code must retain the above copyright
    notice, this list of conditions and the following disclaimer.
  * Redistributions in binary form must reproduce the above copyright
    notice, this list of conditions and the following disclaimer in the
    documentation and/or other materials provided with the distribution.
  * Neither the name of the Freedoom project nor the names of its
    contributors may be used to endorse or promote products derived from
    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS
IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* Where to get the file that this text file describes *

The Usual: ftp://archives.gamers.org/pub/idgames/ and mirrors