pfft timing

Jan 25, 2010 at 12:12am

pfft timing

Hello,

I find pfft to be a bit of a mystery in terms of the timing of the frequency domain in each successive frame.

For example suppose I have an fft size of 1024 with an overlap of 2, the fftin~ object will give 512 real and imaginary numbers (at the audio rate I presume?) which corresponds to 1024 samples of time domain audio half of which will be overlapped with the subsequent frame.

My question concerns what happens with the timing of the subsequent frame. My guess is that after the 512 real and imaginary vales of the previous frame have been output by fttin~ the next 512 value pairs follow corresponding to another 1024 samples of audio but now 512 samples later in ‘audio time’ if that makes sense.

This would fit in with my tendency to view the workings of my inner pfft subpatch as operating as one instance, so for example if I was writing fft data to a buffer I wouldn’t have data from two frames being written simultaneously, would I?

Now, what happens when the overlap is 4? Surely in order to keep up either values from fftin~ are output faster than the audio rate or multiple instances of the subpatch are running concurrently (or I’m very confused!).

I would love for someone to shed light on this for me.

#47975
Jan 25, 2010 at 12:28am

I just tried capturing the fft bin index from outside the patch (in the time domain output with an fftout~ object with nofft arugment) and got bin values cycling between 256 and 766, this was with overlap 4 and fft size 1024.

Not sure what that means.

#172500
Jan 29, 2010 at 10:14pm

bump!

#172501
Jan 30, 2010 at 11:22pm

Hi,
Inside a pfft~, there is a special audio net calculation. With an overlap of 2, you are right, the data “travels at audio rate”. The signal connections inside the pfft~ support the same data speed at the sampling rate outside of the pfft~.
And you’re right, if overlap is 4, fftin~ has to output twice the amount of data. So, the “inner” data travel rate on a signal connection inside a ppft~ is now double the sampling rate specified in the Max options.

No several instances of the inner patch run concurrently, and no two frames are written simultaneously. With FFT size 1024 & overlap 2, fftin~’s leftmost outlets gives the whole real 512 bin values, then the 512 values of the next step (the one that’s half overlapping), etc.

Best,
Jean-François.

#172502
Jan 31, 2010 at 1:36am

Thank you!

#172503

You must be logged in to reply to this topic.