Convert MIDI to Mouse movement

dermot shane

2015-09-09 18:04:59

will Bome work as translator to convert MIDI values to mouse movement?

i would like to get the djtechtools midi-fighter-twister to control a color gradeing program called Davinci Resolve, dedicated knobs for a function ie; page called primaires has 9 sliders for red / green / blue / shadows / mids / highlights, these are locked to x/y cordnates in the UI so are mappable mouse strokes
the other intended use is the LOG page where i would map YRGB off-set, contrast / pivot / saturation, to fill out the 16 knobs, again locked Ui with stable x/y values

is this possiable?

i know nothing squared about MIDI... i'm a colorist / finishing artist so be kind!

and thanks!

Dermot

DvlsAdvct

2015-09-10 15:30:57

Hi Dermot

Yes, MT Pro can translate MIDI to mouse movements.

There is an outgoing action dedicated to Mouse Movement, and another to mouse clicks.

We can help walk you through the set up when you are ready
Thanks
Jared

dermot shane

2015-11-27 06:57:03

thank you Jared

i have been busy finishing films, but am looking forward to a bit of a break over Christmas... i just ordered the DJ twister today, will get Bome downloaded over the weekend, and will start the experments!

Tony Hulten

2016-03-25 11:19:08

Im also VERY interested in doing this but have little knowledge of how to proceed.

Is there tutorials on mouse movements and keyboard strokes anywhere to be found?

Im trying to emulate this exact function:

https://youtu.be/UdEOO6F-JuI?t=47s

dermot shane

2016-03-25 16:04:15

Thanks Tony!

i have found i lack the basic understanding of the words used in programing a midi controler, without this foundation the limited material i can find is pretty useless given the lack of context for the words used...

if someone could point me to a very VERY basic walk through of the software, that would be appreacated

and it seems what i am wanting the software to do, is something that is just not covered, most everything i can find focuses on taking midi commands from a midi controler and mapping to a midi-aware software
what i want (and i am assumeing what Tony also wants) is a tutorial on mapping a midi controler to mouse movements on a fixed UI

Any help would be appreacated

DvlsAdvct

2016-03-25 19:54:05

Hi guys

What that video is showing can be done in MT Pro, but it requires me to have a better understanding on how the app works and how the mouse interacts. What I can already pick out is:

Turn the knob
Mouse moves to a predefined location

Is it clicking an up/down arrow really fast, or is it dragging in a specific direction?

Give me a better idea of what you're trying to do. :)

thanks
J

Tony Hulten

2016-03-26 00:22:10

Hi DvisAdvct!

Thanks for the fast reply.

Here is another video that might help: https://youtu.be/tVbcgDaHh8w?t=3m20s

The buttons on the side switches the mode on the midi controller so that the knobs/buttons have different purpose, but the buttons on the side also navigates and clicks so that the appropriate layout/window is presented for your purpose. You can see this exactly at 4.29 when he says "bank 2" and uses his left hand to press the buttons on the left side of the unit.

