I would like to bump this question. Documentation does hint at the presence of rfft() and irrft in this document: but attempts to use these functions results in 'rfft' undefined
I am also interested by this subject. Especially inverse Fourier transform to generate wavetables from a set of harmonic amplitudes (for a cpu friendly additive synth)...
Wouldn't a complex ifft make more sense for you when working on an additive synth? That way you could control amplitude and phase offset (relative to the fft bands) as polar coordinates, convert to Cartesian coordinates, and do the ifft.
That's an error in the documentation (probably left over from when JS was a standalone thing). For a real FFT, you can just populate the real elements of the FFT input and set the imaginary elements to zero.
--------------------- 07 Japan Red 328cic ...sport/cold/prem, convience, black trim... 11 Omni Blue Element ...work, ski, camp... 13 Valencia Orange x1 2.8 ...nav/Msport/sat, convenience...
Hello, back to the topic, as i use ffr and inverse fft intensively in my last synth... So optimization is the key to polyphony. In fact, it is possible to do TWO real valued fft with a single complex valued fft. It is not straightforward but it is possible. Here is a jsfx that helps to understand how it works. The sliders, generate two distinct inputs g(n) and h(n). They consist in cosine waves, with adjustable harmonic number, phase and amplitude. Both g(n) and h(n) are inter-weaved in f(n) just like Veto said. The fourier transform of f(n) gives F(k). G(k) and F(k) are extracted from F(k) (it is the "not straightforward" part). Code: