This might be really easy but I just can’t find how to limit an input value with a IOBox(value advanced) node, in the inspektor I noticed there was a min an max value but still I could input values outside the min max range.
Did a search in the forum but didn’t find anything thoug
What I’m trying to do is a subpatch to handle my midi controller more easily and its nice to have let say the channel input restricted to a range of 0 to 15 as it is now (automatically) and I thought it would be great to restrict or limit other values too. I’m also using Kalle’s int() module to restrict the value to integers.
i think, what you are looking for is the “Slider Behaviour” Drop Down Field a little below the “Minimum” and “Maximum” fileds in the Inspector of the IO Box.
Set it to “Slider” and you won’t be able to go outside the specified min and max values.
If you enable the “Show Slider” setting, you will even get a slider inside the IO Box which shows the Position of the current Value relative to the bounds.
the map node ensures that the output will not exceed the range given in the destination minimum and maximum.
but you are talking about ioboxes and the user interface. the minimum and maximum setting on the iobox restrict the behaviour when scrolling through the values, but they do not affect values which are manually entered.
this is on purpose, as the min max values are just a suggestion for the user, not hard constraints. all vvvv nodes are supposed to deal with out-of-range values. for example the midi nodes will deal with channels > 15 by using just the lower four bits of it. so it might not even necessary to really restrict the users input.
i have to admit that is currently not possible to do what you want with the iobox, as its either configured as an input or as an output (in principle someone could start using setpatch to come across this). but in fact the iobox (although advanced) still misses a lot of features, and hopefully there will be a day when we manage to rework the whole subtype concept, which will allow you to do what you´re describing.
It’s actually not a big deal not having the iobox restricted to a range of values but I wanted to use that functionality if it was available, I’m using map to keep the iobox output between my desired range.
thanks for all your insightful information, I’m having so much fun with v4 already.