Scroll wheel + modifier keys: Zooming in Ableton or any other DAW

Hi, how do I make a translator set that emulates the mouse scroll wheel plus modifier keys (alt, cmd, shift, etc). I'd like to map a midi knob (Launch Control XL) to zoom functions in a DAW. For example, holding down cmd while moving the scroll wheel is zoom (horizontal) in Ableton. Of course, there are other modifier key combinations I'd also like to emulate that do variations on this. I.e., opt-cmd + scroll wheel is "vertical" zoom where tracks get "wider" so as to show automation, midi notes, etc.

Hi, I haven't testing this fully. (there might be a few timing issues) but it should be close.  I'm on PC so I'm using Control instead of command.

The first translator presses the control key down and sets a busy flag in global variable gb. This ensure that it only triggers once until the sequence is complete.

The second translator only triggers if the sequence has started (gb!=0) and starts a 1 shot watchdog timer for 250ms. This is the amount of time you have to move the scroll wheel. As long as the pot/encoder is sending messages, it keeps reseting it self so it never fires the timer until you stop turning the knob for more than 250ms.

The third translator compares the last known value of your CC message with the incoming message to determine which way you are moving it. That way it can send up or down messages depending on which way you move it. I set the increment/decrement value to +10 -10. It actually sends the scroll wheel messages but I give it a short (5ms) delay in case the application cannot handle scroll message fast enough.

Finally 250 ms after you stop turning the pot/encoder, the watchdog timer will fire and send a keystroke up of Control to complete the sequence.

 

Keep in mind on Mac, the modifier keys and mouse movements both need to come from the same source. For instance you cannot hit control or cmd on the keyboard while turning the pot/encoder.

To change it for the Mac, simply clear current keystroke outgoing message (with the clear button next to the text box)  and replace it in the text box with Cmd.

 

I hope this helps!

 

Steve Caldwell
Bome Q and A Moderator and
Independent Bome Consultant/Specialist
bome@sniz.biz


Attachments:
1590114579275_Mouse-Scroll-wheel-with-control.bmtp

Hi Steve,
I came here today for something similar, and was wondering if your solution would work in my case?
I want to map and encoder in TouchOSC to MTP, to control the zoom and (ideally) pan or position of the Overview section of Ableton Live.
What I need to emulate, is:
– In Arrangement view
– when you place your mouse in the Overview area, the cursor turns into a magnifing glass
– click and hold the left mouse button and dragging up and down, zooms out and in, respectively
– click and hold the left mouse button and dragging left and right, moves the time backward and forward, respectively
And advice on how to accomplish this would be awesome, ty!
MG

Hi MG,

The following attachment should be pretty close to what you need. If you are using absolute encoders, however you will need to modify to make it relative for proper mouse movements. It is easier if your encoders are relative to calculate the movement value of the mouse.

You also need to know your screen location for mouse click and set that in the click down translator. You must always keep your over click location the same for this to work.

What it does is on position of either of the 2 encoders, will send a mouse click down. Then it sends mouse messages to move the mouse left and right or up and down, depending on the encoder you are using. The down click will time out and release the mouse if you stop moving one of the encoders for more than 500 msec (1/2 second).

Steve Caldwell
Bome Customer Care


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


Attachments:
1591993347618_Pan-Zoom-2020-06-12.bmtp

That’s exactly the kind of guidance I was looking for, since I haven’t had to use MTP in a while. Thank you so much! Ill post the translators once I get them working!!!

Super, glad it is what you were looking for!