But if I have a ton of widgets, then it would make the code alot cleaner to set the visible() identifier to 0 for all these widgets with a single line. Is this possible?.. maybe with arrays?
If I remember correctly, just create a string in your sprintfk statement that includes multiple identifiers should do the trick. I would think it would be faster to break them up into multiple calls, but probably not by much.
No, but that’s where cabbageGetWidgetChannels name is a real time saver. Just grab an array of the channels you need to set them in a loop. In pseudo code:
SChannel cabbageGetWidgetChannels "_group(\"pitchSliders\")"
kCnt = 0
while kCnt < lenarray(SChannel) do
cabbageSet 1, SCHannel[kCnt], sprintfk("visible(%d) ", 0)
kCnt +=1
od
Of course you also have the option of putting these into a plant and making that invisible…
It’s actually a user defined identifier, and can be applied to any widget. I’ve been using them to group different parameters together. I’m using multiple instances of the same instrument, and I use “_tag("oscX")” with “X” being a unique number for each. You can use any string following the “_” to create your own identifier.