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

#73274
human fly
Participant
  • Topics: 124
  • Replies: 1070
  • Total: 1194
  • ★★★★

ok, i will give that a try next.

something else i’m stuck on, is getting my big block of data,
the ‘bank’, which is a text string, and splitting that into
the 4 smaller ‘preset’ strings – i’ve been trying to put it
into a format where i can getRange()
ie: (1,20),(21,40),(41,60),(61,80)

so i get this far:

-- Retrieving ext Bank
extBank = L(panel:getModulatorByName("lcd_bankDataB"):getComponent():getProperty("uiLabelText"))
console("Retreiving external bank : "..extBank)

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

--check size of received dump
local size = memB:getSize()
   console("midiMessageReceived: " .. size .. "bytes")

if size == 80 then 	--bank dump
console("bank dump detected!")
end

but then it doesn’t like this:

--convert bank to table
	tabl_extBank = {}
	for i=1,80 do
	s=extBank:toHexString(1)
  	table.insert(tabl_extBank,s)
	end

and tells me toHexString() is a nil value. i was then thinking
of doing getRange() on the table.

it also doesn’t like:
preset1Data = L(memB:getRange(1, 20))

(i don’t really know what i can do with L() macros)

Ctrlr