开发者

How to detect music note and chords programmatically (in iPhone SDK)?

开发者 https://www.devze.com 2023-02-18 12:24 出处:网络
How t开发者_JAVA技巧o detect music note and chords programmatically (in iPhone SDK) ??You would need to do a Fourier transform (usually a FFT) of the incoming sound wave and find the dominant frequenc

How t开发者_JAVA技巧o detect music note and chords programmatically (in iPhone SDK) ??


You would need to do a Fourier transform (usually a FFT) of the incoming sound wave and find the dominant frequency, then look up that frequency in a table of notes with their corresponding frequencies.

FFT is part of iOS since iOS4 and is located in the Accelerate framework.

Look at this other SO thread for more info and sample code.

To detect a chord is done by the same principle, but it's much trickier, since you need to find all the notes that make up the chord.

0

精彩评论

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