Ishan Nathen
Ishan Nathen

Reputation: 11

the Frequencies from the FFT is showing values that it shouldnt

I'm developing a software to input a monotonic .wav clip (piano) and show the piano notes which are played in that clip. I'm using FFT to calculate the frequencies but they are giving me values such as 22360 Hz and so on where I want to get around 260 to 600 Hz.

Can someone please help me with this?

Upvotes: 1

Views: 260

Answers (3)

Chris Stratton
Chris Stratton

Reputation: 40357

Hotpaw2 makes an important point about overtone content.

However another thing you will require is a window function to prevent frequency domain artifacts of the sampling interval from contaminating your result. The window function applied to the data before the FFT essentially fades the signal in and out smoothly to avoid this.

Upvotes: 0

hotpaw2
hotpaw2

Reputation: 70693

Pianos put out a lot of powerful high harmonics or overtones, and thus an FFT should show amplitude in many high frequency bins. Perhaps you should use a pitch detection or estimation algorithm instead of just an FFT?

Upvotes: 2

chaohuang
chaohuang

Reputation: 4115

I think your problem is that you don't have enough samples, so the frequency resolution is poor. All you need to do is to have more samples or just zero-padding. See here and here. That may help.

Upvotes: 0

Related Questions