Forums > MaxMSP

spectroscope frequency axis in logarithmic mode

August 13, 2010 | 12:19 pm

Hi all,

In order to make an EQ GUI that perfectly fits spectroscope~ graphical output, I’d like to know if someone knows its actual scaling of the frequency axis in logarithmic mode: as a matter-of-fact, it seems to be not an exact logarithmic scale, as there is some kind of warping in the low frequencies. For instance, when the frequency bounds are set to [10Hz 22050Hz], then the width between the leftmost vertical (corresponding to 10Hz then) and the line corresponding to 100Hz is way wider than the width between 100Hz and 1000Hz, or between 1000Hz and 10000Hz.
The ideal would be to have the actual formula used in spectroscope~ object, but it’s up to Cycling74′ team.

Thanks,

alexis


August 13, 2010 | 6:15 pm

I’d say more

Once I tried to build an interface with a semi-transparent filtergraph~ on top of a spectroscope~, and it didn’t work because the scaling was different.

I’d love to have all those things match – if this had worked it would have built a very nice thing…

aa


August 16, 2010 | 12:21 pm

Hi all,

Actually I did some reverse engineering on spectroscope~ and found the actual scaling: for some reason, the frequency is linearly scaled with an arbitrary sr/20000 lower limit before being converted to logarithm. Then the frequency axis is not logarithmic any more with respect to frequency. Here is a simple patch that shows that, for those who may be interested:

– Pasted Max Patch, click to expand. –

As Andrea mentionned, it’s a pity that’s it’s not compatible with filtergraph~, and this non-logarithmic scaling doesn’t make any real sense. It would be neat if this was enhanced for future versions.

While I’m at it, I have two other feature requests for spectroscope:

. It would be great if the window size for computing the fft could be changed, currently it’s being computed with a 1024-bin length. Then we could choose between a better frequency resolution or better time resolution

. the GUI is kind of CPU-greedy, especially when the object is big. For instance, on the example provided above, it takes almost 10% of the CPU of my MBP.

alexis


Viewing 3 posts - 1 through 3 (of 3 total)