But in general I think its something like this:
You turn a knob and it goes to certain x/y positions with the mouse and clicks and holds button and then drag mouse either left/right or up/down (depending on what you programmed it to do when you turn the knob) and I think it releases when you stop turning the knob for a certain amount of time to go back to the start x/y position.
I need the knobs to be able to take a beating like he says in the next video. To turn the knobs back and forth and and react in a responsive manner.
(https://youtu.be/UdEOO6F-JuI?t=39s)
Here you can see in the beginning that its not responsive when it says version 1.0 in upper left corner, and then at 0:48 the responsiveness it greatly improved (it now says version 1.1 in the upper left corner)

Like he said in the video there is a threshold in which the knobs react when you reach a certain degree of turning to avoid accidents by the lightest of touch.

I dont know if I am making any sense at all, please let me know if there is anyway I can provide something more useful for you as I am set out to make this happen :D
Thank you for spreading any light on the subject!

Cheers

dermot shane

2016-03-26 04:12:27

Thanks DvlsAdvct!

i very much want this to work as well, although my goals/ wants are more modest than the scope of Tony's i belive, we overlap in area's, but i'm interested in a sub-set of the functions Tony is looking at.

i have a Euphonix color & transport surfaces, and Pi Engeneering's XKeys already, and am looking to suplement the weaklinks, so i have less functions i wish to address, but the desire to have the user feedback interactive is the same.

thanks again for lending an ear

DvlsAdvct

2016-03-26 21:54:37

Alright, so mapping the mouse can be a little complicated. and there's a LOT for us to look at to make even simple layouts of this work. But what you are both looking to do should be doable. As far as the accuracy showed in that video, well, that might end up requiring a lot of math, so let's see how close we can get.

First, do the devices you use have touch sensitivity for their knobs? If not that's fine, it just requires a bit more work.

Second, I'm assuming your encoders are endless, but what messages do they send? Are they just 3F and 41 in each direction? Are they 01 and 7F? Do they adjust based on how hard to push them?

Third, what is both of your comfort with MT Pro?

Thanks
Jared

dermot shane

2016-03-26 23:33:26

for me it's a DJ tools fighter / twister, same device as in the video

1 - the encoders are endless according to DJtools
2 - do not know about it's touch sensitivity, and not sure how to find this out
3 - do not know what it sends out and i have no context for the values of 3f/41/01/7f, so not sure how to find this out
4 - do not know if they adjust based upon how hard they are pushed
5 - i have no background or comfort level with MT Pro

i can ask DJTools the questions 2/3/4 as they are a good resource, very helpful

dermot shane

2016-03-27 00:07:54

reading the manual, i noticed that we can program mouse wheel up/down, the vertical sliders in Resolve's UI can be driven by the mouse wheel, although the clicks are to coarse to be useful, and most artists prefer to use click+hold+drag... maybe why i didn't think of it earlier, but i noticed that you can breakdown the distance between clicks into 1/10 increments in Bome Midi translator, this may be usefull

dermot shane

2016-03-27 03:55:45

Spent some more time reading DJtechTools Twister manual

touch sensitivity is not mentioned as such in the manual, this is what i could find;
Sensitivity
There are two sensitivity settings, ‘Responsive’ for which 270 degrees of rotation changes the CC by the full MIDI range of 127, or ‘High Resolution’ which gives the highest resolution control.

what is sends out seems to be variable / user setable;
Each encoder can be configured to send either of the following MIDI messages
Note
The encoder sends Note On messages where the velocity corresponds to the Encoder Value.

CC
The encoder sends Control Change messages with a value corresponding to the Encoder Value.

Enc 3FH/41H
The encoder sends relative Control Change messages, a value of 65 is sent for each clock wise step, and a value of 63 is sent for each anti-clockwise step.
hope this helps, i am very appreacative of your time and expertise!

d

ps, the twister manual is here;
https://drive.google.com/file/d/0B-QvId ... ZfOTA/view

dermot shane

2016-03-27 04:12:40

more manual reading... this time MidiTranslator

ch 9.6.2, setting relitive position when knob 6 on Twister is touched i would ask Miditranslator to position the mouse pointer over say the Primaries / red / highlights slider on the UI
-then-
ch 9.6.4, mouse wheel up/down in1/10th increments as wanted when moveing knob 6
-or alternitivly-
ch 9.6.1, for mouse movement, but i'm not understanding how to implement this option

thoughts?

i've done a fair bit of mapping the Euphonix surfaces and building macros for XKeys, so to me the concepts seems workable, and the excution seems to be an information vacum!

The first step is getting the settings correct / best to have MidiTranslator to talk to DJTechTools Twister?

Tony Hulten

2016-03-27 12:24:20

Great input Dermot!

I attached at visual representation from how it would kind of look from a node based scenario.
Dont know if it helps

Might also be worth mentioneing that I did not program this unfortunatly. The software used is Controllermate
Attachments
Screen Shot 2016-03-27 at 16.10.31.jpg
Screen Shot 2016-03-27 at 16.10.31.jpg (400.09 KiB) Viewed 27600 times

dermot shane

2016-03-27 16:37:06

ah, the controlermate script uses mousewheel clicks, not click+hold+drag to change values on the sliders

seems a simpler way...

rarely used function due to the poor granularity of the responce, but with 1/10th increments it would be workable

DvlsAdvct

2016-03-27 19:08:56

Alright, so there's a bunch of stuff here, and I'm gonna try and take it one step at a time :)

The Twister has push encoders, meaning you can push them down to select them. What I would do is use this to "select" the function you're looking to use, and it will lock out all of the other encoders, so if you brush against them or hit them accidentally nothing will happen until you press them down.

