Dear all,
I am having problems figuring out whats wrong (i guess it is a peoblem with execututing the code).
a) i have the following table:
giSeq1f ftgen 10, 0, 2^3, -2, 7.00, 7.03, 7.02, 7.06, 7.05, 7.09, 7.08, 7.12
b) and a button is triggering the following Instr:
instr 2
prints “Button %i pressed !!!\n”, i(gkButBank)
ilength = ftlen(giSeq1f); length of f-table
kndx = 0
kval table kndx, giSeq1f, 0, 0, 1
prints “ilength: %f kval1: %f\n”, k(ilength), kval
kndx = 1
kval table kndx, giSeq1f, 0, 0, 1
prints “ilength: %f kval2: %f\n”, k(ilength), kval
kndx = 2
kval table kndx, giSeq1f, 0, 0, 1
prints “ilength: %f kval3: %f\n”, k(ilength), kval
endin
c) the output is (depending on the button pressed:
Button 1 pressed !!!
ilength: 8.000000 kval1: 0.000000
ilength: 8.000000 kval2: 0.000000
ilength: 8.000000 kval3: 0.000000
or
Button 2 pressed !!!
ilength: 8.000000 kval1: 7.020000
ilength: 8.000000 kval2: 7.020000
ilength: 8.000000 kval3: 7.020000
or
Button 3 pressed !!!
ilength: 8.000000 kval1: 7.020000
ilength: 8.000000 kval2: 7.020000
ilength: 8.000000 kval3: 7.020000
Does anyone know what’s going on? All I want is to change values depending on the button pressed.
However, i already experience problems when trying to read a table value. Odd, no?
Many thanks in advance
Domnik