Hi
I have a trouble for save and load in my DAW when using widget Array. other widgets are perfectly capable of save and load. i wonder is there any way to save array widgets too ?
thanks
Can't save Widget Array Data
I’ve no come across this issue before. Do you have an example I can test with? Or should the example in the Misc folder be enough?
Thanks, I’ll take a look first thing tomorrow.
There is definitely an issue here, but I’m hesitant to fix it as I am in the process of deprecating widget array identifier. I’m going to post about this in the announcements section a little later. The reason why I’m deprecating them is that there are no longer needed. You can now easily create and manage a widget array in Csound.
For example your code can be simplified to this:
instr CreateNSliders
iRyArr [] fillarray 1,4,3,2,1
iWidget = 0
while iWidget < 5 do
; create bank of nslider using cabbageCreate opcode
SCode sprintf "nslider bounds(%d, %d, 40, 28), channel(\"check%d\"), velocity(50), range(0.5, 4, %d, 1, 0.01) colour(10, 10, 10, 200) fontColour(200, 200, 250, 250)", iWidget%10*40+25, 30, iWidget+1, iRyArr[iWidget]
cabbageCreate SCode
iWidget += 1
od
endin
I’ve attached an updated version of your example that uses the new cabbageCreate
opcode and guiMode()
system. Note that you’ll need to update to the latest beta version which you can find here under the drop link. I’ve tested this in DAWs and it works as expected.
test.csd (1.1 KB)
thanks
it works perfectly now