logarithmic filter sweep?

Oct 11, 2010 at 6:38pm

logarithmic filter sweep?

Hello.
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.
Thanks!

#52691
Oct 11, 2010 at 6:55pm

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.

#189420
Oct 11, 2010 at 7:34pm

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….

#189421
Oct 12, 2010 at 12:09am

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

#189422
Oct 17, 2010 at 4:26pm

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

lh

#189423
Oct 17, 2010 at 6:22pm
– Pasted Max Patch, click to expand. –
#189424

You must be logged in to reply to this topic.