Forums > MaxMSP

logarithmic filter sweep?

October 11, 2010 | 6:38 pm

I’d like to tie an LFO to a reson~ for a slow, even filter sweep.
What do I need to do mathematically in order to smooth out the range of the sweep?
I would assume something logarithmic.
i.e. the difference between 200-300hz is perceptively much larger than from 7000-7100hz
I’m unfamiliar with the physics at work here.

October 11, 2010 | 6:55 pm

I am not sure I understand what you want to do.
Do you want the LFO to drive the filter cutoff?

The easy way to do it would be to take the output
of an oscil object, whose range is -1 to 1, and remap
that to your frequency range. Basically the cutoff
freq will go back and forth.

I am not sure why logarithmic anything has to be
brought in to things.

October 11, 2010 | 7:34 pm

Take a look at the [mtof~] object (note – that’s the msp version) – you’ll need to work in midi note values, but that shouldn’t be too hard – if you need exact frequency conversions you can use [ftom]….

That will give you a logarithmic sweep from a linear input..

@ Anthony Palomba – I think the idea here is to make the sweep sound more linear from the point of view of perception. As pitch / frequency perception is (very roughly) logarithmic it makes sense to do this. Otherwise, for a slow LFO over a wide range the sweep will appear to spend a lot more time in the high frequecny area than the low frequency area….

October 12, 2010 | 12:09 am

Exactly what Alex said.
I’ll give that a try. Thanks!

October 17, 2010 | 4:26 pm

Check out [lh.mtoaf] in this collection. Either that or [expr pow(2,$f1/12)] which does the conversion that you can then scale.


October 17, 2010 | 6:22 pm
– Pasted Max Patch, click to expand. –

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