You can also utilize visual feedback by having only one encoder light up, OR have all of the "off" encoders be a different color. We can get to that, though. It's an idea, that's for sure. What I would do is set the push encoder command to notes for all of the banks this functionality will be used for. The button press will also position the mouse over the command you want to use. If this functionality works for you we can even get more complex and activate different panels based on the knob, as long as the screen position doesn't move.

And we need to decide if you want to use the mouse wheel. Only because it dictates how the mouse will react. Do you need to click and hold for dragging left/right up/down? Or do you only need to click on the range you're working with and have the mouse wheel turn up and down? That drastically changes the functionality.

Pretty much, our best bet is to decide how you want the Twister to interact with the software, and from there we'll set the Twister to communicate with MT, and then have MT communicate with the software via the mouse. This is the hardest part: figuring out HOW those things will work.

There are two of you looking for different things, though, so it might be helpful to split this into two topics, one for each, to keep the thoughts organized.
J

Tony Hulten

2016-03-27 20:10:45

Awesome DvisAdvt!

*When it comes to the interface the scrolling function of the mouse does not always work, it only works on some parameters. So for my needs it would best suit to move the mouse cursor into place "starting point" as soon as i rotate the knob and then it holds down the left mouse button and slide the cursor left/right or up/down during the turning of the knob.

Yes the screen will be locked down and wont move

When pushing down a knob I want other functions, But I can manually program what the push knobs will do as long as I know how to do a "keystrokes" & "move cursor to specific point and left click with mouse"

But I would like to have it that you have to turn the knobs a certain degree before they actually make a change, even if just a very little (to avoid accidentally touching a knob) But this is not a crucial feature :)


Dermot Shane, Is this inline with the functions you want? Or should we split ways?


Really awesome support your giving DvisAdvct

dermot shane

2016-03-27 20:55:08

Tony & DvisAdvct;

I think i am in lne with Tony's thoughts

i currently have about 90% of the functionality wanted between the Euponix and Xkeys, and the last 10% is what i am after, but that's a sub-set of what Tony is targeting, and i think the majority of Resolve artists that are interested in small surfaces will want access to the functionality that Tony is targeting.

I'd like to have a second Twister on my system at home, and in that case i'd also want as much functionality as possiable!

The only high value functions i cannot get to with my current set-up is RGB|LLG, so that page alone is my main focus, but it's a sub-set of where Tony is going, and it only makes sense to map as much as possiable to the Twister as i have it stting there anyway

i think we are on the identical path, but Tony's is a bit longer and wider...

dermot shane

2016-03-28 08:05:53

What I would do is set the push encoder command to notes for all of the banks this functionality will be used for. The button press will also position the mouse over the command you want to use. If this functionality works for you we can even get more complex and activate different panels based on the knob, as long as the screen position doesn't move.
one thought.. there's about ten color gradeing surfaces on the market, i have used most of them now, and they all use the knob push for re-set values to default, and they all have all knobs active all the time

in the video used as a refrence the person who made it is perhaps more biased towards the hobiest market, i'm not haveing any issues with the knobs being active always, i have re-set a button push away, and un-do mapped to a softkey.. for most users it should not be an issue

fortuantly the Ui is locked, dependant on screen size, i have three systems, all have a single 1920x1200 screens so i can keep XKeys macroworks mapping common between machines

and slightly unfortunatly the Resolve developers change the UI on every version, so the macro's need to be revised about once a year...

Tony Hulten

2016-03-31 00:07:50

Just checking to see if there is anything more information we can provide?

cheers

DvlsAdvct

2016-04-01 16:10:39

Sorry for the delay, guys. I'm going to come back to this this evening when I'm home from work and have some more ideas.

Jared

Tony Hulten

2016-04-01 16:15:32

Awesome DvlsAdvct!

Im sitting here with the unit in my lap just waiting to try some stuff out!

Here are some screen grabs of the midi units interface, incase there is something here that might change anything
Attachments
Screen Shot 1.jpg
Screen Shot 1.jpg (387.43 KiB) Viewed 27505 times
Screen Shot 2.jpg
Screen Shot 2.jpg (381.88 KiB) Viewed 27505 times

Tony Hulten

2016-04-02 13:04:28

If possible im willing to pay to get direct support if this is possible via skype or something? I want to do this as quickly as possible.

I have tried some stuff but my programming very unsophisticated.

Ok how far off am I with this?

