I am trying to write software that will perform the discrete fourier transform of real time data coming from the microphone into the sound card on a computer. I am using Java with the javax.sound APIs.
I am capturing 250 ms of data each time. That means, as the sampling rate is 44100, I am buffering 11025 of 16-bit shorts and performing the DFT on this data in each iteration.
My DFT code correlates this window of data with sine and cosine waves from 19 Hz up to 198 Hz in steps of 1, so as this window is 250 ms of data , this means it is actually correlating the incoming audio with frequencies from 76 Hz up to 792Hz in steps of 4.
If I now wish to take a smaller window of data each time of 125ms instead of 250ms in order to speed things up. If i correlate this data with sine and cosine waves of incrementing frequencies by 1 like before, this means that it is actually correlating the incoming audio with waves in steps of 8Hz. This is not good for my problem as I want to be able to look for frequency differences in the signal of less than 8Hz.
My question is, is this the normal trade-off, speed versus frequency resolution , or is there some way around this ?
Many thanks in advance. I am new to audio processing so forgive me if i'm missing out on some common sense :)