scaling control signal to modulate filter cuttoff frequency

DJF's icon

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?

Rodrigo's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

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

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

Floating Point's icon

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