In order not to write a whole bunch of chnget
s to individual variables, If I write something like:
kargs[] chngetk gSiXpnames
Will that ‘spam’ allocate a new array on each k-cycle, or will the same array be reused? In Csound 6.
I don’t alas know how to profile anything in Csound relating to mem allocs.
Looking at
{ "chngetk.k", S(CHNGET),_CR, 3, "k[]", "S[]",
(SUBR) chnget_array_opcode_init, (SUBR) notinit_opcode_stub, NULL },
it seems it does all the work at i-time? I don’t understand how that’s even possible for chngetk
. Ah, I see that init mutates the entry table!
if(channelType == (CSOUND_CONTROL_CHANNEL | CSOUND_INPUT_CHANNEL))
p->h.opadr = (SUBR) chnget_array_opcode_perf_k;