Sound pitch

From EDukeWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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).

Example:

  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