Just willing to check if it’s possible (Metronome Application Keystrokes)

Hi,
In my case I am looking for quick, easy and cheap solution. As a hobby musician I need access to metronome using midi pedal switcher. The problem is, no metronome supports midi - it’s only keyboard shortcuts if any. My favourite metronome app can handle keyboard shortcuts (non changeable and very basic) - I am after solution to press midi key to trigger keyboard shortcut in specific app, often running in background. As only app to receive this shortcut.

Couple options came to my mind:

  1. software can handle what I need
  2. Press and hold one of the switches to focus app to foreground and while holding make changes to tempo with other switches until holder button release and move that app to background.
  3. Maybe button stop/start could be multi action- like: upon press focus app and trigger shortcut and I focus app
  4. Button A on press to trigger shortcut A on hold trigger shortcut C
    Button B on press to trigger shortcut B on hold to trigger shortcut D

Ps I have downloaded trial version and manage to set focus metronome app on press, and alt+tab on second press.

Not expecting anyone to write entire thing for me. All I need to know if actions desired are can be archived in this software. If yes then I am paying for it and committing to setup.

I do hope you show your understanding of this unusual post.
Thank you

Hi and welcome to the Bome community!

You can focus an app on a trigger. There is no outgoing action to ‘unfocus’ an app, however you can focus a different app on release.

This can be done with 2 translators both with the same incoming trigger

  1. Focus App
  2. Send keystroke after a pre-determine delay (to give time for the app to focus)

This is a bit trickier as it would involve a timer to see if you released the button. If you did not release the button within a given period of time it would be considered a hold action (shortcut c). However if you release the button, we would trigger shortcut A. We would need to determine the amount of time you consider for a hold action and this time would be the delay of the outgoing action for either action.

So it looks like you are on your way. In summary the only potential issue is how to unfocus a given app. If your metronome app, however can handle injected keystrokes (Windows only), we could use those instead of using a focus application outgoing action.

What is the metronome application you are using?

Steve Caldwell
Bome Customer Care


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

Hi Steve and thank you.

What I have done with app focus is:
On button press - focus rhythm machine app
On button press - alt + tab
Seems to be working well. I reckon I just need to remember alt+tab will take me back to last used app - which actually gonna work.

I am using rhythm machine on my Mac.

Just been thinking about simplifying the thing.

A button
Focus metronome app
Very slight delay
Keystroke “spacebar”
Very slight delay
Alt+tab

B button
Focus metronome app
Very slight Delay
Keystroke “down” -5 bpm
Very slight Delay
Alt tab

C button
Focus metronome app
Very slight Delay
Keystroke “up” +5 bpm
Very slight Delay
Alt tab

It might work well !

OK, I created this on Windows but it should work with a Mac.

You will need to set up translator 0.0 outgoing application to focus on you metronome application. I just used Windows Notepad for testing. I’ve set it up incoming triggers for note-on notes 0-3 on MIDI CH 1. By having these sequential, I can use the same translator to handle to ‘focus application’ and ‘alt-tab’ actions for all 3 buttons.

Notice that the incoming trigger is any note on MIDI CH1 set to variable pp
Then in rules on translators 0.0 and 0.1 , I have:

if pp>2 then exit rules, skip Outgoing Action

This will restrict the outgoing action to notes 0-2 only

If you change the incoming note numbers then you will need to modify the script accordingly.

Translator 0.0 - Focus the application
Translator 0.1 - Sends Alt Tab after 30ms (after translators 0.2-0.4 have done their job)
Translator 0.2 Send Space after 10 ms
Translator 0.3 Sends Down after 10 ms
Translator 0.4 Sends Up after 10ms

You may also need to redefine the Alias ‘My Controller’ to that of your controller. Mine is defined as shown below.

image

You can learn more about aliases from this tutorial.

Metronome.bmtp (2.0 KB)

Good Luck!

Steve Caldwell
Bome Customer Care


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

went according to your instructions. Only had to change delays - in my case had to be at least 50 ms (0.2,03,04) and I have set display app for 3 sec before alt tabbing - and works even better than expected ?!

Thank you very much

Glad to help!

Steve Caldwell
Bome Customer Care


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