Forums > MaxMSP

Inverting Amplitude in pfft~

July 2, 2011 | 10:55 pm

I’m attempting to invert the amplitudes across a full frequency spectrum, where high amplitudes become low and low amplitudes become high using this subpatcher inside [pfft~ fft_foo 512 2]. I’ve been studying tutorial 26 and *think* this should work, but what it does instead is exaggerate the amplitudes. Obviously, I’m doing something wrong. Any suggestions or help would be greatly appreciated. Thanks.

– Pasted Max Patch, click to expand. –

`



MIB
July 3, 2011 | 9:25 pm

by inverting the amplitudes do you mean amp of bin 1 becomes amp of bin 256, bin 2 to bin 255, etc?
in that case you will need to record all amplitudes of the entire frame then reassign them before output. that means (I think) you would have to have a delay of at least 1 frame for a system like this to work in "real time".

a start might be to look into poke~ and probably count~/index~ pair alongside with the third outlet of fftin~ and a buffer~…

again, I’m no expert. but it seems to me that in order to be able to invert anything, you first need the entire data set.


July 3, 2011 | 10:38 pm

Thanks MIB! Yeah, this all came from an attempt to make "blue" noise which rises by 3dB/octave. I was thinking that I could take "pink" noise and just invert its amplitudes since I couldn’t find a way to do a 3dB high-tilt filter. Then, I ran across the idea of just passing pink noise through a 6dB highpass and offsetting the difference with makeup gain. Seems to have worked. I would still like to try it with the fft approach, though, so I’ll keep plugging away at it. Thanks, again, for the tip!


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