# Issue in reading a table with a control

**URL:** <https://forum.csound.com/t/issue-in-reading-a-table-with-a-control/1484>\
**Category:** General\
**Created:** [December 27, 2023, 4:38pm UTC](https://forum.csound.com/t/issue-in-reading-a-table-with-a-control/1484 "2023-12-27T16:38:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gppp](https://forum.csound.com/user_avatar/forum.csound.com/gppp/32/384_2.png) [@Gppp](https://forum.csound.com/u/Gppp)\
**Post date:** [December 27, 2023, 4:38pm UTC](https://forum.csound.com/t/issue-in-reading-a-table-with-a-control/1484/1 "2023-12-27T16:38:36Z")

</div>

Hello,

I am wondering why a tool always worked in other orchestras in this case doesn’t work at all.

I am referring to the following lines, starting from line 28:

k\_VCO1\_off invalue “VCO1\_off” ; offset freq

gk\_VCO1\_off tablei k\_VCO1\_off, giExp20000, 1

outvalue “VCO1\_off\_display”, gk\_VCO1\_off

In the header I have created the table:  
giExp20000 ftgen 0, 0, 129, -25, 0, 1.0, 128, 20000.0

It happens that the k\_VCO1\_off control doesn’t read the table giExp20000, so in the output I get the default values of the control, in the range of 0 and 1.  
It always worked in other orchestras, and I really can’t understand what’s the issue here.

Thanks for your support.

G.

[foscili\_lfo\_01\_graph.csd](https://forum.csound.com/uploads/short-url/adL8m7BH0Q5cFfbTnCdGaCJ8isl.csd) (101.0 KB)

---

<div class="post-metadata">

**Author:** ![joachim](https://forum.csound.com/letter_avatar_proxy/v4/letter/j/a87d85/32.png) [@joachim](https://forum.csound.com/u/joachim)\
**Post date:** [December 27, 2023, 7:34pm UTC](https://forum.csound.com/t/issue-in-reading-a-table-with-a-control/1484/2 "2023-12-27T19:34:51Z")

</div>

i think the problem is that you mix up two ways of creating tables:  
in the orc header, you create two tables with ftgen and let csound  
assign a number to them.  
in the score, you create a lot of tables in assigning numbers directly  
to them.

the console output says:  
“ftable 100:  
WARNING: replacing previous ftable 101  
ftable 101:  
WARNING: replacing previous ftable 102”

this means:

- your giExp1\_2 table gets the number 101 from Csound but is then  
overwritten in the score,
- your giExp20000 gets number 102 and is overwritten, too.

you can assign own table numbers to ftgen, for instance:  
giExp1\_2 ftgen 1000, 0, 129, -25, 0, 1.0, 128, 2.0 ;TABLES FOR EXP SLIDER  
giExp20000 ftgen 1001, 0, 129, -25, 0, 1.0, 128, 20000.0 ;TABLES FOR  
EXP SLIDER

this works, but i would recommend not to mix the two ways at all, but to  
put all tables in the orc header ans let csound assign the numbers.

best -  
joachim

---

<div class="post-metadata">

**Author:** ![Gppp](https://forum.csound.com/user_avatar/forum.csound.com/gppp/32/384_2.png) [@Gppp](https://forum.csound.com/u/Gppp)\
**Post date:** [December 28, 2023, 9:12pm UTC](https://forum.csound.com/t/issue-in-reading-a-table-with-a-control/1484/3 "2023-12-28T21:12:32Z")

</div>

Thank you Joachim, now everything is clear, I had not thought of this detail. I’ll set the tables in the header.

G.
