Reply To: why is this method looping through several times?

Home Forums General Programming why is this method looping through several times? Reply To: why is this method looping through several times?

#83707
human fly
Participant
    • Topics: 124
    • Replies: 1070
    • Total: 1194
    • ★★★★

    it is definitely this that is doing it.
    can anyone suggest an alternative way?
    ‘keyselect’ is the id number of each key assignment,
    and the _G table contain all the values that need to
    be retrieved.
    is it maybe the way that ‘keyselect’ is obtained, by
    finding which pad (1-24) and which kit (0-5), performing
    separate iterations? is there an art to this? or do i just
    have to run through it as many times as needed? ( i put the
    console command in as a marker, to check for loops like this )

    for i=1,12 do 
    local param = tbl_keyParam
    --param:setModulatorValue((_G[ "tbl_keyassgn"..keyselct ])[ i ],false,false,false)
    param:setValue((_G[ "tbl_keyassgn"..keyselct ])[ i ],true,true)
    end
    Ctrlr