I had suspected this might be the case. I wonder if there is a way to soft reset the cubase side of MCU by sending some sysex back to trick cubase into resending all the bytes?
The difficulty I see with buffering is that it will be hard to know what has not been sent previously to therefore compare.
For example Cubase may send woodwinds track 1
Then the new track that comes in might be called winds Track 2
or woodwinds track 2
but sysex would say winds Track 2
I think we now know that MCU sends only what it needs to send in terms of a track name to save bytes. Which means if you connected to a real unit it only ācorrectsā on the LCD the characters it needs to on the units display when a new name is received.
Which means it will start the character string at a different point on the LCD unit and send in sysex where the correction starts...
Which means if we can buffer the names from previous track name sends and identify the MCU sysex string is to starts at a different point in the track name we just then to extract the bit from the old name that we need, and it add the new bit of the name creating the full track name againā¦
this script from earlier does exactly what we need but i have no idea how to integrate it into the custom module:
locals.text = locals.text || Array(112).fill(" ") // persistent variable to store full text
if (value.includes("f0 00 00 66 14 12")) { // sysex header for mackie lcd text
var d = value.split(" ").slice(6).map(x=>parseInt(x, 16)), // hex to int
pos = d[0], // first byte -> position
text = d.slice(1).map(x=>String.fromCharCode(x)) // rest -> updated characters
text.pop() // drop sysex closing byte
// update characters
for (var i = 0; i < text.length; i++) {
locals.text[i + pos] = text[i] // update
}
// update text widget
set("lcd_MODIFIED", locals.text.slice(72,101).join(""))
}