Constrain trackball movement in MIDIBuddy + MIDI Translator

Hi Steve,

I'm using MIDIBuddy in order to generate MIDI messages in MIDI Translator with the mouse and trackball. I need to be able to distinguish between the mouse and trackball, and also, constrain the movement of the cursor in response to the trackball, but not the mouse. Here's the situation:

  • I use two monitors. One is placed above the other.
  • Moving the trackball in the vertical axis moves the cursor from one monitor to the other.
  • While the cursor is in the upper monitor, its position affects a parameter in Ableton Live (maximum effect when cursor is at the top of the screen, minimum when at the bottom of the screen)
  • When the cursor is in the lower monitor, further movement of the cursor has no effect even though I can see MIDIBuddy continuing to reckon screen position.

Therein lies the problem. If I continue downward movement, MIDIBuddy will continue to countdown cursor position until the cursor is at the bottom of the lower screen. If I then reverse direction and move the trackball upwards, it doesn't begin to affect the Ableton parameter until the cursor is within the upper screen again. Then the desired action on the parameter starts to work again.

It's ok for the mouse to have this dead zone, since I would be using it only to control things displayed on the bottom monitor (in a second instance of Live). There are no constraints needed for this movement.

So what I've described is essentially a big dead zone in trackball response as long as the cursor is in the bottom monitor.

Is there some way to prevent the dead zone? You've suggested using relative mouse position to distinguish between the mouse and trackball and to constrain the trackball movement but not the mouse movement. That would be helpful, but the problem remains that I want to eliminate the dead zone so that no matter how far I've moved the cursor onto the lower monitor with the trackball, upward movement would immediately resume control of the parameter. Is that possible?

Also, could you give me an example of how I'd use relative mouse movements instead of absolute positioning. Hmmm.... I think this may take a few rounds of questions and answers to clear up what I'm after.

Thanks,

Gabriel

Hi Gabriel. I also have two monitors with one trackball and one mouse. the difference is that my monitors are side by side, so you may need to adjust some parameters to different variables to restrict movement where you want it.

This project restricts the number 2 device which in my case is the trackball. Whichever mouse you move first when starting MIDIBuddy is number one. Then additional mice/trackballs are assigned sequentially by MIDIBuddy as you move them.

In the Init preset we assign our global variables and then set the pointer absolute position with MT Pro.

 

After that, MIDIBuddy tracks mouse location using relative mouse movements in the global variables. If the restricted mouse goes out of bounds, it sets and forces the position back to the boarder. The non-restricted mouse is just ignored and allowed to move anywhere but still tracks it’s location.

Here are the global variables. The retricted mouse will not move lower to 100 X and 100 Y or 500 X and 500 Y.

Feel free to play with all of the values here then restart the project for the variables to take effect.

 

// Mouse X
ga=1024
// Mouse Y
gb=1024
// Restricted Mouse Max X
gc=500
/// Restricted Mouse Max Y
gd=500
// Restricted Mouse Min X
ge=100
// Restricted Mouse Min Y
gf=100
// Proposed Mouse Location X
gg=0
// Proposed Mouse Locaton Y
gh=0

 

 

 


Attachments:
1563941097300_MIDI-Buddy-Restrict-Mouse-2019-07-23.bmtp

Any progress, Gabriel?

I apologize for not responding sooner. I’m preparing to take my setup to the organizer for Recombinant SF Festival so I can show him what I’ve been up to. Hoping to be included in this years lineup. So I’ve been practicing as much as o can, and haven’t tried your suggestion. After this week, I’ll do so and let you know.
Sincerest apologies and regards

No worries, Gabriel. I was just curious.