First, I am by no mean a sound engineer (as you will guess later).

I was just wondering something while looking at the waveform of a .wav

for a given shape of waveform on a duration of 2 sec for example, how can we make sure that the frequencies fft gives are the only correct one? what if very little parts of a sinusoid could be considered instead of a full continuous sinusoidal movement that just varies in amplitude? or, what if a sinusoid had a lot of very fast varying amplitudes ?

that would lead to an infinity of solutions I guess..

  • $\begingroup$ The result of varying the frequency with time is a modulation which produces many frequencies or possibly a continuous range of frequencies if the pattern does not repeat. The FFT result is identical to that result you would get if you repeated the block of wavform used for infnity; such a repeating waveform will have a fundamental frequency at the inverse of the time duration of the block (1/2 Hz in your case) and integer harmonics including DC (0), some of which may have zero, but will not have any frequency components anywhere else. The result therefore depends very much on the time chosen. $\endgroup$ Sep 29, 2018 at 17:04
  • $\begingroup$ @DanBoschen Thanks Dan; but when we pronounce a sound even us don't reproduce the same pattern over time (like pronouncing the letter A will yield a ressembling pattern over time yet not an exact one). So fft is as precise as the sound source which is subject to a lot of interpretations depending on the context. Right? $\endgroup$
    – Kroma
    Sep 29, 2018 at 17:18
  • $\begingroup$ The process of taking the FFT is mathematically equivalent to repeating the function in time. The FFT will accurately represent the sound source at that time if it was exactly repeated over the time interval of the FFT; and to be clear it is not presenting the instantaneous frequency vs time (there is no time! It is in the frequency domain), but there are other constructs such as the STFT that show both time and frequency together. $\endgroup$ Sep 29, 2018 at 17:52
  • $\begingroup$ @DanBoschen thank you so much, I will look into it! BTW if you want to make it an answer, I would gladly accept it! $\endgroup$
    – Kroma
    Sep 29, 2018 at 18:17

1 Answer 1


The Discrete Fourier Transform, or DFT (the FFT is an algorithm that computes the DFT) of a length of finite duration (which any practical transform would need to be) is identical to the result of the transform of an infinitely long sequence formed by repeating the original sequence in time.

Knowing this provides the following insights related to your question:

First, anything that repeats (exact repetition) in time can only exist at discrete frequencies in the frequency domain. We see this with the Fourier Series Expansion specifically as shown in the graphic below.

The concept behind the Fourier Series Expansion is that any single valued continuous function can be represented as a sum of sinusoidal components and notably each component MUST have a frequency that is an integer of 1/T where T is the duration of the signal in time. Therefore IF those sinusoidal components were allowed to play out for all time (rather than being bound to the time interval [0,T]), the next cycle immediately after T would have to commence and proceed exactly as the waveform did at the start of the sequence (as each sinusoidal component would do the same). Thus it is often described that the Fourier Series Expansion decomposes any periodic function into a sum of sines and cosines (or equivalently and I believe mathematically simpler, complex exponentials).

Fourier Series Expansion

The mathematical model of the time limited signal from [0,N-1] (for N samples of the DFT, which is equivalent to the analog bound of [0,T] in time), to also be a signal extending to infinity repeating with time provides for further intuition into the behavior and result of the DFT. Specifically we see that repeating a signal in time results in discrete uniform spaced impulses in the frequency domain, that can only exist at integer multiples of 1/T (including 0) where T is the length of the base waveform in time.

The second characteristic of the DFT is that it is done on a waveform that is sampled in time. Without going into significant detail, sampling in time is associated with repetition in frequency (for those familiar with A/D and D/A conversion this will be readily apparent). So with the DFT we have both characteristics of repetition in time and sampling in time, which therefore means we will have "sampling" in frequency (discrete frequencies where only non-zero values can exist) and repetition in frequency.

The repetition is an implied construct that actually helps significantly to provide an intuitive understanding of many signal processing constructs- especially when considering both analog and digital domains. To be clear, the DFT involves only a fixed duration sequence both in the time and frequency domains, but mathematically these sequences can be repeated for infinite duration with the same result.


For example, to your question of what happens where there is a partial cycle? If we realize this equally represents a waveform repeating for all time, we see that in this case there would be an abrupt transition in the waveform.

repeating case 2 Such a waveform cannot be created or represented with a single sinusoidal tone. Going back to the Fourier Series Expansion, we know that it can be represented by multiple tones as long as they are spaced at integer multiples of the repetition rate. So where we thought one tone exists, similarly in the DFT there will be multiple tones as required to create such an abrupt transition. According to the DFT these frequencies really exist as what we are solving for in that process is the frequency components that are needed to create the time limited time domain waveform.

Below shows the case above (lower plot) compared to what we would get if there was a complete integer number of cycles over the time duration used (upper plot). This is one explanation of "Spectral Leakage" with the DFT but given as example insight into the relationship between the time duration of the DFT chosen and the frequencies that would result.

Signal Reconstruction

If the waveform was changing with time (either in frequency, or amplitude beyond the sinusoidal component itself, such as an envelope) this would require many frequency components to represent it. This is no different than a modulation view of the time domain waveform: to transmit signals over the air we modulate the amplitude or frequency of a carrier frequency (that is better suited to go over the air) which results in several frequencies being present around that carrier. If the waveform is not actually repeating with time (which is likely the case), then instead of discrete tones we will get a continuous band of frequencies around the carrier.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.