Bc2000 (for the BCF2000 & BCR2000) group photo

Yahoo Groups archive

Bc2000 (for the BCF2000 & BCR2000)

Index last updated: 2026-04-28 23:16 UTC

Thread

negative values with bc-manager

negative values with bc-manager

2015-05-22 by Fer Real

Hi. 
Anyone know Can I set negative values ​​in the sysex variables with bcmanager ? I can not find information in the documentation , this is not possible ?.
For example, I need configure a sysex for parámeter "VCF Freq. by Env 1 Amount", with: 
"$F0H $10H $06H $06H $16H val $F7H" where val is (sign + )7bits value
How I can configure this?

Thanks, greetings

Re: negative values with bc-manager

2015-05-22 by rpcfender@...

Hi
there is a pdf in the files section, SecretBC.pdf that discusses negative numbers.

You can do some negative numbers.

As midi data has to be less than 127 that means it is 7bits only.
If there needs to be a sign bit (bit 6), the the value can only vary from
1 00 0000 to 0 11 1111 or 0 to $3F or -64 to 63

Normally in an 7bit computer subtracting 1 from each line...
63 = 011 1111
..
01 = 000 0001
00 = 000 0000
-01 = 111 1111
-02 = 111 1110
..
-63 = 100 0001
-64 = 100 0000

But you can see there is a big jump between 0 and -1. The BC thinks this is going from 0 to 127 in one step.

But if you could just output bits 0 to 6 you could have bit 7 high in the positive numbers and the you could have a range that made the numbers sequential for the BC to handle. The BC can use 14bit numbers. That is a max range of 0 to $3FFF

63 = 1011 1111 really = 191 ($BF)
..
01 = 1000 0001 = 129
00 = 1000 0000 = 128
-01 = 0111 1111 = 127
-02 = 0111 1110 = 126
..
-63 = 0100 0001 = 65 ($42)
-64 = 0100 0000 = 64 ($40)

So for a range of -63 to 63 set max = 191 ($BF) and min = 66 ($42)

val is the same as val0.6 so bit 7 is removed before it is send as Midi data just as you would want.

If you really need a range of -127 to 127 you can still use this trick but you need an extra bit.

Again normally in an 8bit computer subtracting 1
127= 0111 1111
..
01 = 0000 0001
00 = 0000 0000
-01 = 1111 1111
-02 = 1111 1110
..
-126= 1000 0010
-127= 1000 0001
There is that jump again.

127= 1 0111 1111 (max $17F)
..
01 = 1 0000 0001
00 = 1 0000 0000
-01 = 0 1111 1111
-02 = 0 1111 1110
..
-126= 0 1000 0010
-127= 0 1000 0001 (min $181)
-128= 0 1000 0000 (min $180)

Make the max $17F and the Min $181, but Midi data is 7bits so you need 2 bytes

We have val 0.6 for the lower 7 bits. So we need val7 for bit7, but the BC doesn't have that.
It only has val7.13, but then you would have the extra 'tricky' bit giving the wrong answer.
If your sysex needs 8 bit data values broken up into two 4 bit nibbles then that is possible
val4.7 val0.3
This is the only case for the BC and negative 8bit numbers

All the best
Royce

Re: negative values with bc-manager

2015-05-25 by Fer Real

Hello. Thanks for the reply. Yes, I  need 7bits ( -63 to +63 ) But I do not understand one thing: How can from bc -manager define a field of 14bits ?, If I want to send the following command F0 10 06 (X ) F7 ... What should I put " (X ) " ?,I understand your explanation , but do not understand how to implement it in bc-manager. A greeting.


Re: negative values with bc-manager

2015-05-26 by rpcfender@...

It is mighty confusing.

F0 10 06 (x) F7
turns into BCL (Behringer Conrol Language)
. tx $F0 $10 $06 val $F7

Most if the stuff I was talking about is for the range
.minmax $42 $BF

So for encoder 1 the BCL is

$encoder 1
.mode 1dot
.minmax $42 $BF
.default $42
.resolution 96 96 96 96
.tx.$F0 $10 $06 val $F7

I program in BCL, as above, for the BC gear and not Mark's excellent graphic editor, but I think you just use the 'Custom Output' for the sysex message and set the mode, range (minmax) etc as normal.

Royce

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.