Login or Signup

Blitz3D Docs -> 2D - Category -> Sound/Music -> SoundPitch

SoundPitch sound_variable, hertz


sound_variable = any valid sound variable previously created with the LoadSound command.

hertz = valid playback hertz speed (up to 44000 hertz).


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 frequency of the sound.


; Load the sound (11,000 hertz)

snd1Up = LoadSound("audiooneup.wav")

; Play the sound normally
PlaySound snd1Up

; Change the pitch UP and play it
SoundPitch snd1Up, 11000*2 ;twice original frequency
PlaySound snd1Up

; Change the pitch down and play it
SoundPitch snd1Up, 11000/2 ;1/2 original frequency
PlaySound snd1Up


mv333(Posted 1+ years ago)
up to 44000 hertz

I tried higher, and it worked.

If you want to change the pitch while the music/sound is playing, then use "ChannelPitch".

Blitz3D Manual Forum

BlitzPlus Equivalent Command
Blitz Social Club