Making a slider output a non-linear (exponential) scale?
Hi all,
Would I go about creating this? The maximum value i want the flonum (number box) to be is 10000 and the smallest, 0. I've tried to do this with the scale object with limited success.
[Slider]
|
|
|
|
|
|
|
|
[Flonum] [Scale 127 1.]
| ___
| [Flonum]
| |
[expr $f1/$f2]
|
[Flonum]
I want the first increments to be very low, like 0.003 then 0.009 then as the slider is increased the difference between each increment gets larger until the difference between the last increments (ie. 126 and 127 on the slider) is around 300.
Also how do i copy my code and paste it here in text-form?
Cheers,
J.
Also how do I copy my code into text form so i can paste it here??
I think the split object could be your friend in this matter.
Select all, copy, then just paste here. Or: Edit/Copy compressed then paste here (if youre in Max5).
Zoe
Okay, so far ive got this:
PROBLEM: Numbers start too high, i want the numbers to be much smaller 0.003, 0.009 etc
and this:
PROBLEM: Not truly exponential. As you move the slider towards the high end the difference between the numbers gets smaller. I want the difference between the highest 2 values on the slider to be around 300.
The two problems are the other way round for each piece of code, sorry I ran out of time to edit the post.
Try something like that maybe (ive put nonsense values and stupid formulas, but you get the idea). Otherwise you could use the table object i guess.
Z
I think this is just about what I want:
Thanks for all of your help Zoe.
Try the patch below, you can set the curve you want using the float box on the right. If the value is 0 the output will always be 1000, if it is 1 the output will be linear.
lh