How to have a knob change function based on turning left or right?

defyurself

2015-12-24 03:19:58

Hi,

I want to make it so when I turn a knob right it triggers the 'down' keystroke, and when I turn it left it triggers the 'up' keystroke. How do I do this?

Right now I have one knob triggers the 'up' keystroke and a separate knob triggers the 'down' keystroke. It just seems like a waste of knobs when I should just be able program both up/down to one knob based on if I turn it left or right.

Thanks ahead! :)

DvlsAdvct

2015-12-24 16:19:40

Hi defyurself

What messages does the knob send? I'd also recommend checking our FAQ Thread for answers.

Thanks
Jared

defyurself

2015-12-24 20:15:02

It sends 'B0 1C pp' and 'B0 1D pp' on each knob where the former is for the 'Up' keystroke and the latter for the 'Down'.

The pp increments from 00-09 then 0A-0F then 10-19 then 1A-1F, etc when turned right. It returns through these same values when turned left.

I checked the FAQ and didn't see anything specific to this situation. Do you have any ideas?

DvlsAdvct

2015-12-24 20:23:00

So it sends two different messages, one for left and one for right. Is it an absolute or endless encoder?

defyurself

2015-12-25 03:44:02

New update- I figured out half the problem using this topic/code: viewtopic.php?t=557

I entered those translators and rules, but now the problem is that these endless encoders behave like absolute encoders.

I wanted them to scroll through long lists by continuing through keystrokes even when hitting the max/min MIDI messages, but with these rules when I've hit 00, I can no longer scroll down, and vice versa with hitting the max MIDI message and up.

How do I make it so I can keep scrolling up or down with my encoders? There is no physical limit to rotating them, so it should work fine, I just need rules that would allow it.

DvlsAdvct

2015-12-28 00:18:50

Look at the log window.

When the encoder reaches 0, does the device continue sending messages to MT Pro?

defyurself

2015-12-28 06:26:37

It actually stops sending messages at 0 or 7F. I'm sort of confused by the message scheme since I imagined it would be from 0 to 127.

I did a dump of the global variables and it looks to still store gv = 1 or gv = -1 at the max or min levels. I guess that means this these encoders are absolute.

Do I have to set them to relative in the device? Is there a way to make this relative in midi translator?

DvlsAdvct

2015-12-28 15:27:02

If the encoder stops sending messages at 0 and 127, and doesn't repeat as you continue turning in that direction, then you need to set it at the device level to Relative. if you can do that, then this process is pretty simple.

defyurself

2015-12-28 20:54:08

Ah, cool, figured it out! I have the MIDI Fighter Twister so I found that I can have it continuously send MIDI messages 63 or 65.
Enc 3FH/41H
The encoder sends relative Control Change messages, a value of 65 is sent for each clockwise step, and a value of 63 is sent for each anti-clockwise step.
So I set gv = 64 - pp, which outputs either gv = -1 or gv = 1. Then I had the same constraints as before where if gv < 0, exit rules and skip outgoing action on "Keystroke: Up" and if gv > 0, exit rules and skip outgoing action on "Keystroke: Down".

Thanks for the advice!

DvlsAdvct

2015-12-28 22:38:57

You can actually do this without rules at all.

Since it only sends one message, just have the two translators use specific incoming messages, 63 and 65, with the different keystrokes as outgoing messages.

You don't need anything more complicated than that.

Jared

defyurself

2015-12-29 01:06:34

Awesome! That's a huge facepalm moment for me, but I'm sure seeing this topic may help someone who has a chain of MIDI messages.

Thanks so much Jared, I really appreciate the help and your patience! Have a happy holiday!