Page 1 of 1

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

Posted: Sun Jun 04, 2017 7:18 pm
by marcbrooks
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?

Re: Explain science to change tempo but not pitch of a sound

Posted: Sun Jun 04, 2017 7:56 pm
by steve
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:
https://www.surina.net/soundtouch/soundstretch.html
https://www.surina.net/article/time-and ... aling.html

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:
http://sbsms.sourceforge.net/
and the source code in Audacity:
https://github.com/audacity/audacity/tr ... /sbsms/src

Re: Explain science to change tempo but not pitch of a sound

Posted: Mon Jun 05, 2017 11:10 am
by cyrano
steve wrote:"Subband Sinusoidal Modeling"
This algorithm is much more complex, and I don't have much information about it other than:
http://sbsms.sourceforge.net/
Thanks for the link, Steve!

However the devs main site, linked from sourceforge,

http://withunder.org/

seems to be gone.

http://downforeveryoneorjustme.com/http ... under.org/

Just in case you hadn't noticed.

Re: Explain science to change tempo but not pitch of a sound

Posted: Mon Jun 05, 2017 11:55 am
by steve
cyrano wrote:However the devs main site, linked from sourceforge,
There's never been a great deal on the devs main site. The best reference is the source code (though rather technical).

Re: Explain science to change tempo but not pitch of a sound

Posted: Mon Jun 05, 2017 12:03 pm
by steve
More info about SBSMS from Google Scholar:
https://scholar.google.com/scholar?hl=e ... _sdt=1%2C5