# Can an entire signal with transients be reconstructed from an inverse Fourier transform?

If we have a long signal (say some music) that contains a lot of transients at different frequencies (i.e. the relative "volume" of each different frequency changes over time) and we take a Fourier transform of that signal (the whole thing in one transform,) will the inverse Fourier transform give us the exact original signal back? If so, how?

I understand that the Fourier transform produces a "plot" with one axis the frequency and on the y axis a complex amplitude that is phase + magnitude, but this phase+magnitude information would be a kind of average of the entire signal (for each frequency.) How would it be possible to get back information about how the volume of each frequency changes as the signal/music progresses?

Assume we are talking about the Fourier transform of the whole signal and not a bunch of different windows.

• If you only have magnitude then that is not a Fourier transform but a power spectrum. The Fourier transform is invertible but power spectrum is not. You need the complex value to figure out where transients happen in time and so it's not invertible if you don't have phase. Oct 28, 2023 at 13:54
• Sorry, I meant if you also have phase. So for each frequency you know it's magnitude and phase. But these are properties that might change over time in the original signal. Oct 28, 2023 at 14:00
• The Fourier transform is integral from - to + infinity, so as long as your signal is shorter than infinity, the "change" is within the integral and thus encoded in the magnitude/phase. For transfinite signals the integral diverges and you don't get a transform. Oct 28, 2023 at 14:39
• Trivially yes. But keep in mind what you're proposing. For a sampled windowed input (as digital audio), the output will be the DFT, with as many bins as there were samples in the input, and complex-valued. Is this what you were asking, or were you thinking of other formats? Oct 28, 2023 at 17:40
• @TimWilliams "and complex valued" yes but with pairs of complex conjugate points (e.g. positive and negative frequencies) so overall the exact same number of bits (no doubling due to being complex) Oct 28, 2023 at 23:09

First, mathematically, the Fourier transform contains just as much information as the original time-domain signal. Since each step of the transform is both linear and reversible, it is possible to re-generate the time-domain signal from the frequency-domain data.

If you really want to get an intuitive feel for how all this works, I would recommend getting familiar with software that is designed to handle and plot large amounts of data. Free examples would include numpy and GNU octave; there's also commercial software like MathCAD and MATLAB. There are also websites that allow you to play around with this kind of data. Learn how to create time-domain signals and plot them along with their Fourier transforms.

Try working with signals that consist of a single pulse placed in different positions in the time window. Observe what happens in the frequency domain — especially the phase information — as the time position varies. Note that when you do the inverse transform, you do indeed get the pulse back in the correct position.

A second key concept is how amplitude modulation of a tone results in sidebands in the frequency domain. A musical note is basically a tone that is amplitude modulated (multiplied) by a pulse of some shape. Try forward and inverse transforms of notes of various shapes and positions. A key fact about the Fourier transform is that multiplication in the time domain becomes convolution in the frequency domain, and vice-versa. Note how the transform of the pulse becomes convolved with the transform of the tone.

Finally, a piece of music is a collection of notes. Since the Fourier transform is linear, the transform of the sum of the notes (i.e., the transform of the entire piece) is simply the sum of the transforms of the individual notes. It's all there — just not in an easily-recognizable form!

• When I do plots in python of phase, frequencies and amplitudes for a signal with 1000 data points all at zero except a single "spike" with 1 in the data, I get a phase plot that slopes downwards (more negative phase) as frequency gets higher. And the amplitude plot shows "1" for all frequencies. If I put the spike later in the data then it slopes downwards more aggressively (bigger negative radians). Does this mean it is adding more frequencies, but changing the phase of each freq so that they line up at the same point, but otherwise cancel each other out at any other point? Oct 28, 2023 at 22:14
• Exactly. A fixed time shift represents greater phase angles for higher frequencies. The "spike" appears where all of the sine wave peaks line up. At all other sample points, they cancel out. Oct 28, 2023 at 22:22
• And then if this is applied to a signal where it contains transients that are just decaying sine waves then that creates "side band" frequencies which are just the same effect? Although I don't understand why it needs to be high numbers of radians in the phase plot (like -500 etc) because surely it would loop back after negative Pi or whatever, so they could be much smaller numbers of rads for the same effect? Oct 28, 2023 at 22:39
• @thepman You probably have the units in the phase plot wrong somehow. Oct 29, 2023 at 3:52

The Fourier transform is an orthogonal transform. If the function is transformable (many functions, particularly continuous ones, and quite a number of non-functions are), the transform preserves all information.

If the original function contains lots of transients with piecewise different frequencies, you can use shift and windowing theorems to calculate the transform and invert it. In particular, you can use the convolution theorem for convolving the whole function with some impulse response.

What the transients affect, however, is the interpretability of the frequency domain. The more transients are involved and the shorter the steady parts of the original function are, the more opaque the transform data becomes. That is the main reason that signal processing applications work with windowed overlapping short-time Fourier transforms: not because they would contain more data, but because the data becomes a lot more interpretable again.

In particular, for a spectrum analyzer you don't want to transform too long segments exactly because most real signals change characteristics over time. When they don't, like when analyzing static noise, you get improved results with arbitrary long transform times.

Also, if you work with piecewise changing and/or adaptive convolution kernels, the transitions can be better managed with short-time transforms.

Can an entire signal with transients be reconstructed from an inverse Fourier transform?

In theory, if you have a "well behaved" signal (see below) and you know the Fourier transform exactly, you will be able to reconstruct the original signal. Unfortunately, even slight deviations from the exact Fourier transform will result in significant deviations in the reconstructed signal, if the signal is complex, like a piece of music. So in practice, reconstructed music is not likely to be very faithful.

In practice, real signals are well behaved, but if we leave this fact aside, and consider all mathematical functions, we find that there are an infinite number of (discontinuous) functions that all have the same Fourier transform. I will give an example.

$$f(0) =1$$ $$f(x\ne0)=0$$

and

$$g(x)=0$$

Both of these functions have the same Fourier transform, i.e.

$$F(\omega)=0 +0j$$

It should be obvious that are an infinite number of such functions with the same Fourier transform. The same is true for any function.

• if the signal is complex, like a piece of music I suggest to use another word instead of complex, due to its important existing meaning in the context of Fourier transformation. Music signals are not complex in that sense. Oct 30, 2023 at 16:51

Sadly, no. Fourrier transform takes the assumption that a signal is periodic over time. Music wpuld most likely result in a white noise source if repeated long enough.

• The Fourier series assumes a periodic signal. The Fourier transform does not assume perodicity, and in fact won't typically converge if the series is periodic. Oct 28, 2023 at 14:25
• For the transform of an entire piece of music, the periodicity is the length of the piece. In other words, the inverse transform would result in the piece being played repeatedly. Oct 28, 2023 at 14:25
• @DaveTweed It's also theoretically possible to take the Fourier transform of a signal consisting of a song which is both preceded and followed by an infinite amount of silence. I don't know if there's any reasonable way to do that on a computer, though. Oct 28, 2023 at 16:30
• @TannerSwett: Such a transform would also be an infinite amount of data. But we can describe it: It would be the transform of the piece played repeatedly convolved with a the transform of a rectangular masking pulse that's as long as the piece. Oct 28, 2023 at 17:04