The knobs now only have
*MIDI B0 00 41 when turning Right
*MIDI B0 00 3F when turning Left

-----------------------------------------------
[x] Translator 0.2: Knob1\_start\_pos
Incoming: MIDI B0 00 pp
Outgoing: Mouse move to X=554 Y=749

\[x] Translator 0.3: Knob1\_direction_RIGHT
Incoming: MIDI B0 00 41
Rules:
pp=vv
vv=pp+4
Outgoing: Mouse move vv horizontal

\[x] Translator 0.4: Knob1\_direction_LEFT
Incoming: MIDI B0 00 3F
Rules:
pp=vv
vv=pp-4
Outgoing: Mouse move vv horizontal

\[x] Translator 0.5: Knob1\_klick\_hold
Incoming: MIDI B0 00 pp
Rules:
if g0==1 then exit rules, skip Outgoing Action
g0=1
Outgoing: Left mouse button down, delay:1 millisec

\[x] Translator 0.6: Knob1\_timer
Incoming: MIDI B0 00 pp
Outgoing: One-shot timer "Timer": 150 ms delay

\[x] Translator 0.7: Knob1\_klick\_release
Incoming: On timer "Timer"
Rules: g0=0
Outgoing: Left mouse button up

\[x] Translator 0.8: Knob1\_pos\_reset
Incoming: On timer "Timer"
Rules:
Outgoing: Mouse move to X=554 Y=749, delay:1 millisec
------------------------------
Here im having problems with putting a delay on the direction Right & Left translators, When I dont have delay right and left it functions properly but as soon as I put a delay it doesnt. I want "mouse position" and "mouse click" to happend before the left and right dragging with mouse starts to happen.


OR is something like this more appropriate?

The knobs are sending 1-127 I think

---------------------------------------------------

[x] Translator 0.2: Knob1_pos
Incoming: MIDI B0 00 pp
Rules:
tt=150
qq=pp*67
rr=qq/15
if pp=127 then rr=85
vv=tt+rr
Outgoing: Mouse move to X=vv Y=500

[x] Translator 0.3: Knob1_klick
Incoming: MIDI B0 00 pp
Rules:
if g0==1 then exit rules, skip Outgoing Action
g0=1
Outgoing: Left mouse button down

[x] Translator 0.4: Knob1_timer
Incoming: MIDI B0 00 pp
Outgoing: One-shot timer "Timer": 150 ms delay

[x] Translator 0.5: Knob1_UPklick
Incoming: On timer "Timer"
Rules: g0=0
Outgoing: Left mouse button up
-----------------

Problem here is to get the same starting position when start turning the knob

DvlsAdvct

2016-04-05 00:54:28

Alright, so there are a bunch of things going on here, and we have to approach them one at a time.

First, using a timer only delays the output, it doesn't build in a security. I'm going to assume we're going to be using the endless encoders only because they make more sense. What we're going to do instead is tie a global variable to count how many clicks the endless encoder has been turned. We are also going to put a lock timer in so it can only jump to that position once, because our +4 and -4 locations are going to base off of timers and return to that position. We want to simplify how many mouse signals are being sent.

I put together a project for one command. Just change the default input port and see if this works for you.

There's logic to it, so if it works let me help walk you through how the variables all work.
Thanks
J
Attachments
Mouse Movement.bmtp
(3.06 KiB) Downloaded 294 times

dermot shane

2016-04-05 16:02:29

thanks!

my update is not so great, my Twister has a fault and is being shipped back to DJTech today, will have a repacement in the next week or so, but i am in Berlin for the next two weeks, so i will not be able to do anything on this file untill late April

i did send a link to this thread to Matias at DJTech so they are aware

i will keep reading tho,abit frustrating to be getting close and not be able to contribuite

again thanks

d

Tony Hulten

2016-04-05 16:06:25

Sorry to hear about your unit Shane..

Mean while I will try for both of us :)

Thank you dvlsAdvct!
I will try tonight!

Tony Hulten

2016-04-05 21:08:53

Hi DvlsAdvct,

You will have to excuse me but im not quite sure what to do, should the first input be a knob turn left or right, or am I totally lost? And when I do this it doesnt really seem to function, I sometimes get the mouse to move to a location and nothing else happens

DvlsAdvct

2016-04-05 21:38:37

The first translator is a button command, which you can reset to your controller. It is used for testing and will reset the global variables, so you can make mistakes or things can go wrong and you can continue testing.

