ok im basically hopeless at maths and scripting.
i was wondering.. im using parameter wiring. ive got a few parameters already wired to a slider.. these are nice simple multiples of the slider values so all easy, but the last one is an object which needs to move on x a specific amount over the range of the slider..
i want (for example) when value 1 is 10, value 2 is 1.75 ( 0.175 x 10) when value 1 is 20, value 2 is 1.97 (0.0985 x 20)
obviously its a non-linear relationship. so how would one write an expression for something like that, and work out the values to plug in?
Well, typically, inspiration struck at 1 am while trying to get to sleep
Have to write it down before if forget… Maybe I’ll sleep then!
So, in my example I need value1 to start from zero, so I do value1 - 10
That gives value1 a range of 0 - 10
Value2, i subtract the low value, 1.75, from the high value, 1.97 to get the offset - 0.22
Since 0.22/10 is 0.022, that’s my multiplier
I then just need to add the starting Value2 back to the result
So..
Value1 -10 * 0.022 + 1.75 = value2
I think that works?
Next issue will be correct notation/syntax for the expression, and how to deal with value 2 being negative (its a position)
Maybe someone can chip in?