Korg Oasys 76 SysEx and BCR2000

5 posts / 0 new
Last post
JaFre
JaFre's picture
Korg Oasys 76 SysEx and BCR2000

Hi,

I'm trying to program a BCR2000 to control the MS-20EX one of the synths included on Oasys as add-on.

MS-20EX is a faithfull recreation of the well known analog Korg MS-20 and supports SysEx strings for all parameters.

Situation 1: How to implement a "21-bit signed value, MSB first" for val?

Let's take for example Vco1Waveform with 4 possible values (0-3).

I'm having some dificulties building this SysEx string, which is, according the manual:

F0 42 30 68 43 0B 10 00 00 00 <value> F7

 <value> =  vv vv vv: 21-bit signed value, MSB first (valueH valueM valueL)

        valueH                  Value   (bit14-20)   (*4)
        valueM                  Value   (bit7-13)    (*4)
        valueL                   Value   (bit0-6)     (*4)

So i build this string at BCManager 3.0.0 in element dialog box for encoder1, replacing" <value>" with "00 00 val" like this: F0 42 30 68 43 0B 10 00 00 00 00 00 val F7. Also, set minVal=0 and máxVal=3.

It works for now because "Vco1Waveform" parameter only has 4 possible values, but i'm cheating because i'm forcing "valueH" and "valueM"  Bytes to "00" and only the "valueL" receives "val".

So, how to implement a "21-bit signed value, MSB first" for "val" on an encoder?

Cheers,

JaFre

 

Mark van den Berg
Mark van den Berg's picture

Have you looked at section 14.6.1 of BC MIDI Implementation.pdf (included in the BC Manager package)?
This section lists all the BCR's options concerning bit segments.
As you can see, the BCR internally works with 14-bit values, so you'll never be able to output a "regular" 21-bit value (let alone a signed one - the BCR is notoriously bad at handling signed values anyway).
However, I doubt that you'll ever need the full 21-bit resolution, so depending on the parameter at hand you can mask off either the Korg's most significant 7 bits (0 val7.13 val0.6) or its least significant 7 bits (val7.13 val0.6 0).
(Note that val and val0.6 are equivalent.)

Hope this helps,
Mark.

JaFre
JaFre's picture

Hey Mark,

Thanks for your help on this...

Ok... Let's take the worst case cenario and take as example  "TransposeAMSIntensity",

and its range from -4800  to  4800.

So, it should only take 2 Bytes to encode this range... form "$ED $40" (-4800) to "$12 $C0" (4800),  right?

Following this format:            F0 42 30 68 43 0B 10 00 00 00 <value> F7

<value> =  vv vv vv: 21-bit signed value, MSB first (valueH valueM valueL)

         valueH                  Value   (bit14-20)  *we don't have, so => "$00"
         valueM                  Value   (bit7-13)    *we have, so => "val7.13"
         valueL                   Value   (bit0-6)      *we have, so => "val7.13"

Could the string be like this:  F0 42 30 68 43 0B 10 00 00 00   $00  val7.13  val0.6   F7  ???

Also, how to set minVal  and  máxVal ?!   As minVal=0 and máxVal=9600 ?!

Cheers,

JaFre

Mark van den Berg
Mark van den Berg's picture

"So, it should only take 2 Bytes to encode this range... form "$ED $40" (-4800) to "$12 $C0" (4800),  right?"

Bit 7 of each MIDI data byte isn't used (because it must be 0), so 4800 isn't represented as $00 $12 $C0 but as $00 $25 $40 (as the MIDI data calculator window in BC Manager or MIDI Tools will tell you).

And if (as seems likely) the Korg uses the standard two's complement system, the representations of negative values have their highest bit (in the Korg's case bit 20) set to 1. (Does the Korg's manual say anything about this?)
If this is the case, -4800 is represented as $200000-4800 = $1FED40, which in MIDI data byte form is $7F $5A $40; so valueH is not $00 here, but $7F.

As I wrote in my previous post, the BCR can't handle negative values well. So you'll have to resort to "weird tricks" to get a more or less working solution.
This particular case is indeed something like a "worst case scenario": if my above interpretation of the Korg's representation scheme is correct, you can only make a BCR encoder send $7F for valueH in val7.13 val0.6 0 if you allow the full range (min=0, max=16383). Or you could use a 7-bit range with min=0 and max=127 with val 0 0. But in either case you get a clumsy encoder, with a big dysfunctional mid-range.

Mark.

JaFre
JaFre's picture

Hi,

Sorry, must make a correction to my last reply...and don't know how to edit it...

In this block:

<value> =  vv vv vv: 21-bit signed value, MSB first (valueH valueM valueL)

         valueH                  Value   (bit14-20)  *we don't have, so => "$00"
          valueM                  Value   (bit7-13)    *we have, so => "val7.13"
          valueL                   Value   (bit0-6)      *we have, so => "val7.13"

when i say:   valueL       Value   (bit0-6)      *we have, so => "val7.13" ........

...... it should be:  valueL       Value   (bit0-6)      *we have, so => "val0.6"

Cheers,

JaFre