Yeah I would really love this feature in VDMX, I’m going to contact them and help them work on it.
They have the support for Pop Up Buttons in ISF for Input Ports that are published as Long (Integer) as long as they have
additional metaData.
"INPUTS":[
{
"NAME":"popUpButton",
"TYPE":"long",
"DEFAULT":1,
"VALUES":[
0,
1,
2
],
"LABELS":[
"red",
"green",
"blue"
]
}
]
Here’s a simple Vuo Composition with a Wave Node with it’s Wave Type port Published as WaveMenu
From the Vuo File here’s a portion of the code:
PublishedInputs [type="vuo.in" label="PublishedInputs|<WaveMenu>WaveMenu\r" _WaveMenu_type="VuoWave" _WaveMenu_menuItems="[\{\"value\":\"sine\",\"name\":\"Sine\"\},\{\"value\":\"triangle\",\"name\":\"Triangle\"\},\{\"value\":\"sawtooth\",\"name\":\"Sawtooth\"\}]" _WaveMenu="\"sine\""];
Here’s the code reformatted a bit:
PublishedInputs [type="vuo.in" label="PublishedInputs|<WaveMenu>WaveMenu\r" _WaveMenu_type="VuoWave" _WaveMenu_menuItems="[\{\"value\":\"sine\",\"name\":\"Sine\"\},\{\"value\":\"triangle\",\"name\":\"Triangle\"\},\{\"value\":\"sawtooth\",\"name\":\"Sawtooth\"\}]" _WaveMenu="\"sine\""];
And Cleaned Even More (Removing Escaped Quotes:
PublishedInputs [
type="vuo.in"
label="PublishedInputs|<WaveMenu>WaveMenur"
_WaveMenu_type="VuoWave"
_WaveMenu_menuItems="[
{"value":"sine","name":"Sine"},
{"value":"triangle","name":"Triangle"},
{"value":"sawtooth","name":"Sawtooth"}
]"
_WaveMenu="sine"];
There would just have to be a little bit of reparsing on the VDMX Side to
- Recognize that the Variable has the _menuItems property.
- A) Either build the arrays for the expected “LABELS” dictionary item and the “VALUES” dictionary item
B) or it would be just as easy to iterate thru each of the _menuItems, get it’s “name” value and it’s “value” value (or may have to create an integer here)
and build up the pop Up Menu Items for each one
I can see there being a little bit of incompatibility regarding VDMX wanting the property to by of type “long” (VuoInteger) but maybe if it doesn’t recognize the type and finds the _menuItems Property it can adjust.
Also the values that return from the Pop of Menu from VDMX I believe are usually Integers,
So would still need to use the List Select which using the Integer (also VDMX usually works on 0 based arrays)
I’ve working around all of this right now by building a separate Surface Control in VDMX with popUpButtons.
I have two pop Up Buttons
- for Wave Type selections, publishes Integer
- for Period selections, publishes as String (my menu only contains items 1, 2, 4, 8) so I couldn’t translate the integers properly
for the Wave I receive the integer value, adjust it for non zero starting array, select from a list of WaveType then patch to the WaveNode (whew)
for the Period I just patch directly to the Period input port and it will bridge from Text to Real for me.
this whole process could really be simplified quite a bit.
I also am going to look into possibly build a custom input Port Type.
Then I publish they popUpButtons values via OSC as a String.
The in my Vuo Comp once I receive the OSC String… I connect the value to Â