Alter the pitch of a sound. |
sound_variable = any valid sound variable previously created with the LoadSound command. hertz = valid playback hertz speed (up to 44000 hertz). |
Command Description:
Alters the pitch of a sound previously loaded with the LoadSound command. By changing the pitch, you can often reuse sounds for different uses or to simulate a 'counting up/down' sound. To make the sound 'higher pitched', increase the hertz. Conversely, decreasing the hertz will 'lower' the pitch. Note: this is in relation to the original hertz of the sound. |
Example:
; Load the sound (11,000 hertz) snd1Up = LoadSound("audio\oneup.wav") ; Play the sound normally PlaySound snd1Up ; Change the pitch UP and play it SoundPitch snd1Up, 22000 PlaySound snd1Up ; Change the pitch down and play it SoundPitch snd1Up, 8000 PlaySound snd1Up |