Getting started with BCL

3 posts / 0 new
Last post
John Allsup
John Allsup's picture
Getting started with BCL

I only recently discovered this site and forum. I've had a BCR lying around for ages and have only started to use it.

I've tried to follow the manual, but I'm doing something wrong, and one thing I find lacking is a complete example of a sysex to do something simple like change an encoder.

My current exercise is to switch all encoders to relative-1 mode. I'd welcome an example of sysex bytes as hex to set a single encoder to relative-1 mode.

Things I'm not clear on.

Do you need to send separate lines in separate packets each with an index? (this seems to do nothing)
or do I send it all as a single packet with index 0? (this seems to give Err 15)
Are BCL lines delimited by newlines? 

I would appreciate if someone could explain the exact hex needed to e.g. change encoder 1 to send CC 23 in relative-1 mode?

My overall plan it to make my BCR as dumb as possible, so that it tells the computer what buttons have been pressed, and which encoders have been turned by how much, and nothing else. The idea from then is to use something like pure data/max to make everything else 'software defined'.

My third attempt, having re-read a little, included more information in the $encoder packet

$encoder 1
.easypar CC 1 2 0 127 relative-1
.showvalue on
.mode 1dot
.resolution 1
.default 0

The BCR replied with

F0 002032 00 15 21 0000 00 F7
F0 002032 00 15 21 0001 0E F7
F0 002032 00 15 21 0002 00 F7

My second attempt was sending each line as a separate packet (spaces added for clarity)

F0 002032 7F 7F 20 0000 247265762052 F7
F0 002032 7F 7F 20 0001 24656e636f64657220310a20202e6561737970617220434320312024313020302031302072656c61746976652d31 F7
F0 002032 7F 7F 20 0002 24656e64 F7

where the text in the middle line is

$encoder 1
.easypar CC 1 $10 0 10 relative-1

My first attempt, resulting in an Err 15, was trying to send it all as a single packet (again whitespace added for clarity)

F0 002032 7F 7F 20 0000
2472657620520a24656e636f64657220310a20202e6561737970617220434320312024313020302031302072656c61746976652d310a24656e64
F7

where the text is

$rev R
$encoder 1
.easypar CC 1 $10 0 10 relative-1
$end

John Allsup
John Allsup's picture

I think I have it figured now. I switched over to my Windows laptop so I could run BCR Manager. I noticed that its save files are literally just (importantly valid) BCL. So then I converted it to a .syx which I could send to the BCR with success, then converted the .syx to hex, threw it into vim and dissected it.

So, what I didn't get from the BC Midi Implementation document was that:
1. each thing, (e.g. $encoder, or .easypar etc.) goes on its own line; and
2. each line gets its own sysex, with the index one higher than the one before.
With this in mind, I'm going to have another play and write a few simple python scripts to generate sysex files. (Then, for example, reconfiguring all the encoders at once is a case of a short for loop, rather than hundreds of clicks.)

Mark van den Berg
Mark van den Berg's picture

I think I have it figured now. I switched over to my Windows laptop so I could run BCR Manager. I noticed that its save files are literally just (importantly valid) BCL. So then I converted it to a .syx which I could send to the BCR with success, then converted the .syx to hex, threw it into vim and dissected it.

[...]

 With this in mind, I'm going to have another play and write a few simple python scripts to generate sysex files.

Two points:

  1. BC Manager can send/receive BCL directly to/from the BCR via MIDI. So in principle you don't need to work with files as intermediaries.
  2. To use BC Manager to save BCL data to a bcr file, then convert that to a syx file "manually" (via Python or whatever) is needlessly complicated: BC Manager can save BCL data to a syx file directly. For full discussion, see under "File->Save As.." in section 10 ("The B-Controls window") of the BC Manager manual.

(Then, for example, reconfiguring all the encoders at once is a case of a short for loop, rather than hundreds of clicks.)

BC Manager provides very powerful bulk-editing facilities via the "Parameter" pull-down menu of the button/encoder list windows. For some explanation, see "Setting up individual elements (buttons, encoders and faders)" in section 7 ("Tutorials") of the BC Manager manual. Also see questions 11 and 12 in section 34 ("Frequently asked questions").

Hope this helps,
   Mark.