Reply To: Patch Name to uiCDLabel

Home Forums General Programming Patch Name to uiCDLabel Reply To: Patch Name to uiCDLabel

#13082
lfo2vco
Participant
    • Topics: 26
    • Replies: 162
    • Total: 188
    • ★★

    Thanks Atom, still found it a struggle but got there in the end with:

    nameData = midiMessage:getData():getRange(1,138)
    nameRange = nameData:getRange(7,23)
    nameLabel = panel:getComponent("Patch Label")
    
    console (nameRange:getRange(2,16):toString())
    
    if nameLabel ~= nil then 
        	nameLabel:setProperty ("uiLabelText", (nameRange:getRange(2,16):toString()), false)
    
    	end
    
    end

    What I didn’t realise was that I could put (nameRange:getRange(2,16):toString()) where you had “myText”. That’s down to my very limited knowledge of Lua and coding in general.

    Here is some noise I organised into an acceptable format:
    https://soundcloud.com/lfo2vco/a-dark-crystal

    Ctrlr