Troubles Analyzing Wave from Microphone

  • Thread starter Thread starter bogdan
  • Start date Start date
  • Tags Tags
    Wave
Click For Summary

Discussion Overview

The discussion revolves around the challenges of analyzing audio signals obtained from a microphone using the Fast Fourier Transform (FFT). Participants explore various aspects of signal processing, including the handling of stereo versus mono signals, the choice of sample sizes, and the application of window functions in FFT analysis.

Discussion Character

  • Technical explanation
  • Exploratory
  • Debate/contested

Main Points Raised

  • One participant describes difficulties in obtaining a spectrum from a microphone signal that matches results from professional software.
  • Another participant inquires whether the microphone is stereo, suggesting that stereo channels may need to be separated for proper analysis.
  • A participant mentions applying the FFT to a chunk of 1024 samples and discusses the need to create a periodic signal by duplicating samples.
  • There is a suggestion to use a window function to enhance the spectrum, although it is noted as optional.
  • One participant emphasizes the importance of using a power of 2 for the number of samples to facilitate FFT computation.
  • Another participant proposes testing the software with a known single frequency input to validate the FFT implementation.
  • Concerns are raised about potential coding errors that could lead to incorrect results during analysis.

Areas of Agreement / Disagreement

Participants express varying levels of understanding and approaches to the problem, with no consensus reached on the best method for analyzing the microphone signal. Disagreements exist regarding the effectiveness of different techniques and the interpretation of results.

Contextual Notes

Limitations include the potential mixing of stereo channels, the necessity of using a power of 2 for sample sizes, and the optional nature of window functions, which may affect the resulting spectrum.

bogdan
Messages
188
Reaction score
0
I tried to obtain the spectrum of a discrete signal and I had some problems...
If I compute on a PC the discrete Fourier transform (FFT or DFT) I obtain valid Fourier transforms (the same Excel computes...)...
...but how do I analyze a wave obtained using a microphone ? I don't get the same results professional programs do...I tried using as the "intensity" of a frequency the magnitude...I tried using the real component...the complex one...but still no good...
Can you help ?
 
Computer science news on Phys.org
so you have a signal recorded by the computer with a microphone and you want to make the FFT?
is the microphone stereo?
 
I obtained the FFT...but the spectrum doesn't look like the one obtained with a proffesiona program...
I applied the FFT algorithm to a chunk of 1024 samples...I found somewhere on the web that I shoul take a small chunk and duplicate it several time to obtain a periodic signal...and then compute the FFT...can you explain in detail how to process tha signal obtained with the microphone ? (it doesn't really matter if the signal is stereo...)
 
if the microphone it's stereo, the left and right channels are mixed in the file format. When I was studying voice compression in college all the microphones on the lab were mono. The teacher said that for stereo the chanels must be separated first...

can you explain in detail how to process tha signal obtained with the microphone ?

well I'm not an expert but here goes... take a number of samples that's a power of 2 (that makes the FFT easier to compute). Multiply that with a window signal (this is optional, but depending on which window signal you use it enhances the spectrum). Make the FFT...
 
Let's say...128 samples...multiplied by 8...gives 1024...apply FFT to this...and the spectrum consists in the magnitudes of the complex values of the FFT ?
 
well, basically yes
I'll try to find the link to a good DSP book if you want more info about FFT...
 
Okay...thx...
 
It is not clear to me what you mean by "does not look like". This is an easy thing to test, feed in a single frequency, you should see a single peak. Perhaps you could use Excell to generate a digital waveform of known content, then process the data with your program, It is very easy to make samll coding errors which give totally bogus results. A good habit is to test such software with a well know input.
 
Originally posted by Guybrush Threepwood
if the microphone it's stereo, the left and right channels are mixed in the file format. When I was studying voice compression in college all the microphones on the lab were mono. The teacher said that for stereo the chanels must be separated first...



well I'm not an expert but here goes... take a number of samples that's a power of 2 (that makes the FFT easier to compute). Multiply that with a window signal (this is optional, but depending on which window signal you use it enhances the spectrum). Make the FFT...

As I recall it is powers of 2 data points that make the FFT possible, so it is not nice but necessary.
 
  • #10
I tried that thing with Excel...and it's the same...but I didn't obtain the same spectrum sound analysis programs give...got it ?
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 27 ·
Replies
27
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 8 ·
Replies
8
Views
3K