Faster way to change enharmonic spelling

While I appreciate the power of using “option +” and “option -” to change enharmonic spelling (and it’s ability to create an Ebbb which I’m not sure I’ll ever use) … I find it slows me down to 1) have to decide which direction I need to move the spelling in and 2) use both hands for the keystroke.

I miss Finale’s ability to use one keystroke to quickly move to the obvious enharmonic respelling (without having to say up or down). Yes, there are times when I want the less obvious choice (and the existing keystrokes are great for that). But 99% of the time I want the obvious choice. In the heat of creativity I want a single key to change that spelling.

Me, I would map such a keystroke onto the keypad keys so it was part of a quicker flow for writing. (I’ve already mapped some of my articulations onto the keypad like Sibelius to put them right under my hand during note entry.)

Have I missed such an existing keystroke perhaps? Thanks.

You can map key commands however you like, in Preferences > Key Commands. For these commands, search for “Respell”.

Edit: Sorry, I didn’t get all of what you were asking for. There is a command Respell Notes Automatically, but it opens a modal window to get a little more information from you. But you can manually add a shortcut key to your key commands json file that will execute this command with selected options in one go. For example, here’s the full command that gets executed if you do Respell Notes Automatically and then keep the default options.

NoteEdit.ResetSpellAutomatically?ParameterRespellNotesBarsOrNotesAtStart=kBars&ParameterRespellNotesBarsOrNotesAtEnd=kBars&ParameterRespellNotesCountAtStart=0&ParameterRespellNotesCountAtEnd=0&ParameterRespellNotesPreferMostFrequentlyUsedAccidentalOverrides=1&ParameterRespellNotesKeepAccidentalOverrides=1

+1. I’ve been asking for a simple Respell like FInale’s for years. 99% of the time it will be correct and the other 1% can use the dedicated up/down commands.

I’m playing with Respell Notes Automatically feature before figuring out how to edit a json file as you suggest.

I’m in the key of Bb and I want to tell the Automatic feature to simply turn a Bb into an A#. No context - I simply want it to change it to the simplest enharmonic equivalent. None of the options seem to allow this to happen.

Dorico does a great job handling spelling most of the time. But I simply want to have Dorico respell my note on the fly ignoring all rules and context. Is this possible?

I’m changing the spelling to actually change the context myself. I don’t want the software to ‘think for me’ at this point.

One of the few things I miss from Finale was the ability to specify “use only sharps” or “use only flats”. These commands were mapped onto shortcut keys, making it easy to switch between the two.

I don’t believe Dorico has an equivalent to Finale’s “Flip Enharmonic”.

One thing I’ve done is to switch Dorico’s default key commands so that Respell Using Note Name Above is Ctrl+- and Below is Ctrl+=. For me, it’s easier to think whether I want to use a flat (-) or a sharp (=/+) than to think which note I want to use as a reference point. This was a suggestion from someone else in the forum.

