0

Does anyone know how I could record some audio on the iphone then change the pitch of the audio?

Matt Poush
  • 1,263
  • 8
  • 11
user191924
  • 13
  • 1
  • 4

2 Answers2

2

Download and use the I-AM-T-Pain application ;-)

Chris Ballance
  • 33,810
  • 26
  • 104
  • 151
2

It looks like you'll want to start with the Core Audio Framework: http://developer.apple.com/IPhone/library/documentation/MusicAudio/Conceptual/CoreAudioOverview/

There doesn't seem to be a whole wealth of information on the AutoTune algorithm, but a good start would be to use a Fast Fourier Transform to analyze the pitch to determine what pitch your audio is actually at. It's a relatively simple to change the pitch from what it is to what it needs to be. For example, A is 440 Hz. Assuming the input is actually 466.164 (A#), and you want it to be A, you adjust the waveform by 0.94387383 (440 / 466.16400). An A# becomes an A.

If you want to achieve an auto tune effect, you'll want to subdivide the recording into tiny audio clips that you can re-pitch individually.

More info on pitch detection: http://en.wikipedia.org/wiki/Pitch_detection_algorithm

Matt Poush
  • 1,263
  • 8
  • 11