1
$\begingroup$

I would like to experiment with some input from a microphone and am receiving a 2 channel, 512 samples buffer in real time

I know the signal could be passed through a low pass filter, and then windowed before the FFT.

The sample rate is 44100.00, what low pass filter is needed for this, does the analog to digital conversion not run it through a low pass filter before converting it?

How exactly does a window apply to real time sample input of 512 samples? Is a window not the same as a filter?

I have also read that the signal can be run through the FFT twice, why exactly is this done and is it necessary for this data?

I would like to slowly build this up to do spectral analysis etc. Is this done directly on the FFT bin data?

$\endgroup$
  • $\begingroup$ This question doesn't really fit in with the usual question guidelines here. I will attempt to answer, but your needs might be better suited by reading on Wikipedia, or a mailing list such as music-dsp. $\endgroup$ – Bjorn Roche Feb 21 '14 at 15:10
3
$\begingroup$

I know the signal could be passed through a low pass filter, and then windowed before the FFT.

Yes, it could be, and it's usually advisable to use a window, but these are not just things you do blindly because you heard about them. Low passing the data will alter it in ways you might not want to. It might be useful, or it might not -- depends on your application. It will reduce the amount of high frequencies represented in your FFT results. Is that what you want? Maybe, maybe not. Windowing is useful because it reduces (but does not eliminate) frequency-domain distortion caused by separating your data into chunks. Usually you want that, but there are trade-offs (my explanation is an over-simplification).

The sample rate is 44100.00, what low pass filter is needed for this, does the analog to digital conversion not run it through a low pass filter before converting it?

The input must be filtered before the digital conversion (and usually this is done for you). There is no way to filter it after to achieve the same effect, so even if it's not taken care of for you, you might as well forget about it. Chances are, your DA Converter does a halfway decent job of this, though.

How exactly does a window apply to real time sample input of 512 samples? Is a window not the same as a filter?

A window and a filter are different, as explained above.

I have also read that the signal can be run through the FFT twice, why exactly is this done and is it necessary for this data?

You haven't really told us anything about what you want to do with this data, but no, it's highly unusual to do two FFTs.

I would like to slowly build this up to do spectral analysis etc. Is this done directly on the FFT bin data?

More or less. I suggest you read up on filtering, windowing, fourier analysis on Wikipedia. This blog post might also help.

$\endgroup$
2
$\begingroup$

If there is not already a 22 kHz (or lower) low-pass filter (or a mic or sound source that does not respond at or above half your sample rate) before the ADC you are using, then your data may already contain aliasing noise.

The window does not apply to your real-time sample input buffer, but to the input to your FFT, which can be of a different length (using data from multiple input buffers, for instance).

If the FFT windows are overlapped by 50%, then this could be one reason why what you read said that the data is processed twice.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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