Cabbage Logo
Back to Cabbage Site

Dynamically updating tablenumber() using identchannel for a Gentable desn't work

gentableExample.csd (946 Bytes)

In the attached minimal example, nothing happens. At 1 second into performance instrument 1 is activated. Instr 1’s job is to use the chnset opcode to send the identifier tablenumber(1) on the identchannel table-id. That should make the gentable widget display the lfo waveform. Only it doesn’t work.

Tellingly, updating a different identifier in the exact same manner - e.g. replacing tablenumber(1) with tablebackgroundcolour(200,200,200) - does work. That is, instr 1 seems to have no problem updating the background colour or some other identifier of the gentable widget, just not the tablenumber() identifier.

Another thing to note is that by including tablenumber(1) in the Cabbage code at the top of the file, the f-table displays fine, but still cannot be changed dynamically from csound using the identchannel.

My goal is to be able to use a line like
chnset sprintf("tablenumber(%d)", giLfo), "table-id"
to be able to mostly avoid dealing with real table numbers.

You need to set the tablenumber() when you create the widget. able numbers can’t be dynamically changed using gentable, but you can of course swap table contents quickly in Csound using tablecopy. If I set the tablenumber I can get it to update without an issue.

1 Like