Question 1:
I’m trying to add a “mixer bus” style functionality to a cabbage instrument and running into some issues… not sure if what I’m trying to do should be possible, or if I’m trying something silly.
I have two global a-rate arrays, one for L and one for R, with 4 elements each. I’m not bothering to try with 2d arrays yet just to keep it simple until I get it working.
I would like each element to acts as a bus channel. the “bus” channel being read is a combobox with items(“1”, “2”, “3”, “4”)
And what I’d like to do is this:
gaLeft[chnget("bus")-1] += aL
gaRight[chnget("bus")-1] += aR
But this doesn’t appear to work.
I can’t use this workaround either, because channels will get overwritten by p1 and/or note priority:
gaLeft[chnget("bus")-1] = gaLeft[chnget("bus")-1]+aL
gaRight[chnget("bus")-1] = gaRight[chnget("bus")-1]+aR
Question 2:
What’s the proper way to clear the array buffers? clear doesn’t seem to work with arrays, nor can I set it to 0 with a simple = statement. Right now I’m using *= on the entire array which seems to do the trick, but feels very hack-ish. Plus I found it ironically strange that I can perform that operation on the full array, but not an individual element?