Reputation: 711
On microphone at some time, starts flowing sound defined frequency(500hz). How do I know when the signal began to come to the microphone? To solve this problem, I know that I need to use FFT(Fast Fourier transform). But I dont understand, how should I take after FFT frequency? I'm use NAudio on C#. And my buffer from microphone is byte array.
Upvotes: 1
Views: 1418
Reputation: 70743
A narrow IIR bandpass filter followed by an envelope detector might be one possible method to try. Another thing to try might be cross-correlation against a matched filter, if you know the rise time of your tone burst. You will have to calibrate out the latency of your audio input signal path as well.
Upvotes: 1
Reputation: 213220
Using an FFT for this is overkill and not particularly appropriate. A much simpler solution for this kind of problem (tone detection/onset detection) is the Goertzel filter.
Upvotes: 2
Reputation: 2317
Determining WHEN a signal is sampled into a buffer is a programatical problem.
That has nothing to do with determining WHAT the frequency content of the sampled signal is (using the FFT). See my reply for your other question...
Upvotes: 1