Quote:
Originally Posted by fundorin
I can easily convert separate numbers, like
header = 240;
instead of
header = "\xF0";
and replace %s with %c in sprintf.
But, how would one replace this string:
"\xF0\x00\x20\x29\x03\x03\x12\x00\x02\x00\x02"
with dec numbers line?
|
Then assuming header is supposed to contain a
number to store a byte, let the compiler do the work and the programmer still see the hex value.
Write
header = $xF0;
What you have written is already a clear way of storing the bytes of the SYSEX header in a
string. They are binary values without meaningful character equivalents. Decimal values simply confuse since the Novation programmer manual uses hex.
Put a // comment alongside it in the code to make it clear that it is SYSEX header.