Now, with a vvvv box( = string ) I can compare 2 strings perfectly but when I compare the OSC string output, the vvvv box ( = string ) doesn´t work and the output still 0.
The next question is what is the correct way to make in vvvv the equivalent of this code :
switch (OSC_color_string){
case “red”:
output_int_to_drive_switch = 0;
break;
case “orange”:
output_int_to_drive_switch = 1;
break;
case “yellow”:
output_int_to_drive_switch = 2;
break;
… etc …
}
Or exactly when I have red on the OSC output string, I get the 0 integer result and :
red -> 0
orange -> 1
yellow -> 2
green -> 3
sky -> 4
blue -> 5
pink ->6
grey -> 7
white -> 8
as joreg said, you should definitely use the OSC nodes.
and for the fun of your switch problem, here is a patch parsing your example string and switching the numbers.
but considering your problem, why don’t you send the hex value directly and put it into the AsColor node?
the = node needs the exact same string, if there is one character different it returns 0. so make sure you send the string without any space or other invisible characters. here is your patch using the OSC nodes:
It works. Finally the problem was my OSC controller, it was sending only integer values and I saw vvvv only accepts strings. Then I made the modification. Before the problem with the ( = ) didn’t working was for hidden characters. And I actualized to 31, and I saw the examples perfectly :)
Thanks everybody :)
I will publish soon the Android controller with this example included :)