Hi, I’ve noticed in the documentation that we can setFrequency on a single channel, but I can’t find any reference to setting the pitch on a single channel. 😕
Is this just a missing entry in the documentation or are we not able to alter the pitch or a specific channel? 😕
- ToneDef asked 12 years ago
By changing the frequency of a channel, you effectively ARE changing its pitch. So, for example, let’s say that you have a 440Hz sine wave (A4) running at 44,100 samples per second. If you want to change that to, say, G4 (392Hz), you would change the frequency to 44,100 * 392 / 440 = 39289 samples per second.
So you see, the frequency IS the pitch, effectively.
Hope that helps.
but by doing that, don’t you lengthen the time it takes to play the sample.
I thought the SetPitch command lowered the pitch without altering the sample length, while the setFrequency stretched it out (with probably a pitch lowering as a side effect).
Please login first to submit.