Difference between revisions of "Random sound pitch removed"

From DoomWiki.org

[checked revision][checked revision]
m (3DGE has had sound pitching since commit ea4f26c)
(Trivia: I know this is true but it needs a reference added.)
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
'''Random sound pitch''' is a feature that was removed unintentionally from [[Doom]] v1.4 due to changes in the [[DMX]] {{wp|API}} which were not taken into account by the Doom codebase. Sound effects are always played at a neutral pitch in later versions of DOS Doom, despite the fact that the DMX API calls are still passed a randomized pitch value. The bug is not present in recent console ports ([[Xbox]] and [[XBLA]], and the [[Doom Classic]] engine used in the [[BFG Edition]] and [[Doom Classic Complete]] for the PS3) since they do not use DMX for audio.
 
'''Random sound pitch''' is a feature that was removed unintentionally from [[Doom]] v1.4 due to changes in the [[DMX]] {{wp|API}} which were not taken into account by the Doom codebase. Sound effects are always played at a neutral pitch in later versions of DOS Doom, despite the fact that the DMX API calls are still passed a randomized pitch value. The bug is not present in recent console ports ([[Xbox]] and [[XBLA]], and the [[Doom Classic]] engine used in the [[BFG Edition]] and [[Doom Classic Complete]] for the PS3) since they do not use DMX for audio.
  
This bug was fixed in [[Strawberry Doom]], and [[source ports]] including the [[Eternity Engine]], [[PrBoom]], [[ZDoom]], [[3DGE]], [[Chocolate Doom]] and derivatives [[Crispy Doom]] and [[Doom Retro]] offer it as an option.
+
This bug was fixed in [[Strawberry Doom]], and [[source ports]] including the [[Eternity Engine]], [[PrBoom]], [[ZDoom]], [[EDGE]], [[Chocolate Doom]] and derivatives [[Crispy Doom]] and [[Doom Retro]] offer it as an option.
  
 
==Technical details==
 
==Technical details==
Line 41: Line 41:
  
 
While the change in the number of parameters prevented compilation until the source code was updated, this update was done poorly by id Software and the positioning and pitch change values were swapped in every call to these functions. Since all the parameters after the first are the same type of variables (int), the mistake does not prevent compilation and remained therefore undetected. As a result, the disappearance of random pitch changes was blamed on a bug in DMX.
 
While the change in the number of parameters prevented compilation until the source code was updated, this update was done poorly by id Software and the positioning and pitch change values were swapped in every call to these functions. Since all the parameters after the first are the same type of variables (int), the mistake does not prevent compilation and remained therefore undetected. As a result, the disappearance of random pitch changes was blamed on a bug in DMX.
 +
 +
==Trivia==
 +
* Although it was determined that the removal of randomized sound pitches was unintentional, when [[John Romero]] was asked about the feature in January 2019 he described it as being "mostly experimental" at the time it was implemented and that he is happy about its disappearance from later versions of the game, saying that he "wasn’t a fan of it". Additionally, he stated that the sound effects in Doom were not designed with the feature in mind.{{fact}}
  
 
==Sources==
 
==Sources==
 
* {{dwforums|85648|Doom/Strife with random pitched sound}}
 
* {{dwforums|85648|Doom/Strife with random pitched sound}}
 +
* [https://www.doomworld.com/forum/topic/57270-things-about-doom-you-just-found-out/?page=236&tab=comments#comment-1953235 Things about Doom you just found out]
 
[[Category:Errors and bugs]]
 
[[Category:Errors and bugs]]

Revision as of 19:02, 1 May 2019

Random sound pitch is a feature that was removed unintentionally from Doom v1.4 due to changes in the DMX API which were not taken into account by the Doom codebase. Sound effects are always played at a neutral pitch in later versions of DOS Doom, despite the fact that the DMX API calls are still passed a randomized pitch value. The bug is not present in recent console ports (Xbox and XBLA, and the Doom Classic engine used in the BFG Edition and Doom Classic Complete for the PS3) since they do not use DMX for audio.

This bug was fixed in Strawberry Doom, and source ports including the Eternity Engine, PrBoom, ZDoom, EDGE, Chocolate Doom and derivatives Crispy Doom and Doom Retro offer it as an option.

Technical details

Two DMX functions are relevant for this bug: SFX_PlayPatch() and SFX_SetOrigin().

The order in which parameters are passed was modified, and as a result Doom started sending the channel separation value (stereo positioning for the sound) as the pitch value.

SFX_PlayPatch
Parameter Old API New API
1: void * Patch to play Patch to play
2: int Left-Right Positioning Pitch Change
3: int Pitch Change Left-Right Positioning
4: int Volume Level Volume Level
5: int Priority Flags
6: int - Priority
SFX_SetOrigin
Parameter Old API New API
1: SFX_HANDLE Sound Handle Sound Handle
2: int Left-Right Positioning Pitch Change
3: int Volume Level Left-Right Positioning
4: int - Volume Level

While the change in the number of parameters prevented compilation until the source code was updated, this update was done poorly by id Software and the positioning and pitch change values were swapped in every call to these functions. Since all the parameters after the first are the same type of variables (int), the mistake does not prevent compilation and remained therefore undetected. As a result, the disappearance of random pitch changes was blamed on a bug in DMX.

Trivia

  • Although it was determined that the removal of randomized sound pitches was unintentional, when John Romero was asked about the feature in January 2019 he described it as being "mostly experimental" at the time it was implemented and that he is happy about its disappearance from later versions of the game, saying that he "wasn’t a fan of it". Additionally, he stated that the sound effects in Doom were not designed with the feature in mind.[citation needed]

Sources