Second, if the incoming message for the rest of the translators fires on any value for the velocity then it doesn't matter which direction you turn it.

Third, if the incoming message ends with a 7F or a 01 you may need to adjust those to the value of your knob. I was using a different controller than you, so just relearn the input.

Hope that helps.
Jared

Tony Hulten

2016-04-05 21:54:40

Is it not wierd that I get this when I have deselected all my midiinput and midi output:

1: IN 0.1 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
2: IN 0.2 Control Change on channel 1 with CC#:0 (0x00) and any value=75 (0x4B)
3: IN 0.5 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
4: IN 0.6 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
5: IN 0.7 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
6: IN 0.8 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
7: IN 1.1 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
8: IN 1.2 Control Change on channel 1 with CC#:0 (0x00) and any value=75 (0x4B)
9: IN 1.5 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
10: IN 1.6 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
11: IN 1.7 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
12: IN 1.8 Control Change on channel 1 with CC#:0 (0x00) set 'pp' to value=75 (0x4B)
13: OUT 0.6 One-shot timer "Mouse Up": 150 ms delay
14: OUT 1.6 One-shot timer "Mouse Up": 150 ms delay
15: OUT 0.5 Mouse move to X=260 Y=360
16: OUT 1.5 Mouse move to X=260 Y=360
17: IN 0.9 On timer "Mouse Up"
18: OUT 0.9 Left mouse button up
19: IN 1.9 On timer "Mouse Up"
20: OUT 1.9 Left mouse button up

one of the knobs directs my mouse regardless of input and output..




My incomming messages end with 3F & 41

DvlsAdvct

2016-04-05 22:00:05

That is weird. The translator ports should be tied to the project default ports. It looks like it's picking up CC 0. In the log window can you check the Rules box to see what's happening?

J

Tony Hulten

2016-04-05 22:08:06

on the first translator:

g0=0
ga=0


If I remove the 5th translator (reset mouse position) then this wierd thing doesnt happen

DvlsAdvct

2016-04-05 22:11:36

Right, which is what it should do. The translators for left and right movement, though, need to be updated to match your knobs. They should currently be set to an incoming velocity of 01 and 127 respectively. Change them to what you need and it should work. Though, seeing pp=75 makes me wonder. Or, just recapture the incoming message to ensure the script is right. If it currently is looking for all values then keep it consistent. If it's looking for 01 or 7F then change it so it matches left and right.

J

Tony Hulten

2016-04-05 22:22:22

So im changing all the translators to:
Midi B0 04 pp

(well except left and right that is)

except the the timers?

DvlsAdvct

2016-04-05 22:27:45

If there's a timer as the incoming message then leave it.

The first translator should be assigned to a separate button to reset the variables. Do not set that to the knob.

Tony Hulten

2016-04-05 22:29:02

1: IN 1.1 MIDI B0 04 41, pp=0x41
2: IN 1.2 MIDI B0 04 41, pp=0x41
3: IN 1.3 MIDI B0 04 41
4: IN 1.5 MIDI B0 04 41, pp=0x41
5: IN 1.6 MIDI B0 04 41, pp=0x41
6: IN 1.7 MIDI B0 04 41, pp=0x41
7: IN 1.8 MIDI B0 04 41, pp=0x41
8: OUT 1.3 Mouse move 15 (right)
9: OUT 1.6 One-shot timer "Mouse Up": 150 ms delay
10: OUT 1.5 Mouse move to X=260 Y=360
11: IN 1.9 On timer "Mouse Up"
12: OUT 1.9 Left mouse button up



There is something with the rules that makes it skip mouse position in beginning and left mouse button down

Tony Hulten

2016-04-05 22:32:39

Project: Mouse%20Movement
Project MIDI IN ports: Midi Fighter Twister
Project MIDI OUT ports: Bome MIDI Translator 1 Virtual Out
____________________________________________________
_____________________________________________________________
[x] Preset 1: New (2) Preset

[x] Translator 1.0: Reset Variables
Incoming: MIDI 90 2A 7F
Rules:
g0=0
ga=0
Outgoing: (none)

[x] Translator 1.1: Mouse Position
Incoming: MIDI B0 04 pp
Rules:
ga=ga+1
if ga<5 then exit rules, skip Outgoing Action
if ga==6 then exit rules, skip Outgoing Action
if ga>=5 then ga=6
if g0>=1 then exit rules, skip Outgoing Action
g0=1
Outgoing: Mouse move to X=554 Y=749

