DFT: Difference between revisions

From Hydrogenaudio Knowledgebase
(New page: The '''discrete Fourier transform''' or '''DFT''' transforms a block of complex samples representing signal intensity from time 0 to time N to a block of samples representing frequency int...)
 
No edit summary
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''discrete Fourier transform''' or '''DFT''' transforms a block of complex samples representing signal intensity from time 0 to time N to a block of samples representing frequency intensity and phase from frequency 0 to frequency N/2. N is the window or block size. If you choose N large (e.g. as long as a whole track) you'll get detailed frequency information for the whole track but you won't have a clue where in the track those components exist. Using numerous shorter blocks, you can pinpoint where in time the various frequencies are occurring (e.g. when which notes are being played) but in using the shorter block you only get a coarse idea about what frequencies are present (e.g. can't distinguish C from C#).
The '''discrete Fourier transform''' or '''DFT''' transforms a block of complex samples representing signal intensity from time 0 to time N to a block of samples representing frequency intensity and phase, usually from 0Hz to Nyquist frequency. The discrete Fourier transform is for sampled data (i.e. digital audio). N is the window or block size. If you choose N large (e.g. as long as a whole track) you'll get detailed frequency information for the whole track but you won't have a clue where in the track those components exist. Using numerous shorter blocks, you can pinpoint where in time the various frequencies are occurring (e.g. when which notes are being played) but in using the shorter block you only get a coarse idea about what frequencies are present (e.g. can't distinguish C from C#).


To overcome this, frequency analysis applications will often use the longer blocks and instead of placing them one after another, the blocks will be overlapped. This sort of gives you the best of both worlds. It does require more processing to do the transform - if your overlap is 50%, you are computing FFTs for twice as many samples.
To overcome this, frequency analysis applications will often use the longer blocks and instead of placing them one after another, the blocks will be overlapped. This sort of gives you the best of both worlds. It does require more processing to do the transform - if your overlap is 50%, you are computing FFTs for twice as many samples.


When you edit audio on a workstation you create clicks or other artifacts at the edit points. We have this same problem when we edit audio to do FFTs. In editing, we address this by cross fading at the edit points. And that's exactly what we do with FFTs. We apply an envelope to the audio data in each block (fade it up at the beginning, fade it back down at the end) before performing the FFT. Mathemiticians call these envelopes "windows". There are many shapes of windows because there are many compromises to be made when you're slicing and dicing like this.
When you edit audio on a workstation you create clicks or other artifacts at the edit points. We have this same problem when we edit audio to do FFTs. In editing, we address this by cross fading at the edit points. And that's exactly what we do with FFTs. We apply an envelope to the audio data in each block (fade it up at the beginning, fade it back down at the end) before performing the FFT. Mathematicians call these envelopes "windows". There are many shapes of windows because there are many compromises to be made when you're slicing and dicing like this.


http://www.hydrogenaudio.org/forums/index.php?showtopic=79806
==See also==
* [[FFT]]
* [[Sliding DFT]]
* [[Constant-Q transform]]
 
==External links==
* {{ha|https://hydrogenaud.io/index.php/topic,79806.0.html|FFT Analysis for Dummies}}


[[Category:Technical]]
[[Category:Technical]]
[[Category:Signal Processing]]

Latest revision as of 11:48, 4 April 2022

The discrete Fourier transform or DFT transforms a block of complex samples representing signal intensity from time 0 to time N to a block of samples representing frequency intensity and phase, usually from 0Hz to Nyquist frequency. The discrete Fourier transform is for sampled data (i.e. digital audio). N is the window or block size. If you choose N large (e.g. as long as a whole track) you'll get detailed frequency information for the whole track but you won't have a clue where in the track those components exist. Using numerous shorter blocks, you can pinpoint where in time the various frequencies are occurring (e.g. when which notes are being played) but in using the shorter block you only get a coarse idea about what frequencies are present (e.g. can't distinguish C from C#).

To overcome this, frequency analysis applications will often use the longer blocks and instead of placing them one after another, the blocks will be overlapped. This sort of gives you the best of both worlds. It does require more processing to do the transform - if your overlap is 50%, you are computing FFTs for twice as many samples.

When you edit audio on a workstation you create clicks or other artifacts at the edit points. We have this same problem when we edit audio to do FFTs. In editing, we address this by cross fading at the edit points. And that's exactly what we do with FFTs. We apply an envelope to the audio data in each block (fade it up at the beginning, fade it back down at the end) before performing the FFT. Mathematicians call these envelopes "windows". There are many shapes of windows because there are many compromises to be made when you're slicing and dicing like this.

See also

External links