How do I increase the pitch of a sound?

You might first want to know:

Sound is stored on a computer as a series of samples. Each one is between -32768 and 32767, and there are lots of them – for high-quality sound, 44,100 samples/second.

In this example, we're copying every other sample and playing the new list. Copying every other sample means that we have nearly the same sound, but we're playing it in 1/2 as much time. Thus, we're squeezing the sound and doubling the frequency.

squished-sound.png




Want to play with this project yourself?


Click here
If anything goes wrong, no worries. Just hit the back button in your browser. You can re-click to re-enter GP, and everything will be as it was before.


scalingASoundUp.png







Where do I go next?


I want to know: