Easier way to enable/disable MIDI keyboard input

Here’s another AutoHotKey script, but this has the dependency of your Dorico window always being stationary and you have to use Window Spy (also available on the AutoHotKey download site). Window Spy gives you the x, y coordinates where to place the cursor (so the script can click the ‘Play’ tab in preferences. It’s probably easier to prime the preferences window by setting it to ‘Play’ and closing out and using the script I originally posted… Just keep in mind that if you switch to a different tab like ‘General’, the script will stop working. Not a perfect solution, but it works as long as you keep the ‘Play’ tab selected.

So, in an effort to provide a different solution:

^m::
{
Send ^{,}
Send play
Send {Tab}
Send {Shift}
MouseClick,left,100,75
Send {Tab}
Send {Tab}
Send {Tab}
Send {Tab}
Send {Tab}
Send {Tab}
Send {Tab}
Send {Tab}
Send {Tab}
Send "^ "
Send {Enter}
Send {Enter}
return
}

Bottomline: Until the Dorico developers provide better macro scripting ability or add a keyboard shortcut for ‘Enable MIDI Input’, I guess we’re stuck using tools like AHK, that is, if you’re like me and want a way to enable/disable MIDI input more easily.

@FredGUnn Can you not just play your first-inversion Am chord and then (holding the other notes) re-tap the A to have the chord symbol enter as you wish?

@Lillie_Harris Was not able to find this option searching the on-line help, but I know it was in the original Version History that came with the Chord functions.

Is this what you’re describing?

Yes, exactly. I was not able to find it searching through “MIDI input chord” type search terms and related links.

Thank you, and thank you for your quick response.

I always just type the chords in to make sure they are correct. Often times I’ll need to play the voicing or passage to remind myself exactly what it was or exactly how I want it to appear. I generally write first then fill in rhythm chords later. If I have the following passage as a saxophone background (concert key, top 3 treble, bottom 2 bass), I’m not always going to remember exactly what alterations I put in by the time I make the rhythm parts, and I generally don’t want to interrupt my flow to do it at the time.

Even though they are 5-part voicings, several of them don’t contain a root. There’s no way Dorico would guess correctly, and I can’t always remember if I had a natural 5th, +5, 13th, whatever, so I sometimes alternate between typing in chords and needing to play a voicing on my keyboard to remember what I wrote there. Typing in chord symbols guarantees I’ll have the correct chord every single time, and it might not even be slower than playing them in and having Dorico guess, which will then require proofreading and edits of course. If I could completely turn off MIDI chord symbol input it would definitely save me a bunch of time when inputting chord symbols, as I wouldn’t need to keep leaving to play my MIDI keyboard and re-entering the popover to input.

This sounds like an XY problem.

It’s unlikely that disabling MIDI input is the best solution to any problem of working with Dorico.

2 Likes

Agreed. XY problem indeed.

What I don’t understand is why Leo’s suggestion to invoke pitch before duration isn’t a suitable solution. It’s a single key press (K) to toggle back and forth, and toggling it on ensures that noodling around on the midi keyboard doesn’t enter any unwanted notes. Granted, invoking it does also change the way notes are entered on the qwerty keyboard, but presumably that’s not a problem because it would only be invoked to enable said midi noodling and can be toggled when going back to qwerty.

1 Like

I wasn’t meaning permanently. It seems like that is how my intentions were being interpreted.

It was more of the desire to write a script to see if I could get it to work than the insatiable need to enable or disable MIDI input.

There must be a reason the developers put the ability there for a reason to be able to enable or disable MIDI. Maybe mine was one of them? That was a rhetorical question by the way.

Ok, so I knew about the K key command, but I did not know that it also disabled MIDI input. I am a new user, so cut me some slack.

So, the book I’ve been using, “Getting Started with Dorico 3.5” states on p. 23, “This entry mode … is activated by clicking the icon or pressing K… whether via MIDI or QWERTY keyboard”. The author says nothing about it disabling MIDI and in fact seems to be implying that you can use MIDI when pitch before duration is active. That seems to contradict what you’re saying and what I am experiencing when I played around with ‘K’ just now (yes, I made sure MIDI is enabled when I tried playing on the music keyboard with pitch before duration on). So, is the author wrong?

Hey, no worries, relatively speaking, we’re all “new users” with any single one of us having less than 4 and 1/2 years of experience with the software, so yes indeed, we’re all here to help each other out.

Now, I will say that yes, you are correct, pressing K does not disable midi entirely (or even technically at all for that matter). What it does is sets Dorico to require pitches be entered first while in note entry mode, from which it then follows that if, say for instance, you needed to noodle around on the midi keyboard without Dorico placing all the noodling you just did in the score, you could press K, noodle to your hearts content, press K again, and you’d be back at your document exactly where you started without having entered any music into the score.

That said, on re-reading some of your comments, I get the sense that perhaps your midi keyboard is physically situated between you and your qwerty keyboard, thus making accidentally entered midi notes common enough to warrant you wanting a way to turn off midi input temporarily, hence why you’re asking, and not for a reason like the hypothetical I gave. And if so, I presume you’d potentially want to be able to do so without necessarily changing to pitch before duration (though if you are used to entering pitches before duration, this could be a way to kill two birds with one stone). I think several of us, myself included, assumed your reason for wanting such a feature was different than your actual reason. Somehow I’ve only picked up on it just now on my second or third read-through of this thread.

Anyways… as it is, your AHK script may in fact be the best way to go about it for the time being. I don’t disagree that this could be useful for some users (who might have similar physical workspace layouts to yours, for instance), but I can’t think of any current in-Dorico solution better than the one you’ve come up with and even if the Devs were to add it as an assignable key command, we’re a decent ways off from 4.0, so it would be a while.

The author isn’t wrong; K doesn’t disable MIDI input.

With duration before pitch, if you intentionally input an eighth, forget to leave note input, start noodling on your midi keyboard, you can potentially input an unlimited number of eighths.

If you turn on pitch before duration, Dorico primes itself to input pitches you play, but it will only ever actually input the last pitch you played, and it won’t do so until you type a rhythmic value. The potential number of notes (or chords) you can input inadvertently is one.

Yay! Someone finally understood what is going on with my setup! Yeah, I guess it would help to mention that my music keyboard is between me and the computer keyboard and is a beast, 88 keys, Komplete Kontrol S88 Mk2, so yes much more likely to accidentally hit a key.

1 Like

Having to reach over a MIDI keyboard for typing must be really bad for hand-arm strain.

Any chance that rearranging your desk setup might bring several advantages?

I have a made a note of your request to add a command that toggles the state of the Enable MIDI input checkbox on the Play page of Preferences. I can’t say when it will be implemented, however, and as others have pointed out, there are no released planned imminently.

2 Likes

Thank you. For now, the AHK script works, albeit not perfecr.

Here’s a pic of my setup… It works well for me and I don’t experience any strain on my arms or back. As you can see the desk curves in towards the middle going across, so I can push my piano keyboard in further and not have to reach as far to get to my computer keyboard. I got this idea from a youtube video. The music keyboard stand has nice casters so I can roll the stand with my keyboard in an out and even has brakes on the casters to hold it in place.