Cabbage Logo
Back to Cabbage Site

Tables: ftgen and score function

Hi all,

first of all: Rory, MANY THANKS for Cabbage 1.n!!!

I do not understand how to properly use a simple table. This sample code illustrates my problem. If you hold down the note, it seems that the sound generated will go into loop. I wish that the amplitude follow the function curve, but then the sound stops … Can someone help me?

Thanks

Table ex.csd (593 Bytes)

Looking at the line:
aline line 0, 1, 1024
After 1 second aline is 1024, but if the note extends beyond 1 second line will continue in the direction in which it is going. After 2 seconds aline will be 2048 and so on.
If you swap the line opcode for linseg, linseg will hold its final value rather than continue.
Also the table pointer should go as far as 1023 not 1024; 0 is the 1st table value, 1023 is the 1024th table value :wink:
so “aline linseg 0, 1, 1023” should fix it.

thank you,

not only because you solved my problem , but because I 've explained where wrong!

Table FIX.csd (753 Bytes)

R

you can to end the reading of the table even after the note off ?

You can add these two lines into your instrument and all notes will last for 1 second, i.e. table reading will always complete.

xtratim 1
turnoff

No words! Thanks!!!

Simply Amp Table Complete.csd (888 Bytes)

R