I was able to recorded an audio signal through the MIC and i applied FFT and Hanning window function to it. Now I want to know how do I identify CUTOFF frequency from it to apply the High Pass Filter.

my sample rate = $8000 Hz$, FFT block size = $256$

Can anyone help me to identify this ? I would really appreciate it ! :)


  • $\begingroup$ Your question doesn't quite make sense. Do you need to apply a high pass filter, or do you need to determine the cutoff frequency of a high pass filter that your signal has already been through? $\endgroup$ – JRE Feb 3 '15 at 9:09
  • $\begingroup$ @JRE Thanks for the reply... Actually I want to apply high pass filter to my code. I was able to find some high pass filter API. But I can not understand how I need to use that API according to my code. Here (this) is my original question which i was posted in the stackoverflow $\endgroup$ – Hash_S Feb 3 '15 at 11:05
  • $\begingroup$ What frequencies are you trying to remove? Are you trying to look at the FFT and find where the noise is and from that determine the cutoff? $\endgroup$ – JRE Feb 3 '15 at 11:13
  • $\begingroup$ how do I find that??? sorry If I am bothering to you. Because I am new to this area $\endgroup$ – Hash_S Feb 3 '15 at 11:20
  • $\begingroup$ How do you find WHAT? $\endgroup$ – JRE Feb 3 '15 at 11:20

You have to know about Bin fft.

If you have : FFT Size : 256 and Sample rate is 8000hz (the max frequency would contain on your data is 4000hz). then you have 8000/ 256 bin -> about 31.25 hz/ bin.

the High Pass Filter:

That means you want to get all data above f0 (= 2000 hz. Example) and remove all data below f0 (2000hz).

Bin at 2000hz = 2000/ 31.25 = 64 bins.

After you data put through FFT Block , you have frequency spectrum from -4000hz to +4000hz. and from 0 -> 128 -> 256

Then in frequency domain. you have to remove from 64 bins -> 128 -> 192 bins . and you get bins from 0 -> 63 and 193 -> 256 ,

pass it into Ifft , So the output only contains from 2000hz to 4000hz .

I hope it helps you.

  • $\begingroup$ thanks alot...your answer gives a better idea about how do I need to decide the cutoff frequency for my program. thanks Jimmy...cheers !!! $\endgroup$ – Hash_S Feb 3 '15 at 17:42

You need to decide what frequencies you want to keep. If you are recording your (human) voice, it may be helpful to think about frequencies in terms of notes on the piano.

For example the A above middle-C is 440 Hz. Go up an octave more, and you get 880 Hz. Four octaves above would be 2*2*2*2*440 Hz = 7040 Hz = 7.04 KHz. Which notes do you want to filter out, and which ones do you want to keep?

You are making a high pass filter. What low notes do you want to remove? It will probably work for you to just pick an octave, and then compute the frequencies using the examples I gave above.

  • $\begingroup$ @ Josiah thanks for the reply...I am recording songs. Because I am trying to do a music Identification system like Shazam. Therefore how do I need to think about cutoff frequency for that ? $\endgroup$ – Hash_S Feb 3 '15 at 17:24
  • $\begingroup$ I'm not familiar with Shazam, shazam.com? Is that like Pandora? What aspect of a song are you trying to identify? I agree with previous answerers that you need to refine your question. $\endgroup$ – Josiah Yoder Feb 4 '15 at 15:25
  • $\begingroup$ And please upvote Jimmy's answer if you found it helpful. Thanks for "accepting" it. $\endgroup$ – Josiah Yoder Feb 4 '15 at 15:26
  • $\begingroup$ @ Josiah Yes, that's the site. It's a music identification system. It helps to identify the music through their application. Basically it's helps to identify a song through their peaks(position of frequencies). It's very nice app. You can get more information about it from this $\endgroup$ – Hash_S Feb 4 '15 at 17:01
  • $\begingroup$ Sorry Josiah, still I cannot vote. Because I am new to this site......:( $\endgroup$ – Hash_S Feb 4 '15 at 17:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.