Reply To: Demo panel for MIDI receive/transmit routines

Home Forums General Using Ctrlr Demo panel for MIDI receive/transmit routines Reply To: Demo panel for MIDI receive/transmit routines

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

Or this, which is much closer to your original code:


function buildBankA()

--concatenate strings

	local data1=panel:getComponent("lcd_presetData1"):getProperty("uiLabelText")
	local data2=panel:getComponent("lcd_presetData2"):getProperty("uiLabelText")
	local data3=panel:getComponent("lcd_presetData3"):getProperty("uiLabelText")
	local data4=panel:getComponent("lcd_presetData4"):getProperty("uiLabelText")

	tabl_bankA = {}

	tabl_bankA[1]	= data1 -- tostring() not necessary
	tabl_bankA[2]	= data2
	tabl_bankA[3]	= data3
	tabl_bankA[4]	= data4

--concatenate table into single string
	DatasConcat = table.concat(tabl_bankA," ")
	console ("DatasConcat : "..DatasConcat)

--make a memory block from the string
	memB = MemoryBlock(DatasConcat)

--send it to synth
	panel:sendMidiMessageNow(CtrlrMidiMessage(memB))
	--console("memBlock :"..memB:toHexString(1))

--send it to lcd
	panel:getComponent("lcd_bankDataA"):setPropertyString("uiLabelText",""..memB:toHexString(1))

end

panel:sendMidiMessageNow(CtrlrMidiMessage(DatasConcat )) also works, so there’s no need for the MemoryBlock function

Ctrlr