Endless Detented Rotary Encoder

Polly

2012-11-09 12:39:54

Hi,

I'm new here and to MT in general and I'm having a few confusing problems.

I'm trying to get MT to control a pot on an audio plug-in from my midi controller using an endless detented rotary encoder but whatever rules I try to use I just get erratic behaviour from the plug-in (the pot on the plug-in tends to jump from 0 to 127 as I turn the encoder).
I have looked through other posts on the forum but have yet to find anything suitable.
The midi message sent out from the encoder is B0 5A 00 and is the same whether turned clockwise or anti clockwise.
The message is also duplicated when I turn the encoder which I assume is due to the detents on the encoder.
I have tried rules such as ga=ga+1, IF ga>127 THEN ga=127, ga=ga-1, IF ga<0 THEN ga=0. (OUTGOING: B0 5A ga) but with no success.
Ideally I want the rules to increment the pot on the plug-in by 1 as it is turned clockwise and decrease by 1 as it is turned anti clockwise.
Is this possible or can anybody offer any help ?
Thanks

DvlsAdvct

2012-11-09 18:47:35

If the encoder sends a 00 message when turned both ways than it won't work. But I'm not sure it does that.

You should create two translators, one for up (clockwise) and one for down (counterclockwise). OR you could put it in one translator using rules. We'll go with one translator.

Code: Select all

Translator 1: Endless to Absolute
Incoming Message: B0 5A pp
Rules: if pp==0 then Goto "Down"
if pp==127 then Goto "Up"
Label "Down"
ga=ga-1
if ga<0 then ga=0
Label "Up"
ga=ga+1
if ga>127 then ga=127
Outgoing Message: B0 5a ga
When in the Incoming Message screen you should select Capture and turn the knob left and right once. That should give you B0 5A pp. Make sure the command is 00 and 7F, or the pp values will have to change in the rules.

If it sends 00 in both directions then there's nothing we can really do.