Hi Dermot,
this is quite a complex MIDI Translator project! Not really suitable for learning how to use MT Pro... It's somewhat difficult for me, too, to understand what exactly is going on (also considering that I don't know Davinci and don't have a Twister here).
What I can see in the preset "COLOR KNOBS", assuming you turn knob 1 (C01) by one notch:
- the incoming MIDI message will first trigger [2]Contrast_C01. In the Rules section, it will set the variable g0 to 1 (probably meaning: "mouse positioned"). And do some other logic with ga which I don't know what it serves.
- The same MIDI message from the knob will also trigger [22]MouseRight and [23]MouseLeft, but the Rules prevent them from being executed, because g0 is set to 1.
- Now that same MIDI message will trigger [24]LeftClick. In the Rules, it will set g0 to 2 (I guess "mouse button down") and execute the outgoing action: press down the left mouse button (at the current mouse position). Btw, I believe there is a small bug here.*)
- Now the MIDI message reaches [25]ClickTimer. Because g0 is 2, it will set gb to 1 (I guess meaning "timer started") in the Rules and then start a timer "Mouse Up" which will fire in 175ms.
- [26]KillTimer will set gb to 2.
- [27]ClickTimer is not executed because gb equals 2.
Now turning that knob to the right, it will execute [22]MouseRight, dragging the mouse 2 pixels to the right. It says "mouse move", but the mouse button is already pressed from step 3 above. Translator [25] will refresh the timer, so it starts another 175ms period. Turning the knob in the other direction will trigger [23]MouseLeft.
If you wait for 175ms (i.e. no knob movement for that period), the "Mouse Up" timer will be fired by MIDI Translator Pro, and translator [28]ClickTimer will be executed. It will reset ga and gb to 0, and stop release the left mouse button.
There is some more functionality, e.g. knob 14 will emulate pressing the left and right cursor keys on the computer keyboard.
Now to change the horizontal dragging, I believe it's sufficient to modify [22] (and [23]) to not move 2 (-2) pixels to right (left), but to 2 (-2) in Down/Up direction. Put a 0 into Left/Right direction.
Thanks,
Florian
*) in translator [24], the first IF statement will cause the outgoing action (mouse button press) to be executed whenever g0 is not 1. So whenever you turn a knob by one notch, the mouse button is pressed down again. I believe that the button press should only occur if g0 is 1 (i.e. the mouse has just been positioned). So the Rules section should be this only to prevent double presses:
Code: Select all
if g0!=1 then exit rules, skip Outgoing Action
g0=2
Also, I believe that [26] always eliminates [27]: [26] sets gb to 2, and [27] is not executed if gb is 2. So you can safely remove/disable [27]. Maybe the entire "gb" logic can be removed.
Furthermore, version 1.8 introduced the feature to position the mouse and immediately press down, too (use button click with position). So the preset's logic could be simplified by using this combined outgoing action in the mouse positioning translator [2] to [18] and removing [24].