[x] Translator 1.2: Mouse Click
Incoming: MIDI B0 04 pp
Rules:
if g0!=1 then exit rules, skip Outgoing Action
if g0>=2 then exit rules, skip Outgoing Action
g0=2
Outgoing: Left mouse button down, delay:2 millisec

[x] Translator 1.3: Mouse Right
Incoming: MIDI B0 04 41
Rules: if g0!=2 then exit rules, skip Outgoing Action
Outgoing: Mouse move 15 (right)

[x] Translator 1.4: Mouse Left
Incoming: MIDI B0 04 3F
Rules: if g0!=2 then exit rules, skip Outgoing Action
Outgoing: Mouse move -15 (left)

[x] Translator 1.5: Reset Mouse Position
Incoming: MIDI B0 04 pp
Rules: if g0!=2 then exit rules, skip Outgoing Action
Outgoing: Mouse move to X=260 Y=360, delay:5 millisec

[x] Translator 1.6: Mouse Up Timer
Incoming: MIDI B0 04 pp
Rules:
if g0!=2 then exit rules, skip Outgoing Action
gb=1
Outgoing: One-shot timer "Mouse Up": 150 ms delay

[x] Translator 1.7: Kill Mouse Timer
Incoming: MIDI B0 04 pp
Rules: gb=2
Outgoing: (none)

[x] Translator 1.8: Mouse Up Timer
Incoming: MIDI B0 04 pp
Rules:
if g0!=2 then exit rules, skip Outgoing Action
if gb==2 then exit rules, skip Outgoing Action
Outgoing: Kill timer "Mouse Up"

[x] Translator 1.9: New Translator
Incoming: On timer "Mouse Up"
Rules:
ga=0
gb=0
Outgoing: Left mouse button up

DvlsAdvct

2016-04-07 04:19:38

Can you post the log window but check the Rules box so I can see what's happening with the rules?

Thanks
Jared

Tony Hulten

2016-04-07 08:14:44

1: IN 1.1 MIDI B0 04 3F, pp=0x3F
2: RULE 1.1 expression: (ga=ga+1) = 1
3: RULE 1.1 condition satisfied: if ga<5 then exit rules, skip Outgoing Action
4: IN 1.2 MIDI B0 04 3F, pp=0x3F
5: RULE 1.2 condition satisfied: if g0!=1 then exit rules, skip Outgoing Action
6: IN 1.4 MIDI B0 04 3F
7: IN 1.5 MIDI B0 04 3F, pp=0x3F
8: IN 1.6 MIDI B0 04 3F, pp=0x3F
9: RULE 1.6 assignment: (gb=1) = 1
10: IN 1.7 MIDI B0 04 3F, pp=0x3F
11: RULE 1.7 assignment: (gb=2) = 2
12: IN 1.8 MIDI B0 04 3F, pp=0x3F
13: RULE 1.8 condition satisfied: if gb==2 then exit rules, skip Outgoing Action
14: OUT 1.4 Mouse move -10 (left)
15: OUT 1.6 One-shot timer "Mouse Up": 150 ms delay
16: OUT 1.5 Mouse move to X=260 Y=360
17: IN 1.9 On timer "Mouse Up"
18: RULE 1.9 assignment: (ga=0) = 0
19: RULE 1.9 assignment: (gb=0) = 0
20: OUT 1.9 Left mouse button up
-------

Thank you for all the help once again :)

DvlsAdvct

2016-04-07 20:44:23

Can you confirm that the translator that sends the Mouse Down command has the right incoming message? It's not coming up at all. Also, turn the knob at least 6 or 7 clicks so ga becomes > 5

Tony Hulten

2016-04-07 21:11:15

--

Tony Hulten

2016-04-10 11:18:25

I've tried to test some stuff without really knowing what im doing and now it looks like this.
Currently it is kind of working :) thanks for the help!

The next thing is that it would be nice to have a threshold so that nothing happens until a knob is turned 1 or 2 steps

Also the two translator with red font right now are disabled, they are a failed attempt to go to a specific mouse position and click to bring up the right window/layout. The problem here is that I would need som kind of rule to initiate under certain circumstances, might be a timelimit, not sure yet.



