The thing is you can’t encode 32640 values with two 7-bits (00-7f) values, each of these can represent 128 different values, so you can only encode 128*128=16384 values.
thanks! awesome, i have much to learn as it seems.
had to use 128 steps and a range from 0 to 32639 (00 00 to 7f 7e) -> but that is good enough (rounding error???) -> otherwise i get “jumping” values.
@jean-emmanuel could you please help me out another time ?
i started on this topic again and found out that i need this conversion the other way round.
0x00 00 -> 0x7f 7f (14 bit) to 0 -> 16383. (parse the incoming sysex and position the knob when turning the knobs on the “real” device).
You have to separate the two 7-bit bytes, the first one is the most significant bit (msb), the second is the least significant bit (lsb), the conversion formula is: value = msb * 128 + lsb . It could look like this:
// assuming msb = "7f" and lsb = "7f"
var value = parseInt(msb, 16) * 128 + parseInt(lsb, 16)