Reply To: SOLVED: What’s wrong in my function

Home Forums General Programming SOLVED: What’s wrong in my function Reply To: SOLVED: What’s wrong in my function

#117089
dnaldoog
Participant
  • Topics: 4
  • Replies: 480
  • Total: 484
  • ★★
requestProgramDump = function()

	p = panel:getModulatorByName("Program")
	pn = p:getModulatorValue()
	pnr = CtrlrMidiMessage({0xf0, 0x01, 0x00, pn, 0xf7})
	console (pnr:toString())
	panel:sendMidiMessageNow(pnr)

end

Hi EnzoF04

It works for me on Windows 10 version 5.3.201, but I eliminated the dec2hex function. Maybe that is returning a string? Anyway you don’t need it.

You could also do:


    value=23 -- for example
    local sysexString = "f0 43 10 5c 10 %02x f7"
    local sysexFormula = string.format(sysexString, value)
    panel:sendMidiMessageNow(CtrlrMidiMessage(sysexFormula))

:)

Ctrlr