Hi,
Is it now possible to assign keyboard shortcuts to mircotonal accidentals in Dorico 3, basically the main reason why I would upgrade!
Best,
Ben
Hi,
Is it now possible to assign keyboard shortcuts to mircotonal accidentals in Dorico 3, basically the main reason why I would upgrade!
Best,
Ben
No, Iâm afraid not yet, Ben, but itâs still in the plans.
Ok, great, thanks for letting me know. B
Doesnât anyone have any external solutions to make keyboard shortcuts for this or is it a waiting game? Iâm starting to get further into Dorico now that it has enough features, with the view of replacing my Sibelius use, but this is one area that really slows down putting music in, especially now that Iâm starting to understand how good Dorico is for not touching the mouse!
You can bind shortcuts for these manually if youâre prepared to edit your keycommands.json file manually.
Warnings first:
Do use a decent text editor (BBEdit, Sublime Text, SciTE etc.)
Do backup your keycommands file somewhere safe before you edit it
Do close Dorico before you edit your keycommands file
Do ensure you match the existing syntax of the JSON file exactly, and run the whole thing through www.jsonlint.com and hit Validate (and ensure you get a green result) before you save and reload Dorico.
When assigning shortcuts, type âCtrlâ if you want to use âCmdâ on mac, type âAltâ if you want to use âOptâ on mac and type âMetaâ if you want to use âControlâ on mac. Note that âMetaâ is often problematic and is best avoided
The way to uncover the underlying functions is
You should see something like this (I clicked through a few microtonal accidentals here):
local app=DoApp.DoApp()
app:doCommand([[UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.triple-flat.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=false&Set=true&UseLocalOverride=0]])
app:doCommand([[NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould]])
app:doCommand([[UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.double-flat-down.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=false&Set=true&UseLocalOverride=0]])
app:doCommand([[NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.double-flat-down.gould]])
app:doCommand([[UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.double-flat.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=false&Set=true&UseLocalOverride=0]])
app:doCommand([[NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.double-flat.gould]])
Now get your keycommands_en.json file loaded in a text editor and add in each of the commands that start âNoteInput.SetAccidentalâ, ensuring you match the existing syntax of the JSON. Youâll need to allocate shortcuts that youâre not using elsewhere. For ease of understanding, I make a point of using the kGlobal context (at the top of the JSON file), though I guess if you want to use the same shortcuts for different things in different modes youâd want to use the kWriteMode context for these. Just by way of example, you should end up with something that looks like the middle line of this, for each accidental:
Note: this use of Doricoâs (currently rather limited) script recording can get you access to pretty much anything in the properties panel and much of the stuff in the right panel, at least in Write mode. If something doesnât work initially, youâre either reusing a keyboard shortcut thatâs already in use, or youâll need to try stripping some of the arguments out.
Now go and read those warnings again.
Well, if youâre willing to get down and dirty you should be able to do this, but itâs not super-easy.
Quit and restart Dorico (so that you will have a new application.log file created, which will make it easier to find the info you need). Start a new project that contains your favoured tonality system, and add a single player holding an instrument. Input a series of notes with your chosen accidentals, clicking on the buttons in the Accidentals panel. Quit Dorico: you can discard the project file.
Now go to your user application data folder, which on Windows is %APPDATA%\Steinberg\Dorico 3 and on Mac is /Users/your-username/Library/Application Support/Steinberg/Dorico 3. Find the file called application.log and open it in a good text editor (e.g. VS Code, BBEdit, SciTE, et al.). This logs everything that you did in the last session, including the commands that you invoked while editing your score. Youâll see some commands for each accidental you created, of the form:
2019-10-11 09:08:54.674 : Executing command: UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.triple-flat.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=false&Set=true&UseLocalOverride=0
2019-10-11 09:08:54.675 : Posting command (force): NoteInput.SetAccidental AccidentalDefinitionID=accidental.24et.western.triple-flat.gould
2019-10-11 09:08:54.685 : notifyPostCommandExecute: UI.InvokePaletteButton?PaletteIndicatorID=kKeySigPanel.accidental.24et.western.triple-flat.gould&PaletteSectionID=kKeySigAccidentalsPanel&PropertyButton=false&SetOldValue=f
2019-10-11 09:08:54.686 : Executing command: NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould
2019-10-11 09:08:54.700 : notifyPostCommandExecute: NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould (13 ms)
2019-10-11 09:12:36.015 : Posting command (requested): File.AutoSave Post=true
The line you need is the one that says Executing command and the crucial bit is the following, e.g. NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould. Weâll call this latter half of the line a command string, and this is what you need to create a custom key command.
If youâre using the built-in 24-EDO tonality system youâll see recognisable names for the AccidentalDefinitionID parameter but if youâre using your own custom accidentals, Iâm afraid theyâll be long strings of gibberish. But they will each be unique, at least.
Pull out the command string for each of the accidental types youâre interested in. Now, in that same good text editor, open the file keycommands_en.json. This is the tricky bit: if you mess up the format of the JSON file, Dorico wonât be able to load any keyboard shortcuts at all. You can check that the format of the file is still valid by copying and pasting the whole contents into this web site and clicking the Validate JSON button.
Your goal now is to add some new entries to the kWriteMode section of this file. Look for a section that looks like this:
{
"context" : "kWriteMode",
"shortcuts" : [
You now need to carefully add new entries for each of the accidentals to which you want to define new key commands, being sure to get the syntax right. Follow the example of the key commands directly above. Itâs very important that you do not have a trailing comma after the last closing curly brace before the closing square bracket. The JSON linter will point out this error if you make it.
The section might end up looking a bit like this (though there will be more commands shown):
{
"context" : "kWriteMode",
"shortcuts" : [
{
"NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-flat.gould" : [ "Meta+1" ]
},
{
"NoteInput.SetAccidental?AccidentalDefinitionID=accidental.24et.western.triple-sharp.gould" : [ "Meta+2" ]
}
]
}
Once youâve added the desired accidentals, you can save the JSON file, validate it, and then run Dorico to see whether you got it right.
Heh, I see Leo was on the same journey at the same time I wasâŠ
âŠand fools seldom differ
This is amazing, thank you both so much. I think Iâll give it a go.
So if I totally mess it up, very likely ⊠Can I just close Dorico, move the orignal backed up JSON file back into place and load up Dorico again to restore things back to normal?!
By the way, my post was meant to say âDoes anyone haveâ not âDoesnâtâ, it wasnât meant to sound accusatory!
Yes, you can indeed just restore the original JSON file and forget the whole sorry affair ever happened.
Great, thanks, thatâs good to know⊠Will let you know how I get on!
When I open a new project the tonality system Iâm using isnât among the options Iâm given (still just the two standard ones.) Am I missing something about how additional tonality systems work. Are they only attached to one file? So I have to open my file with the system in it delete all the music and use it as a template for all future pieces where I want that tonality system?
Donât worry, found the save as default button mentioned in another thread ⊠Now itâs there âŠ
Ok, so I have it working! Thank you so much for this, no longer shall I touch the mouse âŠ
Iâd be happy to put up my dorico file with my 1/4 tone system (back to front flats, 1 and 3 stroke sharps etc as in Sibelius standard 1/4 tones) so it can be imported in.
{
âNoteInput.SetAccidental?AccidentalDefinitionID=accidental.user.user.8fc6e640-2935-4ff8-baa8-26e840de50c0â : [ âShift±â ]
},
{
âNoteInput.SetAccidental?AccidentalDefinitionID=accidental.user.user.214a4124-713d-4398-b00f-567711a6a61dâ : [ âShift+=â ]
},
{
âNoteInput.SetAccidental?AccidentalDefinitionID=accidental.user.user.0a4c3148-6b7b-4603-8b36-dcd9528e776eâ : [ âShift+Alt±â ]
},
{
âNoteInput.SetAccidental?AccidentalDefinitionID=accidental.user.user.ea312556-49df-4fad-ac44-3cdd60539026â : [ âShift+Alt+=â ]
},
The largest problem I had with all this was that it really didnât want to work for along time until I realised I was changing the dorico 1 keycommand file rather than the dorico 2! Good to watch out for that, saves an hour or so ⊠Otherwise I found it pretty easy to implement from the instructions provided so I would suggest anyone in my position to give it a go âŠ
Really glad this is working for you, Ben.
Is it somehow also possible to use a midi keyboard for recording quarter tones?
The possible options I see would be:
To the extent that you can already use MIDI commands as shortcuts, you can certainly assign them to these additional commands you have manually added to the JSON file, but youâll need to set a few MIDI shortcuts to existing commands in the Key Commands editor and then examine the resulting JSON to see how to define MIDI shortcuts to the commands youâve manually added. Dorico doesnât provide any means of designating only one MIDI input device or channel as the sole provider of MIDI shortcuts at the moment. You could perhaps earmark the bottom octave on your keyboard for shortcuts for microtonal accidentals.
Thanks Iâll try to make my own JSON file.
Actually what I was looking for is to record quarter tones by using a Midi Keyboard and using a key-switch for the microtones or having 60 for C, 61 = C+, 62=C# etc.
Is that also possible through the JSON file?