Not sure if it’s me, but something is weird. Today I tried some more complex Sysex expressions, and used the function midivarlen(x) for the first time. But I don’t think the output is correct - unless I misunderstand completely:
When I enter midivarlen(127), I get a correct output of 7F (hex), but when I go up to 128, suddenly the output is 81 00 - funky, I always thought it should be 01 00… Also, the highest bit should not be set in sysex data - only 7 bits used.
midivarlen(7000) results in B6 58 - again a funky illegal first byte. Same phenomenon when I move up to midivarlen(70000) - AA DC 60.
It seems that midivarlen(x) adds 0x80 to every byte but the last - not very helpful…
@brad - can you confirm and help?