Reply To: MIDI Out LED

Home Forums General Programming MIDI Out LED Reply To: MIDI Out LED

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

    So is this what you are doing? Sending the MIDI should be in the timer function, right?

    
    timerCallback = function(timerId) -- this function name must match the name above in the first line. ;)
    
    if timerId==40 then
        panel:sendMidiMessageNow(CtrlrMidiMessage(mysysexData:toHexString(1))); -- go send it
        panel:getModulatorByName("sendDumpButton"):getComponent():setProperty ("uiButtonTextColourOff","FFFF4545",true); -- set to red
        timer:stopTimer(timerId)
    end
    
    end
    
    myMethod=function()
    --x = a large sysex string
     mysysexData=MemoryBlock(x);
         --mysysexData=encodeSysex(); -- What is this?
         s = mysysexData:getSize();
        panel:getModulatorByName("sendDumpButton"):getComponent():setProperty ("uiButtonTextColourOff","000000",true); -- set to black etc
        totwait = tonumber( ( s * 0.32 ) + 5 );
        -- console("start timer40...");
    timer:setCallback (40, timerCallback)
    timer:startTimer (40, totwait); 
    end --f
    
    Ctrlr