0

I am trying to learn about Fourier transforms and using MATLABs FFT function I can transform a recording of me saying '1 2 3' into the frequency domain. As I understand it the resulting file contains a set of complex numbers which hold the magnitude and phase of the frequencies in my original signal.

I can then perform an inverse Fourier transform (using MATLABs iFFT function) on these complex numbers and I see (and hear) that my original signal is almost perfectly rebuilt. This is the bit I don't get. If I said '3' in a high pitched voice the FFT should (and does) show that energy was present at this frequency, but how can it reconstruct it in time? I.e. since all that's returned from the FFT is a set of magnitudes and phases where is the information to say when these frequencies occurred in the time domain signal? Is MATLAB doing some windowing that I don't know about?

Any help would be much appreciated.

Cheers, Colin

thecolin
  • 21
  • 4
  • 4
    This question appears to be off-topic because it is about DSP theory rather than programming - it belongs on http://dsp.stackexchange.com – Paul R Dec 09 '13 at 22:59

2 Answers2

1

No windowing is involved. The FFT chooses appropriate amplitudes and phases for the sinusoids, so that that the sum of all sinusoids gives the time variation of your signal.

See for example here. In the upper part you have a square pulse, which is clearly very localized in time. By including more and more sinusoids it is seen that the pulse shape is approximated with increasing accuracy (except at discontinuities, but that's another story).

Luis Mendo
  • 110,752
  • 13
  • 76
  • 147
  • This answers your question well, and you (thecolin) are almost answering your own question. The key word here is reconstruct, meaning putting the signal back together to the best of its ability using nothing but the series of complex exponentials - a "compressed"/different way of describing the information. The reproduced signal can never be identical but its close enough for your ears not to hear any difference. Here's another animation which I believe is illustrative. http://en.wikipedia.org/wiki/File:Fourier_transform_time_and_frequency_domains_(small).gif – Fredrik Dec 09 '13 at 23:26
0

If you just take a single FFT of your entire sound sample (which is not what you would normally do, BTW - typically you would use a sequence of overlapping STFTs to capture time-varying spectral content), then the entire sample is treated as if it were a periodic waveform. Any apparent time-varying content is merely the result of the way that the amplitudes and phases of the many components combine to reconstruct the original signal.

Paul R
  • 208,748
  • 37
  • 389
  • 560