Cabbage Logo
Back to Cabbage Site

Update gentable widget after the fact

Is it possible to update a gentable after the ftgen has been regenerated? so,

instr FFTProcess

    if changed2(gkFFTSize) == 1 then
	    reinit	UPDATE
	endif

    UPDATE:
    iFFTSize = giFFT[i(gkFFTSize)-1]
    iDels   ftgen 101, 0, iFFTSize, -21, giDist, giDel ; delay times distribution
    chnset "tablenumber(101)", "AmpTableID" 

    ... rest of instr

combobox change triggers update, which should set the identchannel of the gentable

Check the SimpleTable example from the misc examples. It does what you are looking for.

oho I see it, cheers @rorywalsh :slight_smile:

cool, got it working thanks

I get warnings like this

WARNING: replacing previous ftable 1
WARNING: ftable 1 relocating due to size change
         currently active instruments may find this disturbing

anything to be concern with?

No overly concerned. I’ve never seen this cause a problem. If you do it in a very high numbered instrument it should be fine as it will be done last.