Reply To: re-usable modulators ?

Home Forums General Programming re-usable modulators ? Reply To: re-usable modulators ?

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

    some limited success with tables created on startup
    with:

    for i=1,120 do  --[ autocreate tables ]--
    _G["tbl_keyassgn"..i]={}
    end

    (yeah, there are really 120 groups of parameters)

    i make a variable to identify the table i want to write
    to: ‘keysel’

    and then go: (tbl_voiceParam is the list of modulators)

    for i,v in ipairs(tbl_voiceParam)do 
    local newval=(tbl_voiceParam[ i ]):getValue()
    table.insert(_G["tbl_keyassgn"..keysel],string.format("%d",newval))
    end

    so that was ok. but now i’ve done something and it’s adding too
    many items to the destination table, and i need to initialize it,
    but am having trouble initializing with:
    _G["tbl_keyassgn"..keysel]={}
    (because it’s global? back to the drawing board…)

    Ctrlr