You can download the project here:
http://freshteafilms.myqnapcloud.com:80 ... id=0Xxdrrg
----------------

[ ] Translator 1: QUALIFY pos
Incoming: MIDI B0 04 pp
Outgoing: Mouse move to X=720 Y=629

[ ] Translator 2: mouse click
Incoming: MIDI B0 04 pp
Outgoing: Left mouse button click, delay:1 millisec


[x] Translator 3: Mouse Position
Options: stop
Incoming: MIDI B0 04 pp
Rules:
ga=ga+1
if ga<5 then exit rules, execute Outgoing Action
if ga==6 then exit rules, execute Outgoing Action
if ga>=5 then ga=6
if g0>=1 then exit rules, skip Outgoing Action
g0=1
Outgoing: Mouse move to X=676 Y=746, delay:3 millisec

[x] Translator 4: Mouse Click
Incoming: MIDI B0 04 pp
Rules:
if g0!=1 then exit rules, execute Outgoing Action
if g0>=2 then exit rules, skip Outgoing Action
g0=2
Outgoing: Left mouse button down, delay:2 millisec

[x] Translator 5: Mouse Right
Incoming: MIDI B0 04 41
Rules: if g0!=2 then exit rules, skip Outgoing Action
Outgoing: Mouse move 4 (right)

[x] Translator 6: Mouse Left
Incoming: MIDI B0 04 3F
Rules: if g0!=2 then exit rules, skip Outgoing Action
Outgoing: Mouse move -4 (left)

[x] Translator 8: Mouse Up Timer
Incoming: MIDI B0 04 pp
Rules:
if g0!=2 then exit rules, skip Outgoing Action
gb=1
Outgoing: One-shot timer "Mouse Up": 200 ms delay

[x] Translator 9: Kill Mouse Timer
Incoming: MIDI B0 04 pp
Rules: gb=2
Outgoing: (none)

[x] Translator 10: Mouse Up Timer
Incoming: MIDI B0 04 pp
Rules:
if g0!=2 then exit rules, skip Outgoing Action
if gb==2 then exit rules, skip Outgoing Action
Outgoing: Kill timer "Mouse Up"

[x] Translator 11: Mouse timer up
Incoming: On timer "Mouse Up"
Rules:
ga=0
gb=0
Outgoing: Left mouse button up


---------------------

1: IN 2.3 MIDI B0 04 41, pp=0x41
2: RULE 2.3 expression: (ga=ga+1) = 1
3: RULE 2.3 condition satisfied: if ga<5 then exit rules, execute Outgoing Action
4: OUT 2.3 Mouse move to X=676 Y=746
5: IN 2.3 MIDI B0 04 41, pp=0x41
6: RULE 2.3 expression: (ga=ga+1) = 2
7: RULE 2.3 condition satisfied: if ga<5 then exit rules, execute Outgoing Action
8: OUT 2.3 Mouse move to X=676 Y=746
9: IN 2.3 MIDI B0 04 41, pp=0x41
10: RULE 2.3 expression: (ga=ga+1) = 3
11: RULE 2.3 condition satisfied: if ga<5 then exit rules, execute Outgoing Action
12: OUT 2.3 Mouse move to X=676 Y=746
13: IN 2.3 MIDI B0 04 41, pp=0x41
14: RULE 2.3 expression: (ga=ga+1) = 4
15: RULE 2.3 condition satisfied: if ga<5 then exit rules, execute Outgoing Action
16: OUT 2.3 Mouse move to X=676 Y=746
17: IN 2.3 MIDI B0 04 41, pp=0x41
18: RULE 2.3 expression: (ga=ga+1) = 5
19: RULE 2.3 condition satisfied: if ga>=5 then ga=6
20: RULE 2.3 assignment: (if ga>=5 then ga=6) = 6
21: RULE 2.3 condition satisfied: if g0>=1 then exit rules, skip Outgoing Action
22: IN 2.4 MIDI B0 04 41, pp=0x41
23: RULE 2.4 condition satisfied: if g0!=1 then exit rules, execute Outgoing Action
24: IN 2.5 MIDI B0 04 41
25: IN 2.8 MIDI B0 04 41, pp=0x41
26: RULE 2.8 assignment: (gb=1) = 1
27: IN 2.9 MIDI B0 04 41, pp=0x41
28: RULE 2.9 assignment: (gb=2) = 2
29: IN 2.10 MIDI B0 04 41, pp=0x41
30: RULE 2.10 condition satisfied: if gb==2 then exit rules, skip Outgoing Action
31: OUT 2.5 Mouse move 4 (right)
32: OUT 2.8 One-shot timer "Mouse Up": 200 ms delay
33: OUT 2.4 Left mouse button down
34: IN 2.7 On timer "Mouse Up"
35: IN 2.11 On timer "Mouse Up"
36: RULE 2.11 assignment: (ga=0) = 0
37: RULE 2.11 assignment: (gb=0) = 0
38: OUT 2.11 Left mouse button up
39: OUT 2.7 Mouse move to X=676 Y=746

