I am trying to find a specific block of data that should hold valid audio data that I want to process. For instance, I record at 44.1kHz, but I only transmit a .5s of content. Since the buffer I store the recordings in contains both the recording as well as background noise, is there a way to isolate the sample I desire? Is this a simple filtering problem? I know the range of frequencies I need in the sample, so would a bandpass filter solve this issue? My ultimate goal is to run the time series data through an FFT to see which of the desired frequencies were transmitted. Note that this is being done in software. Thanks for any help!
Knowing the range of frequencies is a good start and yes a bandwidth filter will certainly help you isolate them but you must consider the overall level of background noise vs signal noise.
Performing an FFT on filtered (bandwidth or otherwise) data will only yield results on the frequencies that are left over! This will either be of use to you or not.
If the number of frequencies that you are after are not that numerous, a collection of IIR (infinite impulse response) filters might be a better choice.
Consider DTMF tones used by telephones and cellphones, typically IIR filters have found their way in software based detection of these dual-tone based signals. There are online resources for calculating each of the filter's co-efficients. You must use one filter per frequency that you are after.
The file DTMFDecoder.m contains the bulk of the code with the co-efficients defined near the top.
Without knowing any further detail, this is all I am able to help you with.
An IIR is an infinite impulse response filter. If you are monitoring 160 or so frequencies don't use IIRs. FFT will be more suitable for your purposes. Recording at 44.1KHz (CD quality) will allow you to record frequencies of up to a theoretical limit of half of this, so frequencies up to 22.05KHz. However, the closer you approach this limit, the more poorly represented the frequencies will be. You will need to choose an appropriate bin width to be able to discern each frequency accurately. For example, an FFT width of 1024 @ 44.1KHz will give approx 21.53Hz resolution: 22050 / 1024. This means that the FFT can yield information on your frequency range, in 21.53Hz steps. If you then consider your range of interest, 14KHz and above, then this yields the following: 22050 - 14000 = 8050Hz bandwidth; 8050 / 21.53 = 373.9. So you would be able to detect the amplitude and phase of about 373 frequencies between 14KHz and 22.05KHz using an FFT with a width of 1024. Frequencies that fall between these discrete steps of 21.53Hz will muddy your results and may appear to be two neighboring frequencies instead of the one clean frequency. You can increase the FFT width to give you more finer results but it does come at a computational cost. Modern smart phones are able to do an FFT at a width of 1024 in realtime. If you can, I suggest recording the signal at a higher sample rate to give you better signal accuracy first, then pick an FFT width with sufficient resolution for your needs. If the desired signals are pure enough, then the FFT should give you clear results that you can work with. Also my favourite windowing function is: Blackman-Harris, I find it gives the best main lobe to side lobe compromise but you may have to experiment here depending on the results you get. Good luck!