View Single Post
Old 01-10-2018, 01:05 AM   #35
Join Date: Feb 2014
Location: Moscow, Russia
Posts: 554

Originally Posted by mschnell View Post
we have a variable pos that holds the number 11.
Not true. According to the reference, hex numbers should be assigned as $x** or 0x**, without using the quotation marks.
Like var = $xBF

pos = "\x11"; is a string and it's a string that is used in oscii-bot to send sysex data to the controller. The function's name itself suggests it: midisend_str

And the issue is that when a string is set explicitly, it's recognized by oscii-bot as a hex number, but when it's constructed with
strcat(pos, sprintf(#, "\\x%X", position));
it's, suddenly, a text string.

At the very same time, this code
strcat(lcdTrackName,sprintf(#,"%s%s%s%s%s%s%s%s",l cdSysexHeader,lcdSetCursor,"\x00",lcdRTLine,lcdTex tStart,str2hex(sysexInput),lcdTextEnd, lcdSysexEnd));
is also a string, but it's a proper sysex message. This is what I can't understand.

Even "%s%s%s%s%s%s%s%s" in the code line above suggests that "\x01" in lcdSetCursor = "\x01"; and any other part of the message is a string and not a hex number.

P.S. I feel that dec numbe should be converted into hex number and the result is put into a string. The question is, how to the conversion in EEL2.

Last edited by fundorin; 01-10-2018 at 01:56 AM.
fundorin is offline   Reply With Quote