If you are just using the gentable
to display simple waveforms, you can do something like this. The idea is to create a simple table, in this case table number 99, and copy other tables to it just before you update it.
<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginid("def1")
gentable bounds(10, 10, 300, 150), tablenumber(99), identchannel("table1"), fill(0), outlinethickness(3)
combobox bounds(316, 10, 80, 20), items("Sine", "Square", "Saw"), channel("waveform")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
kWaveform chnget "waveform"
if changed:k(kWaveform) == 1 then
tablecopy 99, kWaveform
chnset "tablenumber(99)", "table1"
endif
endin
</CsInstruments>
<CsScore>
f99 0 1024 10 1
f1 0 1024 10 1 ;sine
f2 0 1024 7 1 512 1 0 -1 512 -1 ;square
f3 0 1024 7 -1 512 1 1 -1 511 1 ;saw
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>