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

  • Topics: 4
  • Replies: 480
  • Total: 484
  • ★★

80 characters is 240 bytes? can you clarify
the obviousness i’m oblivious to? ? i’m obviously
considering bytes in the wrong way.

I haven’t gone right into it, but I think lua treats strings as a series of bytes, so the length of a string of 80 sysex values is F+0+” ” (space) that’s 3 bytes: ,multiply 3 by 80 and you get 240, except I was slightly wrong there – there is no trailing space, so the correct length is 239. My panel still divides 239 into 4 strings of 20 sysex values, but there could be a potential bug in there somewhere. I’ve changed the code slightly, from
local st = mySplitStringIntoFourSegments(a,60)
local st = mySplitStringIntoFourSegments(a,#a/4)
but it would need to be tested.

and [“.. v..”] this is the bit that looks weird to me

with console() or console(String()) you can mix strings with data:
console(String(">>"..i.." = my test value= "..(v*3).."\n_____\\n prints a new line!_____"))

You must be logged in to view attached files.