Many artifacts sound higher in pitch when accelerated and lower when slowed down. Car engines, fan coolers, a record player... the list goes on. If you want to simulate this kind of sound effect in an animated object that can have its speed changed dynamically, follow this recipe.
Matching the audio pitch to the animation speed
Getting ready
For this recipe, you'll need an animated 3D object and an audio clip. Please use the animatedRocket.fbx and engineSound.wav files, available in the 04_08 folder.
How to do it...
To change the pitch of an audio clip according to...