Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Real-time Pitch Shifting on the iPhone

I have a children's iPhone application that I am writing and I need to be able to shift the pitch of a sound sample using Core Audio. Does anyone have any example code I could look at where this is done. There are many music and game apps in the app store that do this so I know I am not the first one. However, I cannot find any examples of it being done.

like image 266
Leachy Peachy Avatar asked Jul 08 '09 20:07

Leachy Peachy


People also ask

What is pitch change on Iphone?

Adjust the speaking voice Adjust the pitch: Tap Speech, then drag the slider. You can also turn on Use Pitch Change to have VoiceOver use a higher pitch when speaking the first item of a group (such as a list or table) and a lower pitch when speaking the last item of a group.

Can you pitch shift Apple music?

To access the feature, you need to turn on the Show Transposition Controls toggle in the app's entry of Apple's Settings app. Once enabled, swiping on a song's artwork in the full-screen player allows its pitch to be shifted.

How does real time pitch shifting work?

The FFT is defined to be in real time if it can run faster than the sampling time of the microphone, so the user does not have any noticeable delay between spoken voice and processed output sound. To pitch shift with the FFT, one has to shift the frequency content of the signal in the desired direction.


4 Answers

you can use dirac-2 from dsp dimension for pitch shifting on the iphone. quote: -

"DIRAC2 is available as both a commercial object library offering unlimited sample rates and phase locked multichannel support and as a free single channel, 44.1/48kHz LE version."

like image 162
Aran Mulholland Avatar answered Sep 21 '22 00:09

Aran Mulholland


use the soundtouch open source project to change pitch

Here is the link : http://www.surina.net/soundtouch/

Once you add soundtouch to your project, you have to give the input sound file path, output sound file path and pitch change as the input.

Since it takes more time to process your sound its better to modify soundtouch so that when you record the voice, directly give the data for processing. It will make your application better.

like image 39
Anil Sivadas Avatar answered Sep 20 '22 00:09

Anil Sivadas


I know it's too late for the person who asked but it is really a valuable link (As I found) for any one else who is looking for the solution of the same problem.

So Here we have latest DIRAC3 with it's own audio player classes which will take care of run time pitch and speed(explore for god knows what more) shifting. Run the sample and have huge round of applause for that.

like image 38
rptwsthi Avatar answered Sep 21 '22 00:09

rptwsthi


Try Dirac - it's the best technology out there and it's available on Win, Linux, MacOS X and iOS. We're using it in all our products (and a couple of others do as well, search for "Capo" on the App Store). They're at version 3 now which has seen a huge increase in performance since previous versions. Hope this helps.

like image 2
tahome Avatar answered Sep 22 '22 00:09

tahome