C/C++/Obj-C Real-time algorithm to ascertain Note (not Pitch) from Vocal Input

后端 未结 9 736
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 01:32

I want to detect not the pitch, but the pitch class of a sung note.

So, whether it is C4 or C5 is not important: they must both be detected as C.<

9条回答
  •  南方客
    南方客 (楼主)
    2020-12-13 01:45

    Perform a Discrete Fourier Transform on samples from your input waveform, then sum values that correspond to equivalent notes in different octaves. Take the largest value as the dominant frequency.

    You can likely find some existing DFT code in Objective C that suits your needs.

提交回复
热议问题