Reply To: add a parameter to : getModulatorValuesAsData() method

Home Forums General Programming add a parameter to : getModulatorValuesAsData() method Reply To: add a parameter to : getModulatorValuesAsData() method

#31126
zeoka
Participant
    • Topics: 73
    • Replies: 466
    • Total: 539
    • ★★★

    It looks that something is wrong
    I type start byte ex 0 , range ex:2 and 1 but I’ve some strange things
    LUA>> 9
    LUA>> 0
    LUA>> 2
    LUA>> 0
    LUA>> 0
    LUA>> 0
    LUA>> 51
    LUA>> 4
    LUA>> 0
    LUA>> 0
    LUA>> 0
    LUA>> 0
    LUA>> 0
    LUA>> 5
    LUA>> 14
    LUA>> 33
    LUA>> 0
    this is the length of my 17 blocks

    LUA>> ff 68 00 00 00 00 00 00 00
    LUA>>
    LUA>> 00 00
    LUA>>
    LUA>>
    LUA>>
    LUA>> 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 40 00 40 00 23 01 01 52 65 00 00 02 00 2a 7f 2a 00 02 00 01 25 09 00 00 29 33 55 00 40 6a 00 00 40
    LUA>> 00 00 00 00
    LUA>>
    LUA>>
    LUA>>
    LUA>>
    LUA>>
    LUA>> 00 00 00 00 00
    LUA>> 4d 4f 4f 47 59 20 20 20 20 20 20 20 44 4b
    LUA>> 40 40 03 00 00 04 00 00 00 00 00 00 38 00 00 00 00 40 40 00 00 00 00 00 00 00 00 00 00 00 40 40 27
    LUA>>

    this is the data inside

    function loadprg()
        lm = {}
    	lm[1] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex",CtrlrPanel.EncodeNormal, 0,2,1 ,false))
    	lm[2] = MemoryBlock(panel:getModulatorWithProperty("vstIndex",2):getValue() - 16)
    	lm[3] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex",CtrlrPanel.EncodeNormal, 3,5,1 ,false))
    	lm[4] = MemoryBlock(panel:getModulatorWithProperty("vstIndex",8):getValue() - 16 )
    	lm[5] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex",CtrlrPanel.EncodeNormal, 9,5,1 ,false))
    	lm[6] = MemoryBlock(panel:getModulatorWithProperty("vstIndex",14):getValue() - 16 )
    	lm[7] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex",CtrlrPanel.EncodeNormal, 15,66,1, false))
        lm[8] = MemoryBlock("00 00 00 00")
    	lm[9] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex", CtrlrPanel.EncodeNormal, 81,3,1 ,false))
    	lm[10] = MemoryBlock(panel:getModulatorWithProperty("vstIndex",84):getValue() - 14)
    	lm[11] = MemoryBlock(panel:getModulatorWithProperty("vstIndex",85):getValue() - 14)
        lm[12] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex", CtrlrPanel.EncodeNormal, 86,16,1, true))
        lm[13] = MemoryBlock(panel:getModulatorValuesAsData("vstIndex", CtrlrPanel.EncodeNormal, 102,2, 1 ,false))
        lm[14] = MemoryBlock("00 00 00 00 00")
        lm[15] = MemoryBlock()
        Label = panel:getComponent("SoundName"):getProperty("uiLabelText")
        for i = 0,13,1 do 
            s = Label:byte(i+1)
             if s == nil then 
                s = 32 
            end
            e = string.format("%x",s)
            d = MemoryBlock(e)
            lm[15]:insert(d,1,i)
    --console(string.format("%s",	e)) 
        end
        lm[16] = glbdat
        lm[17] = MemoryBlock( panel:getModulatorWithProperty("vstIndex",106):getValue())
      mydata =  MemoryBlock() 
         for j = 1,17,1 do 
            --lm[j] = h
            --l = h:getSise() 
            --mydata:append(lm[j],1)
         --end
         if lm[j] ~= nil then
             l = lm[j]:getSize() 
            --mydata:append(lm[j],l)
    console(string.format("%s",lm[j]:toHexString(1))) 
    end
    end
    end

    at the first block I would have 2 bytes I’ve 9
    the second one block I’ve 0
    only the patch name is correct
    the block 7 seems to be truncated
    etc…
    Atom do you have an idea ?

    `

    Ctrlr