开发者

Create pitch changing code?

开发者 https://www.devze.com 2022-12-09 21:10 出处:网络
Does anyone know how I could record some audio on the iphone then change 开发者_高级运维the pitch of the audio?Download and use the I-AM-T-Pain application ;-)It looks like you\'ll want to start with

Does anyone know how I could record some audio on the iphone then change 开发者_高级运维the pitch of the audio?


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号