BCR 2000 and negative value in sysex !!

18 posts / 0 new
Last post
lokaz
lokaz's picture
BCR 2000 and negative value in sysex !!

Hello everyone, I introduce myself my name is Julian, I live in France and it's been a few months since I started in the world of sysex, being lost in the middle I acquired a BCR 2000 to control all my devices namely my proteus 2000 , my Xtrem Lead and my Roland R8.

I am beginning to understand how sysex works only I have a problem for negative values!

Currently I want to control the transpose master of my proteus 2000 and here is what the manual says:

MASTER_TRANSPOSE  id=259 (03h,02h) min = -12 ; max = +12

C = -12    C# = +1

C# = -11    D = +2

D = -10    D# = +3

D# = -9    E = +4   

E = -8 F = +5

F = -7    F# = +6

F# = -6    G = +7

G = -5    G# = +8

G# = -4    A = +9

A = -3    A# = +10

A# = -2    B = +11

B = -1    C = +12

off (C) = 0

 

Well I confess I did not understand why they put notes that correspond to a value! It's not clear to me! maybe you could explain to me? For my part here is the sysex code that I put on an encoder and that allows me to go from 0 to +24 semitones on my Proteus 2000:

F0 18 0F 00 55 01 02 03 02 val1.7 val8.11 F7

 

Now I try to do the opposite, go from 0 to -24 semitones but nothing to do, I tried a lot of combinations, nothing to do, can be particular values ​​to go somewhere? I'm lost, if you could help me or point me on this point I would be very happy, thank you very much to the community :)

 

Julian

 

Mark van den Berg
Mark van den Berg's picture

Hi Julian,

First a minor point of criticism: it would have helped if you had been more precise about "the manual" of the Proteus 2000 (or even provided a download link): it took me about ten minutes to find the right one, namely "Proteus Family [...] System Exclusive Specification Version 2.2":
http://www.cyborgstudio.com/synthmp3s/emu/px7/manual/px7systemexclusivespecification2_2.pdf

Anyway, on p. 82 this document explains how negative numbers must be encoded in Proteus SysEx messages:

If the data value is negative, you must first take the 2's complement of the
number: In the case of a 14-bit number this is equivalent to adding 16384
to the original negative value.

To fit the 7-bit MIDI protocol, numbers must be “nibble-ized”.

[...]

To get the 14-bit nibble-ized value (of a positive value or a 2's
complemented negative value):
msb = value DIV 128 (divide and ignore the remainder)
lsb = value MOD 128 (divide and use only the remainder)

