Dewey
2016-11-16 01:48:24
Hi All, I've been using MTP for a couple years to control MA2 OnPC with an APC40 using a project file I got from someone else. Recently I got in and started poking around with the code to try to customize some things and make a few tweaks.
I have a couple more ambitious long term things I'd like to do with the backlit buttons which I'm finding a lot of good references in other threads to get me going down that path, so I'd like to first thank the forum for all the great info that is already out there!
The first little thing I'm trying to do is get the "Cue Level" knob to control an executor fader, but the knob is set up as an endless encoder (proper term?) only sending one midi command each for clockwise and ccw turns (B0 2F 01 and B0 2F 7F respectively).
So I got the basic functionality down with this simple code
The encoder is a little jittery and sometimes sends 02 or 7E as stray velocities so the <5 >5 is just to clean that up.
So as you probably can guess, the problem I have now is that the encoder doesn't stop at the "top" (velocity 174?) or the bottom. If I overshoot going up, the executor jumps back down to the bottom and the encoder and executor get out of syncc.
I've tried adding rule: if gb>174 then gb=174 thinking that should stop the when it reaches the top which does not work.
Any suggestions would be greatly appreciated! Thanks
I have a couple more ambitious long term things I'd like to do with the backlit buttons which I'm finding a lot of good references in other threads to get me going down that path, so I'd like to first thank the forum for all the great info that is already out there!
The first little thing I'm trying to do is get the "Cue Level" knob to control an executor fader, but the knob is set up as an endless encoder (proper term?) only sending one midi command each for clockwise and ccw turns (B0 2F 01 and B0 2F 7F respectively).
So I got the basic functionality down with this simple code
Code: Select all
[x] Translator 3.23: Cue Level
Options: swallow
Incoming: MIDI B0 2F ga
Rules:
if ga<5 then gb=gb+1
if ga>5 then gb=gb-1
Outgoing: MIDI 90 14 gb
So as you probably can guess, the problem I have now is that the encoder doesn't stop at the "top" (velocity 174?) or the bottom. If I overshoot going up, the executor jumps back down to the bottom and the encoder and executor get out of syncc.
I've tried adding rule: if gb>174 then gb=174 thinking that should stop the when it reaches the top which does not work.
Any suggestions would be greatly appreciated! Thanks