user191924
user191924

Reputation: 13

Create pitch changing code?

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

Upvotes: 0

Views: 1533

Answers (2)

Matt Poush
Matt Poush

Reputation: 1265

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

Upvotes: 2

Chris Ballance
Chris Ballance

Reputation: 34367

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

Upvotes: 2

Related Questions