Output value if it is in between this range

Lorenzo Grilli's icon

Probably basic question, but I can't seem to find a solution.
I would like to create a dial that will output a specific value if it is between a certain range and then another value between another range. For example if my dial (0-127) is moving between the values 48-79, then it should output an integer of 5106. If it is between 0-15 then it should output 159 and so on. It is not proportional.
I tried overlapping some scale objects and using if conditionals, but nothing to my luck. There is for sure an object that will do the job, but I am only at the beginning of my Max adventure.

schlam's icon

[split] ?

Lorenzo Grilli's icon
Lorenzo Grilli's icon

If it is within the range than it should output one specific number only. In split I can't seem to keep one fix value in the output.

tyler mazaika's icon

You could either put a message box after the split with the value 5106 in it, or you could make an [if] box:

[if $i1>=48 && $i1<79 then 5106] (probably better to set 5106 to the variable $i2 argument in case you want to change it later).

Lorenzo Grilli's icon

Thank you so much Tyler, it worked with split and message box! Did not know that message would by triggered by any number:-)