Explain science to change tempo but not pitch of a sound.

So I’ve been trying to create a blind simulator in the Unity Game Engine.

I’m trying to embed two outputs based on proximity detection:

  • Auditory
  • Haptic

Currently implemented is the auditory output which dynamically shifts in pitch based on how close/far of a distance to an object the blind stick is.
I’m now trying to implement the haptic sound using a low hertz tone made from sinewaves. However the trouble I’m having is changing the tempo without it affecting the speed. I know it is possible to do this in audacity but when I’ve tried using audacity and applying its results into Unity its gone a little messy, hence why I’m attempting to do it now through Unity. I was wondering if anyone was able to explain the science / formula behind changing speed/tempo of an audio file without the pitch behind affected so I can draft of a code version that I can apply to Unity?

Audacity uses two methods for “time stretching”.
The simpler version is based on the SOLA algorithm, implemented by the SoundTouch library.
For information, see these links:

The other method is with “Subband Sinusoidal Modeling”
This algorithm is much more complex, and I don’t have much information about it other than:
and the source code in Audacity:

Thanks for the link, Steve!

However the devs main site, linked from sourceforge,


seems to be gone.


Just in case you hadn’t noticed.

There’s never been a great deal on the devs main site. The best reference is the source code (though rather technical).

More info about SBSMS from Google Scholar: