4.63 - filtergraph input math problem using scale
hello again,
using filtergraph in peak/notch mode i have the following task, which i cannot seem to calculate right:
my input device puts out float values from 0. to 1.
i use a scale object to convert this to filter gain, like
scale 0. 1. -0.2 18.
that's fine, nevertheless the center value of my input device is approx. 0.5, and i would want and input of 0.5 to be converted to zero, any higher values ranging from 0 to 18, any lower from 0 down to -0.2.
i can't seem to be able to construct the expression to do this, could someone give me a hint, please?
i;m glad to also read up about the math behind that, seems i was missing in school, when this issue was on - URLs appreciated.
erm.
thank you very much in advance,
jrp
You could [split] the values and use two [scale]s for a linear response. Or have a look at the patch I've included which let's you set the scaling factors for above and below your centre value independantly. I almost send you another Max5 version, oops.
lh
yes, LH, thank you much, i had meanwhile gotten to use two scales instead.
looking at your expr-pow version i notice, that the single values lay out differently, though covering the same range as the scale version. that probably helps situations, where scale is acting nonmusical. i worked on a resonator the other day and found, that i need much finer resolution in lower frequency ranges. a fader with a 512 points total resolution targeting half a quarter tone (what is the english word for Achtelton, 1/4 of a semitone?) sounded good finally, with some kind of expr logics involved, which i admittedly only barely understood.
thanx again,
jrp
Thank you very much, Peter, for the detailed variant. For the moment i am content using two scales, as i can stick to standard objects, but i'll surely check out the litter standard pack thanx to your hints!
jrp