-
clamping a slider value but having two different effects for ‘above’ and ‘below’ the limits
I’ve not really used the clamp expression much so I may be starting on the wrong footing here but…
I have a slider (CLOUD_position_DRIVER) with values 0 to 100
when CLOUD_position_DRIVER < 0 I want CLOUD_position value = 0
and
when CLOUD_position_DRIVER > 100 I want CLOUD_position value = 100but obviously in between those two ranges (CLOUD_position_DRIVER between 0 and 100) I want the position to be a variable value.
So basically I want to clamp it so that below a certain value it reads a fixed first state, between the value a variable state and after a certain value a third fixed state (different to the first fixed state).
I’ve tried…
if (effect(“CLOUD_position_DRIVER”)(“Slider”)<0) {0} else {value};
if (effect(“CLOUD_position_DRIVER”)(“Slider”)>100) {100} else {value};but it’s not working, or rather the second statement is working but not the first! Which is why I was thinking that the clamp thing might be something I need? Maybe not?!
!
many thanks in advance
jim