- Thread starter NoFontNL
- Start date

The pitch of a sound, when looking at the raw data, is determined by the length of the periods of its waves.

To alter pitch you need to alter the period. To alter the period is also to alter the speed at which it plays (GM should have this function). If you wish to alter the pitch and NOT the speed then you'll be getting into the non-trivial idea of "pitch shifting" (GM does NOT have this function and it would need to be calculated manually).

I am not positive but you may need the Fourier Transform to determine pitch (which is also used in pitch shifting) since it can help determine individual frequencies.

Use this info if its helpful.

To alter pitch you need to alter the period. To alter the period is also to alter the speed at which it plays (GM should have this function). If you wish to alter the pitch and NOT the speed then you'll be getting into the non-trivial idea of "pitch shifting" (GM does NOT have this function and it would need to be calculated manually).

I am not positive but you may need the Fourier Transform to determine pitch (which is also used in pitch shifting) since it can help determine individual frequencies.

Use this info if its helpful.

Last edited:

But I still can't do anything. If I had to code something myself, how would I create and read a sound buffer, to detect the frequency/pitch?

Look up OSCILLATOR, meaning you will be using the sine wave (sin function). You will need to know the Amplitude, Period, and wavelength. You should be able to find a list of all frequencies(in Hertz) to notes somewhere also. Generally, higher notes are higher frequencies while lower notes are lower frequencies.

If lower notes by themselves sound slower and higher notes sound faster, this means you may need to look up time stretching .

EDIT: Forgot to put in "music" in front of oscillator. It's all the same.

Found something for you (Brings back the memories):

https://www.khanacademy.org/science/ap-physics-1/ap-mechanical-waves-and-sound/introduction-to-sound-waves-ap/v/sound-properties-amplitude-period-frequency-wavelength

If lower notes by themselves sound slower and higher notes sound faster, this means you may need to look up time stretching .

EDIT: Forgot to put in "music" in front of oscillator. It's all the same.

Found something for you (Brings back the memories):

https://www.khanacademy.org/science/ap-physics-1/ap-mechanical-waves-and-sound/introduction-to-sound-waves-ap/v/sound-properties-amplitude-period-frequency-wavelength

Last edited: