Forum

Int(Value) not spreadable

Hello VVVVorum,

I have to deal with a quite large number of values that should (at least displayed/changed) as integer. The only way I know so far is kalle’s Int(Value).

Nice, but when I need to put these values into a spread is there another way round as to spend each and every IOBox a Int-node? Because this node is not spreadable and I do not really understand what the trick of kalle’s module is. tried to tinker with it but without success.

does anyone know a way to limit input to integer for a large number of IOBoxes (ValueAdvanced)?

markus

I dont really get what you mean. but maybe Frac (Value) helps you out

Each pin has a so called subtype associated with it. You have probably noticed that values can only connect with ones of the same type. Like values with values, colors with colors etc. The subtype concept goes into more detail here: It determines whether a value should be edited as an integer or float, determines minimum and maximum values or whether a boolean value should toggle or bang when clicked. A similar logic exists for strings and colors as well. Usually this technique works quite invisibly when editing values, as the user interface magically uses the right metaphors when editing.
The advantage is that e.g. all value pin are compatible, so you can connect value pins of different subtypes at will - internally they are all just numbers, just the editing metaphor changes. Also you can input values which are out of range (as you have done when using floating point numbers to control something which is inherently integer, like a GetSlice). All vvvv´s nodes are designed to deal with out of range values.

The problem is the IOBox. For now the IOBox just takes over the subtype of one of the connected pins (I currently dont know if it is the subtype of the first or the last drawn connection). Kalles module basically connects the IOBox to an input pin which has the subtype set to integer, which in turn switches the IOBox to integer mode. There might be other ways of accomplishing the same.

Bare with us. We know for years that the IOBox needs to be redesigned in a way, that the subtype can be selected or defined by the user. While you can e.g. set the minimum and maximum values, you can unfortunately not set the integer property. But this is a somehow hairy issue with some details which needs to be designed in a right way. Hopefully we´ll find some time soon.

Hello oschatz,

thank you very much for your detailed answer!

I noticed the behavior of the nodes concerning the types. And I want to say that I understand that this issue is handled carefully as I appreciate to feel that vvvv is coded carefully in general.

testing ways to build a spreadable Int Node I must admit that it’s quite tricky to find an adequate work-around.

so I’m looking forward to the version that provides an even more functional IOBox Node. What about “IOBox (ValueVeryAdvanced)” ;)

markus

ps: @david: thx, u are right. Frac is the right way to limit the output but I need to limit the input (of a spread).