|
Post by resistorman on Feb 14, 2020 22:49:24 GMT
Hi there. I have a Hydrasynth that I play with a Linnstrument. In mpe mode, it defaults to a pitch bend of 48 half steps, which can't be changed, at least for now. I also use the Spectrum Resonator, usually in Aum, which has a pitch bend range of 12 half steps that also can't be changed. Is there a script to, say, divide the incoming pitch range by 4 so I can play them together?
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Feb 16, 2020 15:22:20 GMT
Hi resistorman , Here's how to divide pitchbend by 4: if MT == E0 # convert 14 bit to P0 calc P0 = M2 * 80 calc P0 = P0 + M1
# divide P0 by 4 calc P0 = P0 / $4
# convert P0 to 14 bit calc M2 = P0 / 80 calc M1 = P0 & 7F endRegards, Nic.
|
|
|
Post by resistorman on Feb 17, 2020 20:25:11 GMT
WOW! Thanks Nic!
|
|
|
Post by resistorman on Mar 23, 2020 0:08:56 GMT
Well, it's been a while and much has changed! Now that I'm in isolation, I'd like to get back to this problem. I realized that I unintuitively need to multiply the input. So I change this line from
calc P0 = P0 / $4
to:
calc P0 = P0 * $4
right?
It's not really working, though I am seeing different data in and out.
|
|
nic
Soapbox Supremo
Troublemaker
Press any key to continue
Posts: 2,011
|
Post by nic on Mar 29, 2020 12:27:10 GMT
Hi resistorman , I think your change is correct, but a couple of things to think about: 1. If the incoming pitchbend is > 2048, it's going to overflow 2. this only works for positive pitchbend. Different code is needed to convert 14 bit pitchbend to +/- and then back to 14 bit pitchbend Regards, Nic.
|
|