Android audio FFT to display fundamental frequency

后端 未结 3 1894
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-01 04:56

I have been working on an Android project for awhile that displays the fundamental frequency of an input signal (to act as a tuner). I have successfully implemented the Audi

3条回答
  •  时光取名叫无心
    2021-01-01 05:52

    I suspect that the strange results you're getting are because you might need to unpack the FFT. How this is done will depend on the library that you're using (see here for docs on how it's packed in GSL, for example). The packing may mean that the real and imaginary components are not in the positions in the array that you expect.

    For your other questions about window size and resolution, if you're creating a tuner then I'd suggest trying a window size of about 20ms (eg 1024 samples at 44.1kHz). For a tuner you need quite high resolution, so you could try zero-padding by a factor of 8 or 16 which will give you a resolution of 3-6Hz.

提交回复
热议问题