# Sysex with 16bit data

**URL:** <https://forum.electra.one/t/sysex-with-16bit-data/2497>\
**Category:** Developers\
**Created:** [October 26, 2023, 4:48pm UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497 "2023-10-26T16:48:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MatzeMillion](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MatzeMillion](https://forum.electra.one/u/MatzeMillion)\
**Post date:** [October 26, 2023, 4:48pm UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/1 "2023-10-26T16:48:46Z")

</div>

Hi!

Is there a way to attach sysex messages with 16bit data to an encoder? Some Roland gear is using this for realtime control. (SDE / SRV / SDX).

They send four data bytes, using only 4 bits in each byte, to transmit a 16 bit value.

LSB | data | data | MSB (for example 0F 0B 00 04 = 40BF)

The value function in the electra.one editor offers 14bits, which is enough for most parameters, but there are a few where you have to sacrifice resolution or crop the data.

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [October 27, 2023, 5:39am UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/2 "2023-10-27T05:39:29Z")

</div>

Yes, you do this by creating a lua function for it, where you convert the value of a virtual control into four bytes you then transmit. Lua allows you to resolve all these special cases, without making the user interface in the editor overly complex.

---

<div class="post-metadata">

**Author:** ![MatzeMillion](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MatzeMillion](https://forum.electra.one/u/MatzeMillion)\
**Post date:** [October 27, 2023, 8:57am UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/3 "2023-10-27T08:57:43Z")

</div>

Perfect. I’ll look into it!

The same apples to special cases for the display of parameters?

For example a frequency which can be set from 0.1Hz to 1000Hz, but is transmitted as values from 1-10000.  
I was not able to have it displayed correctly.

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [October 27, 2023, 3:58pm UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/4 "2023-10-27T15:58:55Z")

</div>

yes,

but the first example is lua as a “function”: the control must do something different from the normal way of working

showing a different value is also via lua but now you use the lua as a “formatter”. In that case it only changes the way the control value is being diplayed.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/electraone/original/2X/4/43cfc7d0e9e75ede9645e2154c258bc51d46a748.png)

---

<div class="post-metadata">

**Author:** ![MatzeMillion](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MatzeMillion](https://forum.electra.one/u/MatzeMillion)\
**Post date:** [October 27, 2023, 4:02pm UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/5 "2023-10-27T16:02:58Z")

</div>

Already figured out the formatting. 🙂

After trying some things, let me rephrase the question.  
The controls are limited to 14bit, aren’t they?

So I have to scale them to the required number of bits?

Another example is a value going from 0.7 to 29000, where it goes in 0.1 increments unter 100, so effectively 29.993 values, which is in a 15bit range.

---

<div class="post-metadata">

**Author:** ![NewIgnis](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.electra.one/newignis/32/767_2.png) [@NewIgnis](https://forum.electra.one/u/NewIgnis)\
**Post date:** [October 28, 2023, 7:16am UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/6 "2023-10-28T07:16:38Z")

</div>

Midi cc is limited to 7 or 14 bit yes, because that is within its definition.  
But try a virtual control… they go until 99.999 AFAIK

---

<div class="post-metadata">

**Author:** ![MatzeMillion](https://avatars.discourse-cdn.com/v4/letter/m/f19dbf/32.png) [@MatzeMillion](https://forum.electra.one/u/MatzeMillion)\
**Post date:** [October 29, 2023, 10:37pm UTC](https://forum.electra.one/t/sysex-with-16bit-data/2497/7 "2023-10-29T22:37:19Z")

</div>

Solved it by using only the values I need and then scale it up to 16bit and create the 4 sysex bytes needed. Thank you for pointing me into the right direction. 🙂
