Inverse FFT/DFT


Part of something I’ve been working on with vvvv would very much benefit from the ability to perform the inverse fft; that is, given a frequency spectrum (as a spread, from FFT say) I’d like to reconstruct the sample.

I know no such node already exists, but based on the properties of the DFT/FFT it should be possible using SourceBuffer. Wikipedia shows that reordering the spectral data and passing it through the FFT again yields a spread which amounts to a scaled version of the original waveform (with some distortion of course!).

Trouble is, that assumes something about the form of the spectral data you have (i.e. it is a spread of complex numbers, which is not what FFT produces). Without any knowledge of how the FFT node works (and what exactly its output represents in terms of the DFT), I can’t tell whether such a task is possible or not =/

Any insights from Dev-types? :P


you already saw the problem coming: to calculate the original waveform from the spectrum, you would need the complex spectrum (real and imaginary part). the FFT node gives you the magnitude spectrum (i.e. the power for each frequency bin. note that this is not the same as the real part of the spectrum).

of course you could assume that the frequency bins of the magnitude spectrum is the real part and set the imaginary part to zero and then calculate the IFFT. problem is that the resulting waveform would probably look (and sound) different than the original and you’d get probably some other issues (like the parts of adjacent wavesegments would not be coherent).

in short: it’s not feasable with the FFT node :(

is ScopeSpread (DShow9) a choice?

ScopeSpread eh? Hadn’t noticed that (was also looking for something of that ilk for another project!)…

This will mean building an FFT patch… I’ll keep you posted! :D