Reply To: Demo panel for MIDI receive/transmit routines

Home Forums General Using Ctrlr Demo panel for MIDI receive/transmit routines Reply To: Demo panel for MIDI receive/transmit routines

#73204
dnaldoog
Participant
    • Topics: 4
    • Replies: 480
    • Total: 484
    • ★★

    Hi Human Fly,

    This code below works and I think you were on the right track (didn’t know about that table.concat function), but I think the problem was the method getPropertyString – getProperty seems to work though. Also for the sendMidi function I think you wrote Memb, should be memB. Interesting!

    function buildBankA()
    
    --add strings to table
    	tabl_bankA = {}
    for i=1,4 do
    local s=L(panel:getComponent("lcd_presetData"..i):getProperty("uiLabelText"))
        table.insert(tabl_bankA,s)
    end
    --concatenate table into single string
    	DatasConcat = table.concat(tabl_bankA, " ")
    --	console (String("DatasConcat : "..DatasConcat))
    --make a memory block from the string
    memB = MemoryBlock(DatasConcat)
    
    --send it to synth
    panel:sendMidiMessageNow(CtrlrMidiMessage(memB))
    console(String("memBlock :"..memB:toHexString(1)))
    
    --send it to lcd
    panel:getComponent("lcd_bankDataA"):setPropertyString("uiLabelText",""..memB:toHexString(1))
    
    end
    Ctrlr