Beta OS 3.7.0f on a Mk II Electra One.
I’ve run into a situation where some parameters have either a bi-polar range or maybe a negative to 0 range and need to store a negative value from a parameter dump.
I can declare a control to be Virtual, Two’s-complement, 14 bit signed and formatting functions work perfectly. So a control will scroll from -127 to +127 just fine.
However, it appears I cannot store a valid representation of a single byte negative number in the parameterMap.
Example - I have a decibel range control, Values range from -6 dB to 0 dB.
The code generates an NRPN of 0x7f,0x7a (-6) through 0x7f,0x7f (-1), to 0x00,0x00 just fine.
However, there appears to be no way to store a -3 (0x7f,0x7d) as value from a sysex dump.
-3 is stored as 253 in the parameterMap since it is interpreting all values as MIDI in the range of 0 to 16383. Since 253 is outside the range of -6 to 0, at some point in time the Electra OS sets the stored value to 0.
It also looks like the Electra OS is performing range checks and limits on the parameterMap data some time in between patch.onResponse() and calling the formatting/display routines because inside my fmtDB(valueObject,value) formatter, the parameterMap value being passed in is 0 not 253, but at the very end of patch.onResponse(), the value is 253…