Home Forums General Programming lua&demo panel question Reply To: lua&demo panel question

#14143
zeoka
zeoka
Participant

Saw the” Data dump utility” panel and tried this :

 myNewMethod = function(midi)

vendor = midi:getLuaData():getByte(1)
 model = midi:getLuaData():getByte(2)
  typ1 = midi:getLuaData():getByte(4)
  typ2 = midi:getLuaData():getByte(5)
  typ3 = midi:getLuaData():getByte(6)
 txt =panel:getComponent("modulator-1")
   if vendor == 62 and model == 17 and typ1 == 16 then 
      i0to13 = midi:getLuaData():getRange(7,14) 
     i16to23 = midi:getLuaData():getRange(23,8)
     i26to33 = midi:getLuaData():getRange(33,8)
     i36to50 = midi:getLuaData():getRange(43,15)
     i53to67 = midi:getLuaData():getRange(60,15)
     i69to73 = midi:getLuaData():getRange(76,5)
     i75to83 = midi:getLuaData():getRange(82,9)
     i85to91 = midi:getLuaData():getRange(92,7)
         i94 = midi:getLuaData():getByte(101)
        txt:setText(string.format("%s %s %s %s %s %s %s %s", i0to13:toHexString(1),i16to23:toHexString(1),i26to33:toHexString(1),i36to50:toHexString(1),i53to67:toHexString(1),i69to73:toHexString(1),i75to83:toHexString(1),i85to91:toHexString(1)))
       sound = MemoryBlock(txt:getText())
       if typ3 == 0 then  
         panel:setModulatorValuesFromData (sound, "vstIndex",0, 1, false)
-- not working (see the picture) 
    elseif typ3 == 1 then  
        txt:setText(string.format("%s %s %s %s %s %s %s %s", i0to13:toHexString(1),i16to23:toHexString(1),i26to33:toHexString(1),i36to50:toHexString(1),i53to67:toHexString(1),i69to73:toHexString(1),i75to83:toHexString(1),i85to91:toHexString(1)))
    elseif typ3 == 2 then  ................  
-- i can get texts formats , that's working 

This is not working and on the demo panel too :

Attachments:
You must be logged in to view attached files.