pitch bend reset value

mpvale

2016-11-21 21:49:09

Fab new version of Translator,
I'm having trouble trying to reset an encoder Nprn to pitch bend (14bit) translater:
using this code:

incoming:
B0 1F pp

rules:

Label "qq is the scale"
qq=1
if pp<=41 then Goto "Calc new pitch value"
Label "Turn Left"
qq=0-qq
pp=pp-64
Label "Calc new pitch value"
oo=pp*qq
gp=gp+oo
if gp>8191 then gp=8193
if gp<-8192 then gp=-8192
Label "Calc 7-bit pitch bend values"
pp=gp+8192
rr=pp/128
ss=rr*128
ss=pp-ss

outgoing:
E0 SS RR

the encoder to pitch bend value works great, however I'd like to be able to reset the the gp value to 8192 (maximum pitch bend) with a note on message

any help much appreciated!

trabz

2016-11-23 17:23:48

Hi, what hardware are you using?
Some controllers allow you to modify encoder behavior within the controller editor, and reset encoder is sometimes one of them

florian

2016-12-01 17:56:28

Hi, can't you add a translator like this:

Code: Select all

Translator: Reset Pitch Bend to Max
Incoming: MIDI Note On
Rules:
  gp=8191
Outgoing: MIDI Pitch Bend (bipolar), set value to gp
You can use MIDI Capture for the incoming MIDI action.

Notes:
Starting version 1.8, you can use the Pitch Bend outgoing MIDI action (bipolar mode), entering gp directly as value. Then you can remove all the rules starting with Label "Calc 7-bit pitch bend values".

The rule "if gp>8191 then gp=8193" should say "if gp>8191 then gp=8191".