## Complex pfft~ ??? Do I have to imagine the imaginary inlet?

Jul 19, 2010 at 12:59am

# Complex pfft~ ??? Do I have to imagine the imaginary inlet?

“full-spectrum-flag (0 or nonzero)

A non-zero fifth argument may be used to specify “full-spectrum mode”. In this mode, the pfft~ object will internally compute a complex FFT and process full DC to SR mirrored spectra (instead of simply eliminating the redundant half of the spectrum). This takes up extra computing power, but may be potentially useful in some of the more esoteric spectral processing applications.”

Fine, now I -am- on the more esoteric spectral processing side and use fft~ for a complex fourier transformation at the moment. Since it’s limited to frame sizes of up to 4096 I ask myself how would I use pfft~ instead? I see no second input for the imaginary part popping up when I set the spectral flag…?!

#51416
Jul 19, 2010 at 8:48am

AS far as I know pfft~ in full spectrum is still only calculating on real data, that’s why half the data is redundant (mirroring the data beneath the nyquist.

I don’t believe you can use pfft~ to calculate the FFT of a complex input….

It may well be possible to do what you want to do using jitter. JF Charles has some example patches of doing audio FFT processing using jitter – that may be your best way of avoiding issues with larger fft sizes….

Alex

#184367
Jul 19, 2010 at 10:40am

> I don’t believe you can use pfft~ to calculate the FFT of a complex input….

I don’t get it. The reference says pfft~ “will internally compute a complex FFT and process full DC to SR mirrored spectra”. Why -computing- the complex ft for real input if you can just mirror the real part and concatenate it as imaginary part? … Or is that “mirrored spectra” meant as a hint…?

> JF Charles has some example patches of doing audio FFT processing using jitter – that may be your best way of avoiding issues with larger fft sizes….

Thanks for the pointer to that. I hardly worked with Jitter so far. Are these patches capable of working in real time?

#184368
Jul 19, 2010 at 3:58pm

>Why -computing- the complex ft for real input if you can just mirror the real part and concatenate it as imaginary part?

Well that’s a full complex output fft of the real data – It’s just that it’s convenient to not bother with the mirrored bit. I think what you are discovering here is that full spectrum is essentially not a very useful mode to have available …..

> Are these patches capable of working in real time?

They run at real time although possibly from buffers – I don’t recall ever seeing a full input/output fft system in jitter but I may have done. I can’t remember how it all works exactly for timing accuracy and so on but I’d check them out and see where that gets you. I mostly work in C for FFT stuff now….

Alex

#184369
Jul 19, 2010 at 4:14pm

>I think what you are discovering here is that full spectrum is essentially not a very useful mode to have available …..

Well, not as long as you cannot feed complex signals to a complex ft. I’d love to make it work with pfft~ but realize my need is not very popular since complex fts are only useful in exotic applications.

> I mostly work in C for FFT stuff now….

You’re probably on the right track with that. In the long term I’m going to join you. Apple’s vDSP library offers some very good stuff.

#184370
Jul 19, 2010 at 9:52pm

Hi there, thanks for the mention of the patches. They are available on the cycling74 site (-> Community -> Share pages). Some of the patches are to be used in real time (see the “freeze” patches), and some recreate a phase vocoder, so are less “real time”, in a way.
If you’re really interested in the full spectrum mode of pfft~, I recommend the tutorial on the Phase Vocoder by Richard Dudas and Cort Lippe, it’s there: http://cycling74.com/2006/11/02/the-phase-vocoder-–-part-i/ and part II there: http://cycling74.com/2007/07/02/the-phase-vocoder-part-ii/
You can do pretty “esoteric” sound processing without this mode, but with it, you can get pretty esoteric -patches-!

#184371

You must be logged in to reply to this topic.