I don’t know if this has always been the case (I don’t think it is), but all the objects (that I have tested with) that have @fftsettings
show this as part of the suggested text when autocompleting:
It’s been the case for a while: just a buglet in the XML documentation
Hello,
I’m not sure if I’m in the right place, but I have the following question:
I’m wondering about my interpretation of the documentation related to fuild.bufmelbands~ which says the following.
@fftsettings [3 ints] (default: [[‘winSize’, 1024], [‘hopSize’, -1], [‘fftSize’, -1]])
FFT Settings
WinSize 1024: that’s self explanatory, the windows size in 1024 samples?
hopSize -1: minus one means the same size of the window (1024)? So, hopsize 2 would be 512 samples?
fftSize -1: Again I assume -1 corresponds to the same size of winsize (1024)?
But, is winsize the size of the envelope window? And fftsize is the size of the analyzed slice?
What’s the inter-relation of these 3 parameters?
The -1 value goes across other externals and parameters, is the meaning always the same?
Thank you,
Diogo
Hi @dcocharro
Thanks for posting. -1
has a generalised meaning of ‘default’ for a number of attributes, but unfortunately doesn’t always mean exactly the same thing.
In the case of the FFT settings:
-
-1
for the hop size means window size / 2 (i.e. 512 sample hop for a 1024 sample window) -
-1
for the FFT size means = nearest power of 2 >= window size. (i.e. 1024 for a 1024 sample window, but also 1024 for a 1000 sample window)
Yes, the window size is the size of the envelope that is applied, but also of the slice of material that is analysed. In some circumstances you might want to make the FFT size bigger because this can be a way of improving the quality of analysis without introducing the extra latency that increasing the window size would bring. Using a larger FFT than your analysis window essentially gets you pretty good interpolation in the spectral domain.
The other main case where you’ll encounter -1
is when specifying ranges (such as with the number of frames or channels of a buffer~
to process. In this context -1
= everything (- any offset). So, in bufmelbands~, if you have (say) a 44100 sample source buffer, and have set startframe
to 4100 and numframes
to -1, that means you’ll analyze 40000 samples of the buffer~.
@weefuzzy Thank You!
I wasn’t able to find that information in the documentation. Excellent clarification!