spectral gating.
Hi,
I was wondering if someone could help me with this patch. I would like it so that the rslider corresponds with the spectrogram and acts as a visual aid for the user to be able to select parts of the frequency spectrum and hear them. Firstly, it needs scaling and I am struggling to find a way to do this and also the float values coming from the rslider need inverting because at the minute it is working in direct opposition with the configuration of the spectrogram.
Kind Regards
Sam
Main Patch - Master.maxpat
Sub Patch (pfft) = sjt.freq_gate.maxpat
one option would be to use the fft only for splitting the audio into three channels (or actually two: the range you want to compress and the rest) and then do the gating outside.
Hi,
That sounds like an option. How would you recommend isolating individual partials using the patch I have linked?
Cheers
not sure if this is where you want to go, but this uses a pfft patch from a bundled msp example patch--
also note how slider output is converted to a list of 1/0 to gate fft bins
Hi,
yeah this is very interesting! Could you explain what the
t b zlclear -expr list processing part
is doing?
Cheers
well the pfft object needs to have a list of 512 elements, each of which needs to be between 0 and 1, to provide a magnitude for each spectral bin. All the list is doing is providing either 0 or 1 (nothing in between) so the signal is either gated or not for a particular bin.
so the list processing part is just generating those 512 values so that if an element's position is between the two values output by the range slider a 1 is output, otherwise zero. just look up the help files for uzi, expr and zl if it's not clear. the t (trigger) object just ensures things happen in the correct order
but i don't really know if this is what you're after (the frequency mapping is linear)