FR: Halving or doubling the current note duration for input

Hello,


tl;dr:
Make it possible to halve or double your note duration to be input, via any key command of choice.


When inputting music, I can imagine that many of us usually keep one hand on their MIDI keyboard for pitches and the other hand on their Qwerty keyboard for note values. One problem is that the key commands for the note values, including the augmentation dot, are spread out quite far apart (at least for those without numpads, or with numpads having a comma instead of a period), which means that they can’t have their Qwerty hand in a fixed position, but instead need to adjust the position of their Qwerty hand all the time, meaning that they might also need to turn their heads/eyes temporarily, causing small - but many - unnecessary movements. In addition, at least for me, it’s difficult to recall on the fly which digit corresponds to which note value, which sometimes causes me to press all the numbers by trial and error until the desired note value is chosen.

To combat this, I am therefore proposing the addition of two new “key commandable” tasks: double current duration and halve current duration. These key commands could be put so that the corresponding keys plus the period key are in close proximity, eliminating the need to move your hand (wherever that would be considering most of the keys are already taken), but even if they can’t be placed near the period key, it would certainly simplify the memorization. Also, this enables you to reach all possible note values that Dorico is capable of producing via your Qwerty keyboard, instead of being limited to a subset of the most common ones.

Personally, if this functionality would be implemented, I would replace the assignments of the 8 and 9 keys with these new tasks, and shift all the assignments of the number keys by two keys to the left (making 7 select the breve, 6 the semibreve and so on).

What do you think? Would you find this useful?

In case this actually did interest someone (despite no response for two days :stuck_out_tongue:), I just found a workaround after some digging, involving lua scripting/hacking of keycommands_en.json, which I’ll share here for future reference.


In fact, I discovered that there is built in functionality for augmenting/diminishing the note duration for input, but only in the context of Step Input On Tab, namely Note Value Longer and Note Value Shorter, so you cannot simply – in the standard way – go into the key commands section in the setup dialogue and assign key commands for these tasks and expect them to work in the “normal” step input context. Instead you will have to follow the steps below.

First of all, for those of you reading this not familiar with these kind of hacks: be careful! I recommend reading the following post carefully before attempting to do this on your own: Dorico 3 - Keyboard shortcuts for microtonal accidentals? - #6 by dspreadbury

  1. Create two .lua files, with the following contents:
local app=DoApp.DoApp()
app:doCommand([[NoteInput.NoteValueLonger]])

and

local app=DoApp.DoApp()
app:doCommand([[NoteInput.NoteValueShorter]])

respectively. (I chose to name the files NoteValueLonger.lua and NoteValueShorter.lua.)

  1. Open the keycommands_en.json file (see file paths for Windows and Mac in the link above).
  2. In the file, looking something like this:
{
    "common" : {
        "contexts" : [
           
            {
                "context" : "kGlobal",
                "shortcuts" : [
                   
                    {
                        "Edit.BeamTogether" : [ "Ctrl+B" ]
                    },
                   
                    {
                        "Edit.ChangeVoiceToDownstem1" : [ "Alt+2" ]
                    },

                    {
                        "Project.Player.Duplicate" : [ "Shift+D" ]
                    }
                ]
            },


– locate the string "context" : "kGlobal". Just below that, you will find a key (json terminology) named shortcuts with a value (json terminology) of all the user assigned key commands.

  1. Within the shortcuts value, manually add two new key/value pairs like following, replacing the dummy paths and key commands with appropriate ones:
{
    "Script.RunScript?ScriptPath=/your/path/to/NoteValueLonger.lua" : [ "your+key+command" ]
},

{
    "Script.RunScript?ScriptPath=/your/path/to/NoteValueShorter.lua" : [ "your+key+command" ]
}

Make sure that the file still contains valid json syntax after your edit, by checking it against a validator!


Even though I got it to work eventually, I still find it odd that this functionality seems to be designed only to work in the Step Input On Tab context. Is there a specific reason for this to be limited in this way, while – as far as I can see – it could really come in handy elsewhere?

1 Like