With a List control, if have a selector called “ch 1” with parameter number 1001 where I select one of following list entries:
Value 0 (Oberheim)
Value 1 (Roland)
Value 2 (Korg)
Value 3 (Moog)
Depending on the choice I made, I want a variable, called channelName, to be updated, not with the list item values 0…3 but with the selected label of the item (f.i. ‘Roland’).
I don’t think you can (easily? at all?) pull this value from inside the preset yet. What I would do is create a separate table in the LUA and use the value number as an index to look up the text you want.
The issue with it is if people want to adopt someone else’s preset, they’ll have to dive in the script, which is a bit harder than just updating an item list.
There is another issue with the item lists: lua does not retrieve in a value function the value assigned to the selected item, but only its place in the order of the list. So a list with values such as {-24,-12,-7,-5,0,5,7,12,24} is read as a list with values {0,1,2,3,4,5,6,7,8}
Yes, I ran into this yesterday. I’ve assigned values to my list items, but in my LUA function, the value parameter is actually set to the index of the selected item, not it’s actual value.