Inverting Amplitude in pfft~
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. --Copy all of the following text. Then, in Max, select New From Clipboard.----------begin_max5_patcher---------- 521.3oc0W1rahCCDG+bxSgkO1khrcRLPu0mipppzDSqWErQDiJsUkm8ZOIvB 61ERvIP6ECdh+3+7yyLN48v.7i5UhRL5Fzcnff2CCB.SNCA08CvyRWkUjVBC CqDune723AUOxHVY.yWsdiooZkoT9lvYlxFRpMqVNSpJDFXUX+wndoYiUZs0 JSlWmKpDFtT9jJs.itud.xbXOs53ZV7t6qJcFLG7sKj1IT+j4olrmkpmdXgH yTsjISrBCQib5CYaSFfXjgDz8tY7QXnqYvOThDcRDgNthHz9iHy0EFcV5hN. Lri.lAGFQLePDm39opsqQjkNFskSWdDQ8.QQi5OB8q0HVBe3EJ2hbRTYB2Qh IIt1DZePkqVitldgfBM1CnvgBww8RnxzoFqerFQ8mKj+0s49TCYBDEjD2Sts T0Rul9kdcTiKgb3hI9TKAJkDO5KAErW3Bo5ueEFX0b12mdk5kKx13CaxmQjs RNWTZQWpQpU6NH6EpH51A8rLOWn1MnXlLetVpL0hfRRb2dRYQfzgSZny+4Pt aEarOhcLqqDqqnvwE69dzQEqu.jtGaN..OiZpQbh0tCUe0TTS0zY9rqQYpey zDskwSrQt7QNjNVmbx6fZGrFD5yaWTFeLT4XL7ZMb11NcgTIMPpmuC5FU2f1 N5YuWvBrpO2phjt+2ABkzDgdpry14ivOAnsnzdI -----------end_max5_patcher-----------
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.
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!
Forums > MaxMSP