Could some DSP guru please help me a bit ? I am creating a FFT based application that uses an audio input. The sampling details are as follows: encoding : PCM sampling frequency : 16000 Hz resolution : 16 bits channel : mono signed : true endianness : little (as this runs on an Intel processor) The raw bytes get collected in a byte array, and I take two bytes at a time (resolution is 16 bits) and correct for wrap-around in the first byte and get the corresponding floating point number which is the sampled value. The buffer is 2048 bytes long. When I examine the raw numbers, I find a long sub-sequence of 0s at the start, before I start seeing the sinusoidal pattern in the sampled numbers. I use a time shifted Gaussian window to filter the data before I compute the FFT. When I examine the array containing the FFT magnitudes, I find some extra peaks at the end of the array, i.e., the spectrum does not look symmetric as it should. I am not sure where the extra peaks are coming from. I am fairly confident that my FFT routine is working, as I have tested it out with hand-generated sample data, and the output spectrum has a very symmetric structure in the peaks. Any hints, suggestions would be immensely helpful. Thanks in advance for your help.
Audio FFT problem - PLEASE HELP
Started by ●April 20, 2008
Reply by ●April 21, 20082008-04-21
On Apr 20, 7:03 pm, "cpptutor2...@yahoo.com" <cpptutor2...@yahoo.com> wrote:> Could some DSP guru please help me a bit ? I am creating a FFT based > application that uses an audio input. The sampling details are as > follows: > encoding : PCM > sampling frequency : 16000 Hz > resolution : 16 bits > channel : mono > signed : true > endianness : little (as this runs on an Intel processor) > > The raw bytes get collected in a byte array, and I take two bytes at a > time (resolution is 16 bits) and correct for wrap-around in the first > byte and get the corresponding floating point number which is the > sampled value. The buffer is 2048 bytes long. > > When I examine the raw numbers, I find a long sub-sequence of 0s at > the start, before I start seeing the sinusoidal pattern in the sampled > numbers.What is the period of this sinusoidal pattern? Can you plot it out? Does it have a DC offset?> I use a time shifted Gaussian window to filter the data before I > compute the FFT. When I examine the array containing the FFT > magnitudes, I find some extra peaks at the end of the array, i.e., the > spectrum does not look symmetric as it should.What symmetry are you expecting? Complex conjugate or magnitude?> > I am not sure where the extra peaks are coming from.Where are these extra peaks and how do you know that they are extra? If they are around the 0th bin, then your signal might have a significant DC offset.> I am fairly > confident that my FFT routine is working, as I have tested it out with > hand-generated sample data, and the output spectrum has a very > symmetric structure in the peaks. > Any hints, suggestions would be immensely helpful. Thanks in advance > for your help.