Quote:
Originally Posted by fundorin
What code should I use instead to display proper sysex message in console?
|
If you want to display sysex in hex, you could use:
Code:
function format_hex(str_in) local(str_out, pos, len) (
strcpy(str_out=#,"");
len=strlen(str_in);
pos=0;
while (pos<len) (
strcat(str_out,sprintf(#,"%02x ",str_getchar(str_in,pos)));
pos+=1;
);
str_setlen(str_out,strlen(str_out)-1); // returns str_out
);
printf("%s\n",format_hex(sysex_message));
(untested but ought to work...)