RC300- Here's how to slave the RC-300's Tempo to (some) external sources

Started by Zymos, January 10, 2013, 06:14:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sandrine

I just played with one of these over at a friends the other day, and I really like it! But it wouldn't sync to my MIDI sequencer over there so trying to solve  the mystery brought me here..

As I am now considering purchasing one of these fun machines, I thought I'd post some info on how the RC300 really works with it's sysex messages based on my (extensive) MIDI knowledge and what I read in this thread.

Because all of these values are contained within a Sysex (F0...F7) the top bit 7 cannot be set. So all data must omit the top bit by shifting the more significant byte down one to solve for the total value. In hex (if you're not accustomed to it) it's a bit harder to comprehend, but in binary it's simple:
The highest possible value inside a sysex (with 2 bytes) is 7f 7f. To calculate the actual value, convert into binary:
0111 1111  0111 1111.  Now shift the MSbyte 1 to the right gives 0011 1111  with a carry of 1 which will set bit 7 of the lower byte to make the value 0011 1111  1111 1111. In Hex this translates into 3FFF   which is decimal 16,383. That's the highest number possible with 2 bytes.

So applying this to the readings provided by ShawnB:

4/4 time, 1 measure:   x0300   = 03>>1 = 01 carry 1 =80  = x180 = .384   /24=16  so 16 1/16th notes ..or 4 1/4 notes
  4/4 time, 2 measures:  x0600   = 06>>1 = 03 no carry =0300 = .768  /24=32 so 32 1/16 notes
  4/4 time, 5 measures:  x0F00   = 0F>>1 =07 carry 1 =x780 = .1920  /24=80 so 80 1/16 notes ..or 20 1/4 notes
  4/4 time, 8 measures:  x1800      
  2/4 time, 2 measures:  x0300
  2/4 time, 4 measures:  x0600
  15/8 time, 1 measure:  x0550   =05>>1 =02 carry 1 =x02D0 (carry 1 is 80 +50 = D0) = .720  /24 =30 so 30 1/16 notes or 15 1/8 notes
  15/8 time, 3 measures: x1070

So on that note (pun intended!) the tempo can be calculated the same way. It appears the tempos are simply 1/10th BPM representations

"When you vary the tempo, this is what the RC300 puts on the bus:"
  81.0 BPM:    x062A      06>>1 =03 no carry  = x32A = 810. 810 * 1/10 = 81.0 BPM
  81.1 BPM:    x062B      06>>1 = 03 no carry = x32B = 811 = 81.1 BPM
  90.0 BPM:    x0704      07>>1 = 03 with carry = x384 = 900 = 90.0 BPM
  120.0 BPM:  x0930      09>>1 = 04 with carry =x04B0 (80+30=B0) = 1200 = 120.0 BPM
  235.0 BPM:  x122E
  239.9 BPM:  x125F      12>>1 = 09 no carry =095F = 2399 = 239.9 BPM

I find it odd that the RC300 would use values for the display rather than a timing value to time the spaces between each 1/16 note or 24 clocks. To get 24 clocks/quarter simply use (for per 1/4) 60,000/BPM  then for 1/24 spacing divide that by 24.
To just get timespace between MIDI F8's (MIDI Clocks) in uS use 2,500,000/BPM so 2,500,000/120.0BPM = 20,833 uS/clock.

To go the other way and create a Sysex tempo message for the RC300 take the BPM and multiply by 10, convert to Hex then left shift the upper byte and top bit of the lower byte. i.e. 90.0 BPM = 900 decimal, in hex is 0x0384. In binary
0000 0011  1000 0100, <<1 top byte : 0000 0110  get top bit of low byte =1, so
set lowest bit of top byte and clear bit 7 of lower byte = 0000 0111  0000 0100 = 0x704

The way I would do this (and will if I get an RC300) is to use an Arduino (with MIDI shield) and have it read incoming MIDI clock messages, play/stop messages and whatever else the RC300 likes, then do the conversion as above, and send the messages to the RC300. This would be effectively a "black box" with a MIDI in, MIDI through, RC300 MIDI out.

From what I have gathered in this thread I'm not sure if the sysex messages are constantly updated every beat or just occasionally but monitoring the Master output with a software like MIDI OX or the other one mentioned would reveal all.

I hope I have helped a few people out there!

shawnb

I think you got it!   That drove me nuts.  I knew it was doing something in 1/10ths of digits, but couldn't figure out the rotation.  Good stuff!
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb

For the record, I've confirmed the above works.   Here is another way of looking at the calcs, using DIV & MOD instead of rotation!

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Sandrine

Wow it's been over a year!
Someone emailed me about this and thought I'd have a look, glad to see it worked!
I never had the chance to test it (I don't think) so good to know. I'll have to tell buddy once he's back on the island :)