pfft~ documentation // hop size explanation unclear

David Meyer's icon

It seems to me that the explanation of hop size in the pfft~ Reference under Overlap Factor is a bit unclear, or at least to me.

Under Overlap factor, it says :

The hop size (number of samples between each successive FFT window) of Fast Fourier transforms performed is equal to the size of the Fast Fourier transform divided by this overlap factor. (e.g. if the frame size is 512 and the overlap is set to 4 then the hop size is 128 samples).

Under fftsize right before that, it says:

Specifies the FFT size, in samples, of the overlapped windows which are transformed to and from the spectral domain by the FFT/IFFT. The window size must be a power of 2, and defaults to 512. (Note: The size of the spectral "frames" processed by the pfft~ object's subpatch will be half this size, as the 2nd half of the spectrum is a mirror of the first and thus redundant, unless the full-spectrum-flag is present.)

First, it says that the hop size is the fft size divided by the overlap factor, but then in parentheses, it says that the frame size is to be divided by the overlap factor. But the frame size is only half the fft size (as stated in the second quote).

Assuming, the fft size is 4096 samples, then the size of one spectral frame is 2048 samples. Overlap factor is 4. What would be the hop size? 1024 or 512?

I have always understood the hop size to refer to the FFT size, not the spectral frame size.