-
Bug
-
Resolution: Incomplete
-
P4
-
17
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
While the outgoing pitch-bend messages are correctly created with short messages that use `data1 = value14Bit & 0x7F`, data2 = (value14Bit >> 7) & 0x7F`, incoming messages are wrong. When coding back to 14-bit values, one obtains 8192 for the lowest pitch-bend, 0 for the center pitch bend, and 16383 for the highest pitch-bend. In other words, while the correct decoding should work via
`value14Bit = data2 << 7 | data1`
one has to actually change the value via
`value14Bit = ((data2 << 7 | data1) + 8192) % 16384`
Therefore, any MIDI code that correctly parses an incoming pitch bend message, obtains wrong values.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Attach a `new jmidi.Receiver { }` to the `Transmitter` corresponding to a hardware MIDI controller, and observe the incoming `ShortMessage` data.
CUSTOMER SUBMITTED WORKAROUND :
Wrap the values around.
FREQUENCY : always
While the outgoing pitch-bend messages are correctly created with short messages that use `data1 = value14Bit & 0x7F`, data2 = (value14Bit >> 7) & 0x7F`, incoming messages are wrong. When coding back to 14-bit values, one obtains 8192 for the lowest pitch-bend, 0 for the center pitch bend, and 16383 for the highest pitch-bend. In other words, while the correct decoding should work via
`value14Bit = data2 << 7 | data1`
one has to actually change the value via
`value14Bit = ((data2 << 7 | data1) + 8192) % 16384`
Therefore, any MIDI code that correctly parses an incoming pitch bend message, obtains wrong values.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Attach a `new jmidi.Receiver { }` to the `Transmitter` corresponding to a hardware MIDI controller, and observe the incoming `ShortMessage` data.
CUSTOMER SUBMITTED WORKAROUND :
Wrap the values around.
FREQUENCY : always