Sound pitch

From EDukeWiki
Jump to navigation Jump to search

Changes the pitch of all sounds for the specified player. The pitch is measured in cents (1/100 of a semitone); negative values lower pitch, positive values raise pitch. Pitch will remain altered, even if a new game is started, until sound_pitch is set back to 0. Note that sound_pitch will not affect the pitch of sounds already being played (so a looping sound will not be altered until the next time it starts).


  setplayer[THISACTOR].sound_pitch -1024

...will lower the pitch of sounds as if the player were underwater.

If you want to manipulate the pitch of a specific sound dynamically, change this parameter before producing the sound and restore its original value thereafter:

  getplayer[THISACTOR].sound_pitch temp
  setplayer[THISACTOR].sound_pitch -1024
  sound BOS4_ATTACK
  setplayer[THISACTOR].sound_pitch temp