nic
Soapbox Supremo  
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Jul 21, 2019 8:29:37 GMT
This script converts a pitchbend lever to two CCs. Move the lever down to move the 'down' CC between 0 and 127. Move the lever up to move the 'up' CC between 0 and 127.
The pitchbend channel, up and down CCs are determined by the values set inside the IF LOAD clause (variables K0, K1 and K3)
# pitchbend to 2 CCs # by audeonic IF LOAD ASS K0 = E0 # pitchbend+ch1 ASS K1 = B0 0F # CC up, 15+ch1 ASS K3 = B0 10 # CC dn, 16+ch1 END
IF M0 == K0 # convert to 14 bit into I0 MAT I0 = M2 * 80 MAT I0 = I0 + M1
# centre IF I0 == 2000 SND K1 K2 00 SND K3 K4 00 END
# up IF I0 > 2000 MAT I1 = I0 - 2000 MAT I1 = I1 / 40 SND K1 K2 I1 END
# down IF I0 < 2000 MAT I1 = 2000 - I0 MAT I1 = I1 / 40 SND K3 K4 I1 END
# block pitchbend XX = XX +B END
|
|