Pfft Analyzer for Equalizer

Maschu's icon

Hey everyone.

I'm trying to add an analyzer to my EQ module. The spectrograph doesn't look nice and I already use a JSUI to drawn my EQ curve. I think it would be easy to add a spectrum analzer to this jsui. If I knew how to do the pfft that is.

Does anyone have a working demo patch for this by any chance?

Cheers ;)

Roman Thilenius's icon

pfft more or less does everything you need without much patching inside.

on the input side it performs the STFT and provides amplitude, phase and index signals.

because inside a [pfft~] the vectorsize is always the FFT length, you dont even need the index but only the amplitude bins, which you can directly feed into a jit.catch~ (set to the known lenght, for example @framesize 512 when the FFT is "1024 1024") wrong

now you trigger the catch with a metro and write the signal blocks into a matrix. the rest is jitter. or GL. or eventually a list for multislider.

you might want to consider using atodb~ on the amplitude bin signal before going to the catch.

Maschu's icon

Thanks a lot roman. Do you by any chance have a patch to illustrate this ?

Maschu's icon

And how to I get the amplitude bins? :D

This is my setup...Can you show me a way to draw the analizer without the jsui?

Analyzer Question.maxpat
Max Patch


Analyzer.maxpat
Max Patch
Roman Thilenius's icon

the amplitude bins is (in your current patch) the left output of cartopol.
that signal could go into a jit.poke~.
then you would have a jit.matrix with the same name in the main patch, from which you can read the data and use it either directly as moving images, or get a list of numbers from there to do whatever you wish with it.

if i go more into details i will also produce more wrong advice and mislead you.
these are just my vague memories without max in front of me.

Holland Hopson's icon

Here's a simplified version that might do what you need.

fftAmplitudeToMatrix.maxpat
Max Patch
fft amplitude to matrix demo.maxpat
Max Patch

Maschu's icon

Thank you, Holland! I had finally figured out how to print to my js when I saw your solution :D I don't even need the Polocar object in my patch.

Only problem I still have: When signal comes from Live, my spectrum shows a steep rolloff in the highs. When inside m4l (like a noise object) everything looks dandy....

Cheers