MCU lcd

You have a question or need an advice about how to do something? Ask it here!
djbony
Posts: 217
Joined: 13 May 2014 08:11
Re: MCU lcd

Post by djbony »

And if I put the function in quotation marks, then according to ASCII "@"
User avatar
radio42
Site Admin
Posts: 6539
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: MCU lcd

Post by radio42 »

For a gain value of -15dB this maps to a byte value of 0... and +15dB maps to 127, a byte value of 64 then means the middle position of the gain knob.

However, you can also use any other midi macro value.
But the answer of Behringer is odd.
What would the implementation of the Mackie control have to do with how a string to be displayed on their screen.
They either should provide a clear manual or description on how to trigger the display. If they cannot provide this, it is a closed system which I cannot support at all.
djbony
Posts: 217
Joined: 13 May 2014 08:11
Re: MCU lcd

Post by djbony »

I understand that, but I still think the function returns something wrong ... If I show it in SHOW_ALERT_WINDOW it's okay, but when I put it in SYSEX, it returns 64 at 0.
User avatar
radio42
Site Admin
Posts: 6539
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: MCU lcd

Post by radio42 »

Note, that sysex is in hex format (ie. a byte array).
What is expected by the XTouch? What byte values are needed ? A string value as ascii character sequence?
djbony
Posts: 217
Joined: 13 May 2014 08:11
Re: MCU lcd

Post by djbony »

Just as you wrote - A string value as ascii character sequence.
User avatar
radio42
Site Admin
Posts: 6539
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: MCU lcd

Post by radio42 »

You might use the *[TOFLOAT function macro to convert the byte value (which is enforced with the _SYSEX command) back to a string, e.g. like this:

*[TOFLOAT:{${outputmixer1gain}}:{0}:{0}:{centered}:{15}:{128}]

15 = max. gain value
128 = max byte value of a sysex return value per byte

Example:
In the _SYSEX command the ${outputmixer1gain} will always return a byte value between 0 and 127 for the gain value, e.g. 0=0dB.
The above macro will now convert this byte value back to a float value with a range between -15.0 and +15.0.
Unfortunately the granularity is loast due to this conversion - so I might need to add maybe add another overload for the _SYSEX which never converts macro values to bytes first.
djbony
Posts: 217
Joined: 13 May 2014 08:11
Re: MCU lcd

Post by djbony »

I don't understand at all :)

Command:
EXEC_SEND_MIDI_SYSEXMSG 0xF0 0x00 0x00 0x66 0x14 0x12 0x00 "*[STRING:{${outputmixer1name}}:{rpad}:{6}] " "*[STRING:{${outputmixer2name}}:{rpad}:{6}] " "*[STRING:{${outputmixer3name}}:{rpad}:{6}] " "*[STRING:{${outputmixer4name}}:{rpad}:{6}] " " " "*[STRING:{${inputmixer4name}}:{rpad}:{6}] " "*[STRING:{${inputmixer1name}}:{rpad}:{6}] " "*[STRING:{${inputmixer2name}}:{rpad}:{6}] " "*[TOFLOAT:{${outputmixer1gain}:{0}:{0}:{centered}:{15}:{128}] " " " 0xF7

Displays:
Attachments
IMG_20200220_213123.jpg
User avatar
radio42
Site Admin
Posts: 6539
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: MCU lcd

Post by radio42 »

There is a bracket missing:
Wrong:
*[TOFLOAT:{${outputmixer1gain}:{0}:{0}:{centered}:{15}:{128}]
Correct:
*[TOFLOAT:{${outputmixer1gain}}:{0}:{0}:{centered}:{15}:{128}]
djbony
Posts: 217
Joined: 13 May 2014 08:11
Re: MCU lcd

Post by djbony »

Thanks a lot. After adjusting, the result is the same :( I guess we'll leave it alone. The GAIN value just won't show.

EDIT:
I sent you an e-mail...
djbony
Posts: 217
Joined: 13 May 2014 08:11
Re: MCU lcd

Post by djbony »

Did you run out of mail?

Post Reply