Logarithmic scaling from input range
hi everyone,
I am in the middle of a math problem. I assume that could be resolved by applying logarithmic scaling, but that's beyond my max knowledge,
Let say you have an input range of data from -50 to 50 sent in osc from a horizontal slider (0 in the middle). I want to scale the output, in order to still have a range from -50 to 50, but with a scale of data more precise as you get closer to 0 (from either ways, negative, or positive)
thanks for the help!
eric
Hi
I'm AFK at the moment, but search here for "tweening" or "easing functions". Essentially all you need to do is scale your input to between 0.0 and 1.0, then apply your curve using a power, either > or < 1.0 then scale back up to your desired output range.
Brendan
and, here, for more comprehensive practical detail (from Gregory Taylor, mwah!)
This depicts it a little better:
(from that other thread, but look at Gregory's equations too)
thx brendan,
in the meantime i found this old topic
https://cycling74.com/forums/re-mapping-a-range-of-numbers-add-your-tricks-here/
..apparently, there's something i was looking for, the so called 'split range'
will dig that! thx!
thx again brendan, but i tried your two patches, but i can't get the average data correctly. I mean, for instance on a scale -50 to 50, if i have 0 in input, i must found back this on output. Only datas around the 0 are progressively scaled . ..and i don't get that with this patches,...
any suggestion?
Hi
Are you asking for linear input/output between -50 and -10 (for example), then greater resolution (a curve) between -10 and 0?
are you looking for something like this?
sorry for the hacky patch, you get the idea.
yes that was that! :)
thx a lot!