Keyboard shortcut to toggle "Metronome mark shown" in properties panel

If it is possible, could someone please supply me with a script for instructions for a shortcut to toggle the “Metronome mark shown” property?

I am going to have to do this for potentially hundreds of Dorico files and I think a shortcut would greatly speed things up.

I submitted a query to ChatGPT and got a convoluted answer that actually would require several steps.

I already use Cmd-8 (on Mac, I assume it’s Ctrl-8 on Win) to toggle on/off the properties panel, but I would like either a shortcut that immediately toggles the “Metronome mark shown” property or a shortcut that I could use after Cmd-8 (in which case, I’d use two shortcuts in sequence).

I did see this thread, but …
I’m not really qualified to make my own script, but if someone had one that could be modified for this this property, I might be able to tweak it (I’ve not made any scripts for Dorico so far).
Also, if someone knowledgeable would like to PM me about this, that’s an option.

I’m not a whizkid with Dorico, nor am I a programmer, so I need something relatively user-friendly.

Thank you!
Eric

Why not? I’m no script aficionado, but it took me less than a minute.

Script>Start recording macro
Select all (ctrl-A)
Right-click filter> Absolute Tempos…
Uncheck the show metronome property
Script>Stop recording macro…

Save the script somewhere.
(Note this only works one flow at a time)

After reading your message I tried my very first script to hide the metronome mark and it worked. I’m probably less a whizz-kid than you, so I’m sure you can make it work.

I followed Janus’ instructions. I could not find a way to toggle on and off, so I had to create two different scripts. They seem to work. Here they are (on my Mac here: /Users/[UserFolder]/Library/Application Support/Steinberg/Dorico 5):

Turn ON “Metronome mark shown”.lua (226 Bytes)
Turn OFF “Metronome mark shown”.lua (227 Bytes)

But how can I assign keyboard shortcuts to them? Dorico > Preferences (Cmd-,) > Key Commands > Script allows these options:

I would expect “Run Script …” to do what I want, but it doesn’t do anything when I select it.

EDIT: I set “Run Script …” to have Cmd-R Cmd-S (⌘R,⌘S) as its shortcut. I see the “File” item in the menu bar light up when I use that shortcut, but I can’t tell that the shortcut does anything. I does not bring up the list of saved macros like I would expect since manually selected “Run Script” does bring up the list of macros. I guess I’m doing something wrong.

As far as I know, you cannot assign a keycommand to a script via the normal keycommands dialog. You need to “manually” edit your keycommands_en.json file (where “en” is your keyboard’s language, so it can be something else in your case).

This thread, for example, is talking about this topic, but there must be some more detailed ones:

On Windows, the path is C:\Users\*YOU*\AppData\Roaming\Steinberg\Dorico 5\keycommands_en.json

Command S is Save, which is why the File menu flashes.

You can apply shortcuts to Scripts either using MacOS’s built-in keyboard shortcut function (as they are just menu items); or possibly via the Jump bar, as they show up there.

It is possible to add ‘custom’ shortcuts to the JSON file that holds the preferences – but if you’re doing that, you could just set a shortcut for kTempoImmediateAbsoluteShowMetronomeMarkFlag&Value=string: "true"

2 Likes

I opened the json file and tried to figure out how to do that, but did not succeed.