How to slow audio below 25% (or 0% or even backwards) on iOS when AVAudioNode does not allow this?

Hello there!

Does anyone know how it’s possible to play an audio file within an iOS app below 25% (or 0% or even backwards). I can’t see how it’s possible to slow down audio below 25% when AVAudioNodes do not have the ability to set a rate below 0.25, and yet an app called AudioStretch is not only is able to do that, it can also play a point in time indefinitely and even play a song backwards? Unfortunately, I can’t seem to include a YouTube link to a demo on this post but if you do a search on YouTube for AudioStretch and, you’ll see a demo by Dream Theater musician Jordan Rudess.

How is this physically possible on iOS (especially that the song can play a moment in time forever, not just very very very slow)? Any insight would be greatly appreciated!!! I really want to implement these features on an iOS app I am working on but have not had any success!

Andres

Answered by Engineer in 613346022
To be able to use rates < 25%, you could use an AVAudioUnitTimePitch in your playback chain.
Please check: https://developer.apple.com/documentation/avfoundation/avaudiounittimepitch/1389380-rate
Accepted Answer
To be able to use rates < 25%, you could use an AVAudioUnitTimePitch in your playback chain.
Please check: https://developer.apple.com/documentation/avfoundation/avaudiounittimepitch/1389380-rate
Thank you for your response.

I don’t know why I thought there was a limit at 0.25. However, it does seem to not go past 1/32, and there is an app called AudioStretch that can not only play at 1%, it can also play a point in time indefinitely and even backwards. Can AVAudioUnitTimePitch do this same thing as well?
For anyone who reads this in the future, I spoke with an engineer in a 1-on-1 session for WWDC and found that this is not possible with AVAudioEngine; it looks like AudioStretch use their own DSP to do this. Makes sense since they also have an Android app with this feature.

Thank you Apple and WWDC!
How to slow audio below 25% (or 0% or even backwards) on iOS when AVAudioNode does not allow this?
 
 
Q