Negative numbers
2017-04-09 by sam.staton@...
I had some success in dealing with negative numbers.
The Emu Morpheus LFO amt uses the following encoding:
-128 is 007F, -1 is 7F7F, 0 is 0000, and 127 is 7F00.
(Two's complement with lsb first.)
This can be dealt with in the BCR2000 using a value of range 0-255 and the following tx code.
$F0 $7D val7.13 cks-1 2 $4E val0.6 $F7 $F0 $18 $0C $00 $03 $61 $40 val0.6 cks-3 3 $F7
As I sweep the BCR pot from 0-255, the Emu Morpheus LFO amt sweeps smoothly from -128 to 127.
The way this works is that there are two sysex messages (plus the junk that the BCR inserts between them).
The first sysex message will be ignored (manufacturer 7D=None).
The second sysex message is used (Manufacturer 18=Emu).
I am using checksums carefully to get the bcr2000 to do some trivial logic.
The first sysex message will be discarded: it is only used to form the "checksum" in the second message, which is not actually used as a checksum but as the MSB of the LFO amt.
The first checksum, in the first sysex msg, is 7F if the pot MSB is 01 and 00 if the pot MSB is 00. The second checksum, in the second sysex msg, is 00 if the pot MSB is 01 and 7f if the pot MSB is 01.
The number 4E is chosen to make sure everything works. It is chosen so that 7f = 4e xor f7 xor f0 xor 18 xor 0c xor 03 xor 61 xor 40.
Figuring out what 4E should be is a bit of a hassle. I'd be interested to hear if anyone has found a better method.