And something else I just thought of is that you could use a custom key command to do the equivalent of “Flip Enharmonic” most of the time. Here’s the command you would have to map in order to flip basic flats and sharps (and C/B#, F/E#, etc.).

NoteInput.TransposeOrAddNotesToSelection?Definition=c#=db,db=c#,d#=eb,eb=d#,e#=f,f=e#,f#=gb,gb=f#,g#=ab,ab=g#,a#=bb,bb=a#,b#=c,c=b#,fb=e,e=fb,cb=b,b=cb

This uses the functionality of the Notes and Intervals popover to perform a series of substitutions on the selected notes; if you only have a single note selected, it’ll just flip that note. You could also extend this to double sharps and double flats, if you want.

If you want to keep your key commands file a little cleaner, you could save this as a user macro and then map the macro to a key command. The macro would be:

local app=DoApp.DoApp()
app:doCommand([[NoteInput.TransposeOrAddNotesToSelection?Definition=c#=db\,db=c#\,d#=eb\,eb=d#\,e#=f\,f=e#\,f#=gb\,gb=f#\,g#=ab\,ab=g#\,a#=bb\,bb=a#\,b#=c\,c=b#\,fb=e\,e=fb\,cb=b\,b=cb]])

Edit: Note that the command in a macro file needs backslashes before the commas, but if you put the command directly in your key commands JSON file, it does not.

Alright Aaron, you’re intriguing me with some solutions.

I’ve recorded some macros in Dorico but have never edited a json file or ‘created a custom key command’ as you are suggesting. (I’ve created a lot of solutions using KeyboardMaestro, but I don’t think that will help here.)

Can you point me to where I can read about creating custom key commands and start playing with them? What exactly do I do with the text you provided me with:

NoteInput.TransposeOrAddNotesToSelection?Definition=c#=db\,db=c#\,d#=eb\,eb=d#\,e#=f\,f=e#\,f#=gb\,gb=f#\,g#=ab\,ab=g#\,a#=bb\,bb=a#\,b#=c\,c=b#\,fb=e\,e=fb\,cb=b\,b=cb

or how do I make this other text you provided into a user macro?

local app=DoApp.DoApp()
app:doCommand([[NoteInput.TransposeOrAddNotesToSelection?Definition=c#=db\,db=c#\,d#=eb\,eb=d#\,e#=f\,f=e#\,f#=gb\,gb=f#\,g#=ab\,ab=g#\,a#=bb\,bb=a#\,b#=c\,c=b#\,fb=e\,e=fb\,cb=b\,b=cb]])

A search for the word ‘macro’ in the manual has no results.

Thanks!

Your custom key commands file is in your Dorico config folder, c:\Users\<username>\AppData\Roaming\Steinberg\Dorico 6 on Windows or /Users/<username>/Library/Application Support/Steinberg/Dorico 6 on Mac. Assuming you’re using an English keyboard, it’s called keycommands_en.json. Before you make any changes, you should make a backup copy.

If you’ve never worked with a JSON file, I suggest you Google and read a little about it. The important thing is that white space doesn’t matter, but the braces, quotes, and commas do.

If you open the file, you’ll see that the lines that set commands look like this:

{
  "Window.TogglePageAndFillView" : [ "Ctrl+Alt+E" ]
},

The first part of that is the command, and the second part is the key that it’s being mapped to. If you want to map the command I gave above, for “flip enharmonic”, first find the section that starts with "context": "kWriteMode" and then add the mapping under "shortcuts", something like:


{
  "NoteInput.Transpose etc.": [ "Num+9" ]
},

That would map it to NumPad 9, which is the same key that Finale used to use, but you can map it to whatever you want (as long as it’s not used by some other key command).

If you’d rather go the macro (user script) route, then take the two lines I provided in my post above and save them in a file called something like Flip Enharmonic.lua. The .lua extension is important. This file should go in a folder called Script Plug-ins under your Dorico config folder. Once it’s there, it will show up in the Script menu in Dorico. (You may need to restart Dorico first.)

Since you’re already using Keyboard Maestro, you may find it easiest to use that to invoke the script, from the Script menu, with a shortcut. Otherwise, you can add a Dorico key command to do it. The key command should go in the same kWriteMode section I indicated above, and it should look like this:

{
   "Script.RunScript?ScriptPath=<path>/Script Plug-ins/Flip Enharmonic.lua" : [ "Num+9" ]
},

Replace <path> with the actual full path to the folder, and use forward slashes even if you’re on Windows.

Thanks for this. This is enough to get me started.

Yes, please.

This one-key Respell notes is one of those basic and so useful functions that Dorico should do out-of-the-box, with no need for sophisticated json or macro things (??).

On a Spanish keyboard the current shortcuts are even worst, because Alt-= does not work, you need to use Alt-shift-=.

Please Dorico team, give us simple direct one-key respell some day.

Aaron -

So I’m not having a lot of luck with editing the JSON file. Here’s what I entered:

(continued …)

Unfortunately this breaks the key commands so nothing works. (I did back up my original file.)

I tried this header with no luck: "NoteInput.Transpose?Definition= (etc.)

Also tried this "NoteInput.Transpose?Value= (etc.)

Looking at a post from a few years ago I tried this: "NoteInput.SetAccidental?AccidentalDefinition= (etc.)

Thoughts? And thanks for all your help so far.

@michaelstarobin It looks like the backslashes are needed if you turn this into a lua file, but not if you put the command directly into your JSON file. Delete all the backslashes, and you should be good. (I’m editing my reply above to remove the backslashes.)

Woo-hoo!! Works like a charm!

If I’m ever in your neck of the woods (or you’re in mine) I owe you a drink! Thanks!