O'Reilly logo

3D Game Programming for Teens, Second Edition by Eric Grebler, Maneesh Sethi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adjusting Pitch

Do you know what the difference is between a tenor and a soprano? Tenors have voices that are low, while sopranos have voices that are higher. The level of a person’s voice, high or low, is called the pitch. I’m sure you’ve heard sound effects in which the pitch of someone’s voice is set so high that it sounds like they are talking like a chipmunk. Or, perhaps you’ve heard the pitch of someone’s voice lowered to a point that they sound like the devil or a monster.

Pitch is measured in a unit called a Hertz (Hz). In Blitz3D, you can adjust the pitch of a sound by adjusting its Hertz. The range goes from 1 Hz to 44,000 Hz.

Adjusting the pitch is simply a matter of using the SoundPitch code. For this program, I did not create a demo ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required