# CC fader value to tricky Sysex question

Hi Steve,

I am trying to set up a translator to send fader CC value of 0-127 and output a sysex message (hex). However, the sysex message is a little tricky.

F0 43 14 3E 10 00 00 00 00 00 01 5F F7 = -40db
F0 43 14 3E 10 00 00 00 00 00 01 5A F7 = -41db
F0 43 14 3E 10 00 00 00 00 00 01 55 F7 = -42db

As you can see if the fader goes up or down by 1db, the second to last bit increments /decrements by a certain amount. This amount does not matter to me.

After it reaches ‘01 00’ or ‘01 7F’ the “01” adjacent bit increases or decreases by 1.

ie
F0 43 14 3E 10 00 00 00 00 00 01 7F F7
F0 43 14 3E 10 00 00 00 00 00 02 00 F7

I want to make it so that every time I increment CC fader value by 1, it inc/dec by 16 (dec) in the sysex message.

How would I make this work?

Thanks!

From the SysEX message, it looks like it is creating a 14 bit value with both MSB and LSB representing 7 bits.

The following example multiplies the input value by 16. Then we split the result off into 2 7 bit values for the SysEX message where we use tt for MSB and uu for LSB

Here are the rules.

``````ga=qq*16
// Get MSB into tt
tt=ga>>7
// Get LSB into uu
uu=ga&127
Log "Log MSB=0x%02x tt% LSB=0x%02x uu%"
``````

And an excerpt of what the log shows

``````1: 0.0:2 Log Input qq Output is 144
2: 0.0:7 Log MSB=0x01 LSB=0x10
3: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 01 10 F7
5: 0.0:7 Log MSB=0x01 LSB=0x20
6: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 01 20 F7
8: 0.0:7 Log MSB=0x01 LSB=0x30
9: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 01 30 F7
11: 0.0:7 Log MSB=0x01 LSB=0x40
12: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 01 40 F7
14: 0.0:7 Log MSB=0x01 LSB=0x50
15: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 01 50 F7
17: 0.0:7 Log MSB=0x01 LSB=0x60
18: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 01 60 F7
20: 0.0:7 Log MSB=0x02 LSB=0x00
21: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 02 00 F7
23: 0.0:7 Log MSB=0x02 LSB=0x20
24: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 02 20 F7
26: 0.0:7 Log MSB=0x02 LSB=0x50
27: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 02 50 F7
29: 0.0:7 Log MSB=0x03 LSB=0x00
30: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 03 00 F7
32: 0.0:7 Log MSB=0x03 LSB=0x40
33: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 03 40 F7
35: 0.0:7 Log MSB=0x03 LSB=0x70
36: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 03 70 F7
38: 0.0:7 Log MSB=0x04 LSB=0x30
39: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 04 30 F7
41: 0.0:7 Log MSB=0x04 LSB=0x60
42: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 04 60 F7
44: 0.0:7 Log MSB=0x05 LSB=0x10
45: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 05 10 F7
47: 0.0:7 Log MSB=0x05 LSB=0x20
48: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 05 20 F7
50: 0.0:7 Log MSB=0x05 LSB=0x40
51: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 05 40 F7
53: 0.0:7 Log MSB=0x06 LSB=0x00
54: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 06 00 F7
56: 0.0:7 Log MSB=0x06 LSB=0x50
57: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 06 50 F7
59: 0.0:7 Log MSB=0x07 LSB=0x10
60: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 07 10 F7
62: 0.0:7 Log MSB=0x07 LSB=0x60
63: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 07 60 F7
65: 0.0:7 Log MSB=0x07 LSB=0x70
66: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 07 70 F7
68: 0.0:7 Log MSB=0x08 LSB=0x00
69: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 08 00 F7
71: 0.0:7 Log MSB=0x08 LSB=0x30
72: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 08 30 F7
74: 0.0:7 Log MSB=0x08 LSB=0x70
75: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 08 70 F7
77: 0.0:7 Log MSB=0x09 LSB=0x10
78: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 09 10 F7
80: 0.0:7 Log MSB=0x09 LSB=0x40
81: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 09 40 F7
83: 0.0:7 Log MSB=0x09 LSB=0x70
84: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 09 70 F7
86: 0.0:7 Log MSB=0x0a LSB=0x30
87: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0A 30 F7
89: 0.0:7 Log MSB=0x0a LSB=0x60
90: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0A 60 F7
92: 0.0:7 Log MSB=0x0b LSB=0x20
93: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0B 20 F7
95: 0.0:7 Log MSB=0x0b LSB=0x50
96: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0B 50 F7
98: 0.0:7 Log MSB=0x0c LSB=0x10
99: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0C 10 F7
101: 0.0:7 Log MSB=0x0c LSB=0x40
102: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0C 40 F7
104: 0.0:7 Log MSB=0x0d LSB=0x00
105: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0D 00 F7
107: 0.0:7 Log MSB=0x0d LSB=0x30
108: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0D 30 F7
110: 0.0:7 Log MSB=0x0d LSB=0x70
111: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0D 70 F7
113: 0.0:7 Log MSB=0x0e LSB=0x00
114: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0E 00 F7
116: 0.0:7 Log MSB=0x0e LSB=0x20
117: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0E 20 F7
119: 0.0:7 Log MSB=0x0e LSB=0x40
120: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0E 40 F7
122: 0.0:7 Log MSB=0x0f LSB=0x00
123: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0F 00 F7
125: 0.0:7 Log MSB=0x0f LSB=0x30
126: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0F 30 F7
128: 0.0:7 Log MSB=0x0f LSB=0x70
129: MIDI OUT [Bome MIDI Translator 1 Virtual Out]: F0 43 14 3E 10 00 00 00 00 00 0F 70 F7

``````

And here is the project file.

CC-to-SysEX-times16.bmtp (1.1 KB)

Steve Caldwell
Bome Customer Care

Also available for paid consulting services: bome@sniz.biz

That did it!
Will def look into your solution and learn from it- it’s very helpful to know!
Thanks again Steve.

1 Like