Cabbage Logo
Back to Cabbage Site

Gentable not drawing some tables properly (fixed)

I was trying some basic envelopes in those synths I made and I think i’ve found a bug. In my code I have:

gentable bounds(32, 4, 190, 192), channel("pos","end"), tablecolour("yellow"), identchannel("table1"), startpos(-1), outlinethickness("2"), tablebackgroundcolour(79, 135, 78, 32), tablegridcolour(82, 233, 82, 15), tablenumber(212), amprange(0, 1,212, 0.1) 

My table is being defined as:

f 212 0 1025 -07 0 100 .8 825 1 100 0 

When I run the code I see that the graph doesn’t end in 0 (see the attached picture). I’ve also found out that I can correct the bug if I add ‘samplerange (0, 1025)’ to the gentable definition.

Am I using the widget incorrectly or is it a bug?

P.S.: Shall we use github for reporting bugs now? Should we first try to get an answer in the forum and only if you (Rory) confirm that the behavior is unexpected we report the bug in github?

edit: I’ve found out that with a table size of 100 I have to use “samplerange(0, 101)”. So it’s evidently not calculating the size of the display correctly by default and so it hides the last value shown. Maybe there is a size+1 in C++ that is missing?

Should be fixed in git. Your suspicions were right but I’m concerned that this might affect some of Iain’s GEN examples. Can you try with the latest tip and see if it’s Ok? If so we can make this thread as (fixed).

I guess we can avoid the github issue tracker so long as I mark each slug as fixed. It’s probably just as easy to work from the forum? What do people think?

Thanks Rory. I think we could mark this one as fixed. What do you think? Does the line reach 0 at the end?

I like using the forum, but being that you’re the one fixing things around here I can adapt to what suits you best.

We can mark it as fixed…for now at least :wink: