Bc2000 (for the BCF2000 & BCR2000) group photo

Yahoo Groups archive

Bc2000 (for the BCF2000 & BCR2000)

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

Message

Re: Script Editor - Appreciate your advice

2010-12-23 by Mark

--- In bc2000@yahoogroups.com, "gil.brand33" <gil.brand33@...> wrote:
> Regarding the usage of "val" in a ".tx" command:
> I want to configure an encoder to send values of 30-250:
> $encoder 1
> .minmax 30 250
> .default 60
> .tx $F0 $01 $20 $01 $2A $42 <val> $F7
> .resolution 96 96 96 96
> .showvalue on
> .mode bar
> 
> For my synth, "val" here should be 2-Byte long, for example:
> If decimal value is 49 --> hex value is x31 and the ".tx" line (after splitting
> MSB & LSB), should actually be:
> 
> .tx $F0 $01 $20 $01 $2A $42 $01 $03 $F7
> 
 
> For value of 164, which in hex is xA4, same line should be:
> 
> .tx $F0 $01 $20 $01 $2A $42 $04 $0A $F7
> 
> So, I need to split the "val" nibbles (val[0:7] and val[8:15]) and "pad" them with "zeroes"...
>

If I understand your intention correctly, you want to send the enocder value's bits 0-3 ("low nibble") as bits 0-3 of the first byte, and its bits 4-7 ("high nibble") as bits 0-3 of the second byte, with in both cases the output byte's bits 4-7 being 0.

> Would the following syntax work:
> .tx $F0 $01 $20 $01 $2A $42 $0val0.7 $0val8.15 $F7

I've never tried this, but I can't imagine that these concatenations of $0 plus "val..." work.
In any case you can't use "val0.7" or "val8.15"; these identifiers simply don't exist in BCL. (See BCMI section 14.6.1.)

Instead, try this:
.tx $F0 $01 $20 $01 $2A $42 val0.3 val4.7 $F7
Doesn't this achieve exactly what you want?

Hope this helps,
Mark.

Attachments

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.