- Home /
How can I change audio pitch without changing tempo?
Hi, I want to play a sound from an AudioSource, and change its pitch with respect to the position of mouse. But as you know, pitch changes tempo.
Is there any way to keep the tempo constant while changing the pitch? (in real-time, not in Audacity) ?
Thanks !
$$anonymous$$mmh, in my opinion the pitch is by definition the tempo. What do you really want to do ?
Yes, in terms of dimension, they are both in Hertz. But think of it this way, You have 10 seconds of note (low) A (440 Hz), then you double the pitch, and you have 5 seconds of (high) A (880 Hz) Whereas I want to have 10 seconds of high A.
Yes this is what I understood from your question, but I think pitch may not be the thing you need to change ...
Answer by gregzo · Aug 08, 2013 at 02:20 PM
True pitch shift is a very complex subject, involving decomposing the signal via fft and identifying the attack part of the sample. When you're altering pitch in Unity, you're only adjusting playback speed / resampling. True pitch shift would require a plugin, and can be quite resource intensive.
Dirac is a good library, for example.