shifting fft bins around in a display?

Feb 4, 2012 at 8:12am

shifting fft bins around in a display?

hey, I’ve always had a bit of a gap in my msp knowledge regarding fft, and now I’ve stumped myself.

I’m doing an fft into jit.poke~ , but I’d like to display the frequencies logarithmically, if that makes sense?

I’m thinking it could be done with a warping jit.expr, but I’d like to limit the loss in resolution as much as possible – is it possible to apply this transformation before jit.poke~?

Here’s what I’m testing on. Cheers for any pointers, gang.
Andreas

– Pasted Max Patch, click to expand. –
#61612
Feb 4, 2012 at 7:59pm

you need an exponential spatial Y map for jit.repos (that will give you log. repositions) @interpbits 8 for instance (to smooth out the pixelation that occurs in lower register). here you go:

ps: there is IMO a better way to do what you are doing (rolling spectrogram). I’ll find a patch for you…

so here is the log. version of spectr. (*press the bang button):

– Pasted Max Patch, click to expand. –
#222392
Feb 4, 2012 at 8:09pm

i found it, it’s an Andrew Benson’s patch. he is writting constantly in only one column and then he moves the matrix with convolution/kernel matrix. If you’ll have any problems understanding the role of kernel matrix let me know…

Now in order to make a logarithmic version of the display (FFT itself can never be logarithmic, by that I mean the gaps between freq. bins, so it makes sense only to remap the display), change the width (X) of the spatial map I gave you in previous patch from 160 to 1 (change uzi in sub sub patch from 160 to 1 and matrix dim. in subpatch to 1×256 or whatever the FFT size)

– Pasted Max Patch, click to expand. –
#222393
Feb 4, 2012 at 9:33pm

>i found it, it’s an Andrew Benson’s patch. he is writting constantly in only one column and then he moves the matrix with convolution/kernel matrix. If you’ll have any problems understanding the role of kernel matrix let me know…

nah, this is alright; I’m doing the same thing, only with jit.rota and feedback.

re:fft: yeah, I thought as much – oversample, then pick out the bins so that they’ll line up in a more linear fashion.

Now the matrix->mesh bits in this are pretty cool, though. Thanks for digging this out!

#222394

You must be logged in to reply to this topic.