Friday, April 27, 2012

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.



thank you,



L.


Source: Tips4all

4 comments:

  1. 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."

    ReplyDelete
  2. 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.

    ReplyDelete
  3. See: Related question

    How much control over pitch do you need... could you precalculate all the different sounds?
    If the answer is yes, then you can just pick the right sounds and play them.

    You could also use Audio Converter Services in conjunction with AVAudioPlayer, which will allow you to resample the audio (which will effectively repitch them, though they'll change duration).

    Alternatively, as the related question points out, you could use OpenAL and AL_PITCH

    ReplyDelete
  4. 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.

    ReplyDelete