select input bug

Steps causing the bug to occur

  1. create instance of Select Input
  2. attempt to use bool, real, int to control it
  3. doesn’t work

Have you found a workaround?

Yes. A math object needs to be added to offset any typical 0/1 result, so that it can then work with select input.

Other notes

  • Vuo version: 2.3.2
  • macOS version: macOS
  • How severely does this bug affect you? It’s annoying but I can work around it.

Programming generally counts 0. Mix functions work based on 0/1 values, ternary operators return 0/1…logic ops often return 0/1…indices start with 0, etc.

Having to add an extra node to accomplish basic function leads to the possibility of graphs that are much less efficient and require many more steps of computation overall in order to yield the desired result.

If it’s just for a select of 2 inputs, there are 2 nodes, Select Input (Boolean) and Select Input.

For those cases, why not use a bool selector then ?
And on Boolean selectors, cabling a real or integer into it will work (reals you can choose between 0 or >0,5).

For bigger lists (for example select 8 or lists), maybe it was the team’s decision to start the whole index system in Vuo at 1 rather ?
For those scenarios ok you need a math node.
I guess everything would then have to be changed for coherence then, otherwise lists starting at 1 but selectors at 0 wouldn’t play well.


 

I think my response to that, is just my original post over again :-)

It is great that the boolean exists, and it is expected that it would have a 0/1 interface. But I am re-noticing that all of these other integer type situations don’t have a zero available.

I think that not having the basic “starting point” available in all of these situations, removes the ability to cleanly use many typical programming patterns. When structure counts go from zero to 1, you often “do something”. 0/1 events can help deal with alpha and color fade transitions, texture mix. Values are often seeded at time 0, so you can easily kick off evaluation chains by using time to do the switch.

It is the fact that events, time, counts, etc, all start at 0, that in some situations just adding a -1 to offset actually creates problems in other edge cases, and then you’re clamping values to fix that. It can create a cascade of issues.

I see a response from years ago from Steve about this, which I stumbled on last night after posting this, which refreshed my memory about some of the thinking.

I am actually very receptive to the motivation behind this implementation choice of so many things starting at 1, but I think it is a solution for a non existent problem, that in turn actually creates many problems. While it may take a very new user a second to wrap their mind around representing 0…the very concept of 0/1, binary, is almost meme-level. Gregorian calendar starts at year 0, timers start at zero, countdowns go to zero. I give people credit to understand this. :-)

But I have to add now…as I am really seeing how integrated this decision is into vuo, I am maybe more flummoxed than when I posted. I am very sympathetic to the fact that changing this across a number of patches is a major change at this point in the road. I think it would not be the biggest deal in the world to just modify these patches to count zero, and if this is truly something that only I have an issue with, then I don’t want it to be a time drain. It may be an exercise best left to myself to deal with. It is unfortunate that the solution would be to replace these or to then have a different version of these nodes existing alongside.  

1 Like

@George_Toledo,

There are two families of select nodes for manipulating two streams of data: Select * (2) or Select * Boolean. As you can see from the attached, you can use integers, reals, and Booleans for input to Select * Boolean, making them ideal to use 0’s and 1’s to control data flow.

Select * (2) is similar to Select * (8) which has several options for multiple data streams.

Screen Shot 2021-10-20 at 1.47.27 PM.png

These nodes are operating as designed.

Zero is a commonly used index value in structs/lists, and even has representation as such in several of the frameworks that VUO leverages in just this way, yet it does not have representation in something like the vuo list.

It is great that a boolean exists, but it doesn’t really handle the issue.  

(deleted)