Mapping controller to pitch bend semitones on a Roland SH01a

hi. The roland sh01a has a pitch bend range of 2 octaves when bender to VCO pitch is set to maximum. I am trying to map an incoming controller to step the pitch bend in exact semitones. I guess I need 0-127 quantizing into 24 steps. I think I have worked out that E0 00 43 is plus 1 semitone. I know there needs to be some clever maths to map the cc range to the pitch steps. You also need to do some stuff to convert it into the low part and the high part of the E0 message. Can anyone help?

I found some code for the RK002 cable and they are using this as a pitchbend step for semitones:

int pstep=16384; //2*8192 pitch bend range + and -, divided by 48 steps

The pitch bend range is 4 octaves. +/- 24 semitones

Hi, and welcome back!

Scaling CC’s and converting to pitch bend could be a bit tricky and I’m not sure exactly how you want to handle it, but I’ve created a translator that should get you started.

You can review this tutorial on scaling.

Here are the rules I created for the translator. The Log entries are just so you can get a better idea on what is happening.

// Scale it, put it into MSB
tt=qq*16384
tt=tt/128

uu=tt>>7
vv=tt&0x7f

Log "Log tt=%tt% %02x uu%H %02x vv%H"
// divide by 24 to get 1 semitone
tt=tt/24
uu=tt>>7
vv=tt&0x7f

Log "Log scaled tt=%tt% %02x uu%H %02x vv%H"

I set up my aliases as follows. You will need to set them up to point to your own physical devices or applications.
image

You can learn more about aliases from this tutorial.

PB-One-Semitone-from-CC.bmtp (1.3 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz