Pitch Shift/Slow Down Algorithms

with any time-stretching algorithm, the more you stretch, the more the quality will be reduced – it’s just a matter of making the quality reduction as little as possible with super high/low stretching ratios. But some amount of degradation will occur, that’s just the nature of the beast unfortunately.

When you say “100% time stretching”, do you mean you want to play back audio twice as fast as the original?

I mean if the original tempo on the audio is 100bpm, i should be able to increase the tempo to 200BPM or decrease the tempo to like 40BPM without pitch hanging or affecting the sound quality. For Just 20% tempo increase or decrease on Superpowered, the sound gets really bad and unusable

OK. Doubling the tempo while maintaining good quality should be achievable.

I don’t know what Superpowered is doing under the hood, but what I might suggest as a starting point is looking into something along the lines of TD-PSOLA without the final resampling step.

Many pitch shifting algorithms achieve their results by time stretching by the appropriate ratio, then resampling to yield the changed pitch with the original duration. I think if you just leave out the resampling step, you should get a decently high-quality time stretched signal at the original pitch.

Thanks Ben. I personally am not a developer but the app owner hence why I am looking for someone to looking into my iOS and Android code to see if they can fix the issue for me. The first developer that suggested SuperpoweredSDK and implemented in on my app passed away long ago so since then I have been finding it difficult to get a mobile dev that has the knowledge of audio signal processing SDKs to help me fix this issue or Try the SoundTouch or Rubber Band SDK on my app if it will fix thi issue for me. Please can you help with this to hire you on another platform or can you suggest anyone who can fix this for me on my existing app? I am sorry If its wrong to ask for such help here on this platform. Please I apologise in advance

I could certainly try my hand at implementing this. I only have experience working with Juce for plugins, on computers; I’ve never done mobile development before.

Ok Please lets give it a try. Its my first time here, so i dont know how I can link up with you to get this going? I dont know how you prefer me to link up with you?

1 Like

I’ll DM you

1 Like

It took me a couple of years to make a Pitch & Time shifter - the work has a surprising amount of Psychoacoustics involved. Meaning it’s not just the maths you have to contend with - it’s also the way humans perceive sound. The best algorithm needs take into account temporal masking, pretty much in the same way as MP3 did. And without any ‘human’ data I had to do countless hours of testing and tweaking - it wasn’t much fun. :slight_smile:
The fun bit(!) was removing all the Trig calls from the algorithm!


Just got an Email today from Superpowered. They have a new version 2.1.0 with the following updates:

Quick hit: Formant correction pitch shifting feature for the TimeStretching and AdvancedAudioPlayer classes is now available in Superpowered 2.1.0. Recommended for vocals and monophonic content.

I guess they saw the post.


I am trying to build a Tabla(An Indian percussion instruments with two drums) App on the Android Platform. The left Drum has a melodic sound and in the physical drums, comes in various Keys/Pitches. In building a virtual Tabla, the app should be capable of replicating that and the user should be able to select any of the 12 notes of a scale. Also, the sample sound should be capable of being looped, since and there would be a need to increase/decrease the tempo. Can this forum help me in identifying how to go about it. What tools, SDKs are available for this? Help would be appreciated

Interesting thread guys!

I’m currently looking for a library to change the pitch (-/+ 12 semitones) of a real time audio stream (from the daw, not from a file).

What are your feedback so far @midiculous ? Did you use Rubberband?

I tried Rubberband for a real time plugin but it seems to have a enormous latency. I’ve something like 4096 + the size of the samplePerBlock which is something around 100ms at 44100Hz :open_mouth:

Does other librairies like Zplane or ZTX have this kind of latency in real time usage too?

I am not really aware of any free / open source libraries that can achieve real time pitch shifting with low latency. Unfortunately, if you really want a good sound and low latency, you will probably have to code it yourself. (or wait for me to finish my implementation, which will be open source…)

Thanks for your feedback @benvining
I can’t wait to test and use your project but I’ve a tight deadline for the release of the plugin. Do you have a public repository to follow your project development?

I also tested Superpowered but it seems that the quality is not as good as Rubberband.

Hi! Could you possibly send a new link? I’m afraid the old one doesn’t seem to working.

Not the poster you’re replying to - but I was curious too so googled “BencinaAudioAnecdotes310801.pdf” and came across: http://www.rossbencina.com/static/code/granular-synthesis/BencinaAudioAnecdotes310801.pdf

which from the name sounds like the same paper! Hope that helps

Thank you! Much appreciated!

i am very interested by an audio plugin made with Juce, that would do a pitch shift in real time (in the range +/- 2 pitch or so) , with low latency. Do you have achieved your project? or can you advice me to some similar free project (with juce or equivalent real time audio plugin)? Thanks!