Cabbage Logo
Back to Cabbage Site

Updating tablenumber of gentable

Rory,

Is there a way to update the table number of a gentable display? I tried doing it using its identchannel, but Csound crashes.

Cheers.

You can’t dynamically change the table that is being displayed as far as I remember, but you can update it’s contents at any time. What are you trying to do?

[edit] can you send me a brief example of what you are trying to do here. I looked through the source code and it appears that this may well work, although I can’t recall if it’s by design or not :flushed:

I was trying to chnget a texteditor and with the resulting String create a table (GEN05, for an envelope). It has been quite a challenge since event_i or ftgen don’t accept arrays as arguments.

Joachim pointed me in the right direction, so now I’m using a combination of scoreline_i and a couple of chained instruments to control the sequence. I can happily say that now it’s crash free.

I’m sorry if I made you waste your time by looking at the code. Iain McCurdy’s ADSR_Envelope is proof that gentables work fine. The problem was my code.

By the way, I’ll upload my attempt to do an additive synthesis/oscillator bank as soon as I finish to program it. I would really like to have feedback on how to improve that code!

You didn’t waste me time at all. I would still like to see if they way when you change the function table in realtime, but I’m not sure this is ever a good idea!