So for instance the minimum value of MASTER_TRANSPOSE, -12, translates to -12+16384 = 16372.
The Proteus SysEx message format requires you to send this value as two 7-bit bytes (first the LSB, then the MSB), where bit 7 (the most-significant bit) of each byte isn't used (i.e. is 0).
So 16372 must be sent as $74 $7F. (You can use the MIDI data calculator window of BC Manager or MIDI Tools to calculate these values - that's what I did.)
So the full SysEx message is F0 18 0F 00 55 01 02 03 02 74 7F F7. (You may want to try this to see if it works.)

Unfortunately the BCF2000 and BCR2000 don't allow negative range limits. This is a well-known problem, for which people have come up with various work-arounds, depending on the situation.
In any case a range with 16372 ("-12") as the minimum and 12 as the maximum doesn't have the right result: turning the encoder clockwise you then go from 16372, 16371, 16370 all the way down to 14, 13, 12.
So I'm not sure whether there's a satisfactory way to work around your specific problem.
Obviously you could "simply" define the full 14-bit range of 0 to 16383 and put "val0.6 val7.13" in the SysEx message definition, but you would then have to keep turning the encoder for an eternity to get from the positive transposition subrange (0...+12) to the negative subrange (-12...-1, i.e. 16372...16383).

Hopefully this has clarified things a bit - pun not intended smiley

Mark.
 

lokaz
lokaz's picture

Hi Mark,

It is true that I should have put you a link to the documentation please excuse me, yes I read this part on page 82 without understanding too much, please excuse me I really start in this world and this is very complicated for me ^^ I will already test what you told me and do several tests, I will re-read this documentation and try to find a trick or a workaround !

 

In any case thank you for giving me such a precise answer that enlighten me for the future, I'll keep you informed of my developments on my project! please excuse me for the lack of details as I told you I start in the world of sysex and I still have plenty to learn, but a very exciting environment to multiply the possibilities in live! thank you :)

 

 

lokaz
lokaz's picture

Ok Mark, your solution works perfectly indeed by inserting this code I can go from -12 to -1 (F0 18 0F 00 55 01 02 03 02 val0.6 val7.13), I put the value 1 to 16372 and value 2 at 16383, everything is ok!

Now that I know the methods to make positive and negative, the problem is how to trick so that everything is on a single encoder! Hoping that maybe other members answer me, I will continue to search the forum and see if I find a trick, if anyone else to a trick I'm a taker! Mark again thank you very much yessmiley

sams
sams's picture

Hi Lokaz. I found a trick to control the Emu negative numbers via the BC2000. As you requested, I can turn a knob on my BCR2000 and the transpose on my Morpheus goes from -12..-11.. to +12 without any jumps or gaps. The idea is to use the BC2000 checksum feature, not because you actually want a checksum, but because it lets you do some very simple logical operations. 

I incorporated this trick into an ini file for Mark's nice BC utility that works with my Emu Morpheus. I only did the per instrument parameters (including transpose) but I expect you could do the master transpose in a similar way. I would expect the Morpheus sysex to be very similar to the Proteus sysex. 

My file is called MorpheusMixedSign.ini, in Mark's user files section https://mountainutilities.eu/userfiles/b-control/4713

I can explain more if you like, but maybe this is enough to get you going. 

 

lokaz
lokaz's picture

Hello Sams, ok but that's great! yes I think it must be similar, I'll look at it in detail, I'll look at your file and analyze it to seesmiley

 

If I do not find it yes I want help, I'll let you know Oui

lokaz
lokaz's picture

Hello sams, good I confess that I got a little lost ........ I analyzed your file with "Notepad ++" and I understand that you declare at the top the device in question, but the rest I can not understand everything! How do you assign these instructions to your encoders? There are a lot of points that I can not understand! Excuse me for my misunderstanding, the devellopement is not easy for me ^^

sams
sams's picture

Hi, the ini file is for BC Manager. When you are laying out your knobs in BC manager, you can choose to insert a sysex parameter. Then, press "open" (third from left?) to show the folder where all the ini files are. There should be a-880 ini files etc already there. This is where you should put your ini files, and then you will be able to map all the parameters to your encoders. I find this quite a handy way of quickly mapping out different layouts.

In this post on the yahoo group I first tried to explain the idea of using checksums to encode negative numbers: 

https://groups.yahoo.com/neo/groups/bc2000/conversations/messages/5513

If I get time later I will have a go at working out a string of codes for master transpose. 

lokaz
lokaz's picture

ok this is great !! But I just tried with several different codes, it does not work: /

Here is the code I inserted:

$ F0 $ 7D val7.13 cks-1 2 $ 4E val0.6 $ F7 $ F0 $ 18 $ 0F $ 00 $ 55 $ 01 $ 02 $ 03 $ 02 val0.6 cks-3 $ 3 F7

I put the value 1 to 0 and the value 2 to 48 ...

but to be honest I understood what you want to do with this type of code but it is the format that I have trouble! decidedly XD

lokaz
lokaz's picture

 

Good I admit to being in a stalemate .....

lokaz
lokaz's picture

 

With your method sweeping my knob I go from -24 to +24 at once at a time! weird

sams
sams's picture

Hi, I don't have a Proteus 2000 and the sysex is a bit different so I can't test it myself.

However, I used the following string:

$F0 $7D $00 $00 val7.13 $7F cks-2 2 val0.6 $10 $55 $01 $02 $03 $02 $F7 $F0 $18 $0F $00 $55 $01 $02 $03 $02 val0.6 cks-3 6 $F7 $F7

with Value 1 as 116 and Value 2 as 140 (decimal). (These numbers are 12 either side of 127.) 

This generates 

F0 18 0F 00 55 01 02 03 02 74 7F F7

at the lower end through to

F0 18 0F 00 55 01 02 03 02 0C 00 F7

at the top end. Hope that is roughly what you need? Maybe I am out by 1.

By the way, I designed the code string above so that hopefully you can easily modify it to change a different parameter -- you should just need to change the parameter choice and instruction (55 01 02 03 02) which appears twice in the string. 

lokaz
lokaz's picture

wAHOOO !!!!!

lokaz
lokaz's picture

 

Well I will quietly analyze your code and really try to understand all the details but it works! it goes from -12 to +12 semitones but hey it works anyway, the logic is! A big thank you sams, you are fromidable, so you take me a thorn! now I really have to understand what I'm doing when I apply this code! The sysex is really full of mysteries !!

lokaz
lokaz's picture

 

So as it is in Semitones on the proteus I had to change the value 1 to 102 and value 2 to 152, it works perfectly from -24 to +24! I do not know how to thank you but thanks to this logic I will be able to advance on the rest !! Thank you again Sams, I would be happy to have your advice and tips on the world of sysex!

sams
sams's picture

Great! Glad to hear it worked. It's gratifying when you get it to work, isn't it!

Do upload your results to the user files section in case any one else has a Proteus + BC!

 

lokaz
lokaz's picture

 

Ah, but of course, already I will be able to advance on the other points to controller, but already know how to do the negative and positive will help me a lot !! It is obvious that once I have a nice little template yes I would post it here without problems, anyway I still have not finished my story with this controller and I would not hesitate to solicit you again, great thank you to you and the creator of this software :

lokaz
lokaz's picture

 

But I think that I will put some time even before finishing to put in place all the controls of this series proteus ^^ in any case once finished I would benefit the community and also a forum in France where I am very active ;)