Tony Hulten

2016-04-11 19:36:41

DvisAdvct

Any insight on how to achieve threshold so that nothing happens until a knob is turned 1 or 2 steps?

DvlsAdvct

2016-04-13 01:23:41

Your rules are wrong.

it should be

Code: Select all

ga=ga+1
if ga<5 then exit rules, SKIP Outgoing Action
if ga==6 then exit rules, SKIP Outgoing Action
if ga>=5 then ga=6
if g0>=1 then exit rules, skip Outgoing Action
g0=1
That's why the mouse down wasn't being triggered.

Let me know if that helps.

And the second translator you posted

Code: Select all

Translator 2: mouse click
Incoming: MIDI B0 04 pp
Outgoing: Left mouse button click, delay:1 millisec
doesn't delay the action by how many steps it takes. All it does is delays the outgoing action by 1ms. So if you turn the knob, it will always send the message 1ms later, which isn't what you want. You want to prevent it from moving accidentally.

Tony Hulten

2016-04-13 10:20:16

Thank you for the reply

I have knobs that sends
xx xx 3F when turning left
xx xx 41 when turning right

I'm looking for any insight on how to achieve some kind of threshold so that nothing happens until a knob is turned 2 steps.
So in simple terms I want some kind of rule that say: If you receive just one xx xx 37 or xx xx 41 within a period of 200ms, then SKIP outgoing action

florian

2016-05-03 22:57:54

please see here for continuation:
How do you achieve knob threshold

dermot shane

2016-05-15 16:58:53

DvlsAdvct wrote:Alright, so there are a bunch of things going on here, and we have to approach them one at a time.
<snip>
I put together a project for one command. Just change the default input port and see if this works for you.

There's logic to it, so if it works let me help walk you through how the variables all work.
Thanks
J
Jared / Tony / anyone who can help;
i am using Tony's settings with x/y changed to suit my screen, and now would like to modify the horziontal movement, and change nine of the mouse movements to vertical, I downloaded the "mouse movement.bmtp and opened it in a text editor, and see the following lines;
Name3=Mouse Right
Incoming3=MID3<Incoming Action="MIDI"><Simple Type="ControlChange"><Channel num="0"/><Value1 num="0x00"/><Value2 num="0x01"/></Simple></Incoming>
Outgoing3=Mse100000F0000
Options3=Actv01Stop00OutO01StMa00000001if(g0!=2)noexecute

Name4=Mouse Left
Incoming4=MID3<Incoming Action="MIDI"><Simple Type="ControlChange"><Channel num="0"/><Value1 num="0x00"/><Value2 num="0x7F"/></Simple></Incoming>
Outgoing4=Mse100FFF10000
Options4=Actv01Stop00OutO01StMa00000001if(g0!=2)noexecute
i am guessing the outgoing actions are the lines to be looked at? if so what are the values that need to be changed to create vertical mouse movement? should note that i am currently seeing a diagonal mouse movement, not stright horiziontal

many thanks in advance for any help!

florian

2016-06-03 01:09:28

Hi Dermot,
is there a particular reason why you're opening the .bmtp file in a text editor? Can't you just open it in MT Pro and change the logic so that it does vertical movement?
Thanks,
Florian

dermot shane

2016-06-03 03:05:41

thank you Florian!
Can't you just open it in MT Pro and change the logic so that it does vertical movement?
i have no idea how to make this happen, could you explain in some detail the steps needed to make these changes?

I see no way of affecting this either in the softwre or in text edit, and can not find any tutorials or any information really about anything to do with programing these movements - can you please help to explain how to change the logic, and how to change horiziontal to vertical?

florian

2016-06-03 09:14:27

This thread is closed!
please continue discussion here:
How do you achieve knob threshold