arrayBugExample.toe (3.9 KB)
If I assign i or t to a[4] the printed array values increment properly, but if I try to do the same thing with a quickly-updating channel in a constant of another operator, they’re all identical (I’ve tried this with up to 11 elements in the array). Do you know why this is? This is unfortunately also the case if I try to set the execute module’s value directly from a midiInDAT’s callbacks (streaming MTC)…
EDIT: OK, so I found out the reason for this is that both op[0] and op.par.value0 return a channel parameter reference, not the actual value- even if you use something like copy.copy(). To get the raw value you need to type either op[0][0] or op[0].eval().