scaling control signal to modulate filter cuttoff frequency

Apr 29, 2012 at 2:22pm

scaling control signal to modulate filter cuttoff frequency

I am trying to scale a -1 to 1 control signal to modulate a filters cutoff frequency. I am trying to do this using the bickered filter – which ranges from 0.0001 to 22000 on a logarithmic scale. The way I have started to do this is by scaling the control signal to output values between 0 127, and then routed this to a dial. Because the filter is logarithmic, I can’t really scaled [0 127 0.0001 22000.] because it produces a weird effect when changing values. Could somebody help me?

#63281
Apr 29, 2012 at 3:00pm

Why scale it down to 0-127? You’re throwing a way a toooon of resolution by doing that. (unless you’re talking about 0. to 127., but that’s weird too).

In terms of the actual scaling/remapping/log stuff, I find this patch infinitely useful:

– Pasted Max Patch, click to expand. –
#228295
Apr 29, 2012 at 5:27pm

Without seeing your patch I’m not sure that this addresses your issue:

– Pasted Max Patch, click to expand. –
#228296
Apr 30, 2012 at 12:45am

if you want to log map the range 0.0001 to 22000, you need to work it out as ratios, which would be 1:1 to 1:220000000.
to divide that into 127 equal geometric parts, you get the 127th root of 220000000, which happens to be 1.163290977….
this is your base
then you simply have [expr pow(1.163290977,$f1)], but divide the result by 10000 to rescale from 1-220000000 to 0.0001 to 22000
that is how to map 0-127 to that range logarithmically

#228297

You must be logged in to reply to this topic.