views:

155

answers:

4

If we get the sound from microphone with two channels, to calculate the frequency spectrum we:

  • calculate the fast fourier transform of all the data input?
  • calculate the fast fourier transform of each left and right channel and then make a average of both?
  • calculate the fast fourier transform of each left and right channel and get the biggest values of both?
  • calculate in a different way?
+3  A: 

I assume your two-channel microphone has inputs that are physically separate - typically, opposite sides of a lecture hall or theater. In this case, the Fourier transform of each channel shows you the frequency content at the physical location of that channel's input - you can't just average them or add them together and get any meaningful result.

If you're trying to get the spectrum at the midpoint between the channel inputs, averaging might make sense, but anything else would require some big assumptions (reflection not a factor, etc) and interpolation.

Any meaningful analysis of this data is going to have to take into account the physical geometry of the space where the sound is sampled. Clarify what you're looking for.

Oh, and tag your posts as homework.

David Lively
+2  A: 

FFT is a linear transform. Thus, getting FFT of averaged left-right input is completely equivalent to getting average of two FFTs, for left and right channel respectively.

But usually it makes sense to keep them separate - or use only one of the channels.

yk4ever
+2  A: 

Without knowing just what your setup is, and the purpose of this processing, we can only guess at a good answer. I'll assume you mean that you have two microphones in different locations.

If you add the two channels first, or if you Fourier transform each and then add, you'll get bad results. The reason is interference - at some frequencies the source will be an integer number of wavelengths from one microphone but an integer and a half from the other. This is a common beginner's problem in audio recording.

Perhaps what you want to it measure the signal of a source heard by both microphones, while ignoring random noise and extraneous sources local to each microphone. In that case, do a Fourier on each channel, compute the power (the squared magnitude) at each frequency, take the logarithm of that, and then average the two channels. This avoid problems with interference, and statistically reduces the random noise (though not a whole lot).

DarenW
+1  A: 

To combined these two FT's you must know the difference in their TOA(time of arrival) and account for it first. Look up beam forming. It would help if we had some idea of the application. As has been said above, sure you can average the two and get some idea of the frequency spectrum across an area, but to what end? More details please as to the purpose, then we can tell you weather or not what you're proposing is a decent fit.

kramthegram