Assign a keyboard shortcut to ends voice/start voice

Hi.

Is it possible to assign a keyboard shortcut for some of the properties?
I found myself using the end voice property quite often. It would speed up the work flow a lot.

Thanks.

Not at the moment, but I agree that for certain important properties this would be a useful improvement.

Hi Daniel.

Thanks for your reply.

I kind of got it to work by recording a macro and using a run last script command.
It has its quirks but it works. I think there’s a lot of potential in this area of the program (macros and scripts).

Looking forward to future updates.

That’s interesting. I’ve been trying to use macros to make entering certain things easier. For example, in Finale I’m used to holding the ‘3’ key and clicking on a note to enter a mezzo-forte and in Dorico via the macro program Keyboard Maestro I’ve set Ctrl-3 to do the same which turns out to be almost as quick as Finale’s ‘metatool’. Using a macro program to select settings in the properties panel is more difficult. I’d be interested to know how you programmed shortcuts for ending and starting a voice, something I often need, as well. BTW, I hope that the ability to hide objects is one of the features scoped for a coming update.

I didn’t really program anything. In Script menu there are options to Start/End recording macro.
So I recorded that as a simple macro (turning on the end voice property).
Then using the run last script command to run the macro.
I also reassigned the default shortcut from Ctrl+Shift+Alt+R to more simple single key shortcut.
At the moment it’s not very flexible but hopefully it will get better in future.

I’m curious, have you found ways to record and save the macros, i.e. more than one macro?

You might find this thread helpful.

Yes. After recoding a macro rename the usermacro.lua to whatever.lua (keep the file extension). You can move the file to different location if you like.

It would be great if Dorico remembered last used folder to open a script. Haven’t tried it lately, but it used to default to program files everytime.

I’m so used to doing this via the bottom panel but more and more I find myself thinking that Key Commands for theses two functions would be helpful.

Dear David,
Note that the scripts can now be saved, so you could either fill your script menu with start and end voice features, or even tweak the keyboard shortcuts json file to create shortcuts for that.

I’d be interested to know why you’d prefer key commands for this than for Edit > Remove Rests, to which you can assign a key command?

Thanks Marc. I’m completely unfamiliar with scripting but I’ll give it a go. Just one question - how do I call up my “script menu” ?

Morning Daniel. Back in the early days of Dorico I was one of those beating the drum for removing rests. I suspect that was largely because of the way that I’d worked with my previous Notation program. I don’t know why I changed, maybe I had problems with removing rests (?), but for a year or so I’ve been starting and ending voices every time. It strikes me as being the right way to do it.

Sometimes you want a voice to end and you do not want “remove rests” to take out ALL the rests (ie- an appropriate rest in another voice). I run into this a lot with hymn work where modern engraving practice (at least in the US) is to use combined stems for SA/TB but then use separate stems only where the rhythms differ. Sometimes you only need a single uniquely-stemmed note in a bar, and the other voice might have a rest in it that you don’t want removed.

The script menu is accessible in Write mode (obviously at the top of your screen, with the different menus). Once you record a script, it has a “userscript” name. You can change the name in the appropriate folder (on a mac, look for ~/Library/Application Support/Steinberg/Dorico 3/Script Plug-ins) There, you can rename your script, and it will be available in Dorico 3 for all the projects.

Why not select only the rests you want to remove before clicking Remove Rests? It’s not all-or-nothing. Works like a charm, and still avoids the complications of starts/ends voice.

Thanks Marc - I can see how scripts would be very useful and I can already spot more than a few opportunities to use them. Basically, lengthy repeatable actions (hope I’ve got that right!).

But in this case, as it’s two clicks - one for the menu, one for the menu item - it’s longer than than a single click in the bottom panel. I’m now wondering whether Stream Deck can run a lua script. That would work a treat…

You can Record Macro, click the thing you want to click, then stop the recording and close. Then open the recording text file and you’ll see the json-looking code. You can copy and paste this into your key commands file.

I’m missing some details in the description above, which Leo or others can possibly fill in. I’m away from the computer and going from memory.

I used this method to assign “set notes to cue size” to Ctrl-Alt-C.

This post (and the similar one immediately underneath from Daniel) should give you more than enough to graft the relevant shortcuts into your keycommands JSON file. It’s geared towards microtonal accidentals rather than starts/ends properties but I’m sure you can figure out where you need to substitute.

Thanks Dan, thanks Leo - this looks perfect. I’ll take a crack at it tomorrow.