MTP Mouse Events + Bitwig

What I’m trying to do is pretty straight forward. I’ve been wanting to setup a single MIDI Encoder (in Relative Mode) to control whatever is under the mouse cursor in Bitwig by simulating a mouse drag event.

I got a script working in Bome MTP, but Bitwig doesn’t seem to be processing the mouse move events, only the mouse button events. So it doesn’t work in the Bitwig GUI, but it DOES WORK in plugins or other apps like Ableton Live.

I also notice this quirk: If I turn the knob and nudge the physical mouse a tiny bit, you can see the effect of the knob mixed in with the mouse movements. It’s as if the Bitwig UI is only passed the mouse move events when the physical mouse/trackpad is moving.

The once difference I know about Bitwig versus Live, is that Bitwig is written in Java.

Is this a known issue with Java apps? Is this something you’ve seen, or have any hints on how to fix it?

Here’s my WIP script. Many come in handy to someone using Abelton, or anything but Bitwig hehe.

midiToKnob.bmtp (1.2 KB)

Yes, unless the Java developer specifically enabled a certain Java library that allows for keystrokes, mouse movement or mouse clicks , it is possible it may not work. The only way I know to fix this is go back to the Java developer or use MIDI instead.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Adding to Steve’s response: it’s MT Pro’s job to emulate hardware as good as possible so that every target application behaves exactly as if you’re using a physical mouse. No matter how that application is programmed!

But our 20+ years experience in this field is that this is not trivial: some applications use non-standard ways to access mouse and keyboard (for different reasons), or access the hardware directly, or make some assumptions like “only if I see this kind of event it’s possible that I see a drag event”, or only react to mouse drag events if the UI control in question was previously activated (somehow), and so on.

This is particularly true for mixing physical events with emulated ones. We’ve added a lot of special code to support mixed emulation as good as possible, but it may still not be enough for “special” applications.

So I don’t think it’s a general incompatibility with Java applications. I don’t remember any prior report.

Are you on Windows or MacOS? Their keyboard subsystems are very different…

Looking at your MT Pro project file:

[ ] Translator 0.0: Drag Startt
Options: swallow
Incoming: Control Change on ch. 12 with CC#:15 (0x0F) and any value
Outgoing: Left mouse button down

[x] Translator 0.1: Inc
Options: swallow
Incoming: Control Change on ch. 12 with CC#:15 (0x0F) and any value set 'oo' to value
Rules: (...)
Outgoing: Mouse move xx horizontal, yy vertical

[ ] Translator 0.2: Drag Stop
Options: swallow
Incoming: Control Change on ch. 12 with CC#:15 (0x0F) and any value
Outgoing: Left mouse button up, delay:200 millisec
  1. Mouse Down (0.0) and Mouse Up (0.2) are disabled. So are you pressing the physical mouse button?

  2. If you enable 0.0 and 0.2, it will issue many “mouse down” events, and, with delay, many Mouse Up events. That’s bound to cause problems. A drag operation should be:

    • mouse down
    • mouse move
    • mouse move
    • (…)
    • mouse up
      That can be done in MT Pro (Steve will be able to assist). Maybe it works better?

Also, have you tried using mouse wheel emulation? I know some users use that for your use case (but maybe not with Bitwig, I don’t know).

Thanks!
Florian

MacOS / Intel

Yeah I had them disabled for diagnostics, I was trying different combinations, guess it got saved that way before I posted.

Ah, yeah, I didn’t quite get there. Would love some tips for the “dragging”.

I think it’s definitely something inside Bitwig with the way it’s handling Drag Events. I tried using Karabiner Elements to send some mouse move events on key press, and it actually translated to movement in the app. They use a virtual HID device model, so Bitwig see the actions as actual hardware. But There is no MIDI support there, so not to helpful, other than diagnostics.

Is there a name for this library? Then I can take something to Bitwig and see if they have any interest in tweaking things to work.

Hi, I don’t remember the name but I looked it up a while back and found it. However, before you take it to Bitwig, let me do a bit more research are you on Windows or Mac? I think I have their free version loaded on my Windows machine. I didn’t look at your project file initially as I assumed it was a Java issue but let me confirm first.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

I’m MacOS Monterey, Intel.

If you try it, Try the Volume sliders on the tracks, or master as a test.

PS—Wild response times on support, really impressed with your customer service, thanks so much for checking into this.

OK, so it appears the faders cannot be dragged with MT Pro, however the scroll bar can so it appears that the fader widgets seem to be protected or not enabled for mouse dragging except with a real mouse.

Here is the project I used for testing. I’ll see if for some strange reason it will work on Windows PC.Mouse-drag-bitwig-2021-11-22.bmtp (1.7 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

It works on BitWig 8-track on Windows PC. Unfortunately, however after moving the fader, the coordinates for the fader location has moved so the click location moves as well and there is no way to test for the current click location.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

The good news is you should be able to use MIDI IN if you set the Controller to Mackie MCU Mode.

If your controller is not a Mackie MCU then we can do translation from what your controller sends to the equivalent Mackie MCU MIDI message.

image

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

The issue is that I want a single CC to adjust the control under the mouse in any DAW/Plugin without having to assign/learn the CC. Is that possible with the Mackie MCU messages? I don’t believe so

Only if MT Pro knew the current mouse pointer location which MT Pro cannot currently do without some sort of helper application. If you have an external app on your Mac that can send MIDI message to MT Pro to tell it the current mouse pointer location, then yes, it could be possible.

I have a program on Windows that handles this but not sure what would be available on Mac.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz