Easier way to enable/disable MIDI keyboard input

Please someone tell me there’s an easier way to enable MIDI keyboard input than this AutoHotKey script I came up with. I didn’t see any key commands for it under preferences, play. Also, recording a macro did NOT work except for opening the preferences window, beyond that it didn’t record anything.

Send “^,” ; Ctrl + , to open preferences window, then TAB 10x to get to enable midi input checkbox
Send {tab}
Sleep 500 ; not sure why sleep command was necessary (found this on a forum)
Send {tab}
Send {tab}
Send {tab}
Send {tab}
Send {tab}
Send {tab}
Send {tab}
Send {tab}
Send {tab}
Send "^ " ; space should have been sufficient, but for some reason had to be Ctrl + space
Send {Enter}
Send {Enter}

There isn’t a direct command for enabling or disabling a MIDI device, no. Can you say a bit more about the nature of your requirement? Why do you need to repeatedly disable and enable MIDI input while you’re using Dorico?

Sometimes it’s easier to edit or input using the computer keyboard, sometimes it’s easier using the music keyboard. I’m sorry I wasn’t more clear about not doing it all the time as you alluded to. I don’t do it very frequently come but when I do need to do it, it’s a lot easier to have a key command. I mean how hard would that be to implement?

How hard would it be to hit Escape if you want to noodle on your keyboard without inputting notes? Or using pitch before duration?

Please explain your requirement for actually disabling MIDI input. Having a MIDI keyboard active doesn’t in any way prevent you from editing or inputting music with your computer keyboard, just as having a computer keyboard active doesn’t prevent you from using your MIDI keyboard.

When I read it, my confusion too was why it had to actually be disabled?

For my own workflow, I either press a letter (note) key, or a MIDI keyboard key at my whim almost - interchangeably. Its not like I have to enable/disable the MIDI keyboard in between. The only thing I may change is chord mode and pitch before duration settings, and there are shortcuts for those.

This is the simple question. Why can’t you simply implement a key command for enabling or disabling MIDI input?

Why not give me a phone call so we can discuss?


I would have a use for this too if it could quickly be done via a shortcut. I can do it now by switching to my MIDI routing software and disabling the path to the port Dorico uses, but I’m too lazy. When typing in chord symbols via the popover often I will need to play my MIDI keyboard to make sure I have the correct voicing, but of course this will input chords. I need to waste time exiting and re-entering the popover to input chords as obviously Ctrl+Z doesn’t work in the popover. If I could just disable my keyboard before chord input and re-enable it after that would save a bit of time.

No one was unfriendly. You got three responses that engaged with your request in an attempt to discuss it, two from fellow users.

We’re not support people. We’re fellow users, with the exception of @dspreadbury who is Dorico’s Product Marketing Manager.

It’s not that you’re asking something unreasonable; rather that you’re asking for something that I don’t think anyone has asked for in the history of Dorico (at least, not on this forum or the Facebook group). Sure, someone’s already chimed in to support your request, so other people may have a use for this, but why should the development team drop everything in order to implement something that two people in the world want?

@FredGUnn You might find it useful to set Write > Note Input Options > MIDI Input > Advance during chord symbol input via MIDI keyboard: to Do not advance, or possibly “Keep popover open”.

1 Like

Maybe there’s a misunderstanding. All I was asking for is to find out if there’s some other way to accomplish what I was asking. It was a simple yes or no question and an attempt to get a simple answer. Isn’t that why we’re all here, to help each other? And I know if I thought about it, I can’t be the only one out of thousands of users. Maybe the only one bold enough to say something?

By-the-way, I am a developer and work in I.T. at Wells Fargo, so I am very tech savvy and write code all the time and the feature I’m asking for is not complicated. It would be an extremely easy thing to add. And they wouldn’t have to “drop everything” as you’re asserting. This is a simple five minute thing to make Dorico more user friendly.

Dorico developers and trainers in the videos are constantly pushing for us to lean heavily on the key commands, so why not add yet another one?

Everyone has different ways of working and what works best for me may not be your preference. It was not difficult to write the AHK script to do what I wanted to do. It’s useful, for instance, if you don’t to want to worry about accidentally hitting a key on your music keyboard when you’re working with the mouse and your computer keyboard. Yes, I know I could press undo (ctrl-z), but it’s just as easy to turn MIDI input off and not have to worry about it until I need it.

It’s all about flow right? I hit ctrl-m and instantly I toggle from MIDI input to not allowing MIDI input, it takes a split second to switch back and forth, versus, pressing ctrl + , (comma) and using the mouse to check the box and then clicking ok. That’s three actions versus one and that improves my flow and saves me time. No, I don’t do it all the time, but it’s so nice to have a key command to make things flow more smoothly.

That doesn’t apply to me as I don’t use chord symbols.

If I want to use my qwerty keyboard, I touch my qwerty keyboard. If I want to use my MIDI keyboard, I touch my MIDI keyboard. That’s my “flow”, and it doesn’t involve one action let alone three. I guess it involves ensuring that my desk is laid out in such a way that I can’t hit a key on the wrong keyboard by accident. It does mean, though, that if I’m happily typing individual pitches on my qwerty keyboard and then need a triad or something, I can move a hand over to the MIDI keyboard, play the chord and not have to think about toggling on/off MIDI mode, quord mode or anything else.

But hey, we’re all different.

Incidentally, if I start a post by tagging someone else’s username, you can safely assume that that post isn’t aimed at you.

You can download AutoHotKey at [AutoHotkey Downloads]. Make sure you click the big blue button because, AFIK, it’s the only version that includes the installer. Then read the ‘Getting Started’ tutorial and create the script using the code I added in the above post. Btw, you may already know this but to be sure:

^m is the hotkey combination for ctrl-m and the double colons at the end are required before the block within the curly braces.
^ and the space next to it ("^ ") within the double quotes is the hotkey combination for Ctrl + Space Bar and is what actually checks or unchecks the checkbox for the ‘Enable MIDI Input’ control on the ‘Play’ tab of preferences.
Sleep 500 is critical and somehow enables the “Send {tab}” commands to do their thing

Above all, don’t remove anything from the script; otherwise, it will stop working.

To simplify life even more, you can add your autohotkey script to the windows startup process so it will always be there and you don’t have to worry about opening it manually (see How to Add Programs to Startup in Windows 10).

A few more things to clarify:

  1. After you create the script with AHK, right-click it and select ‘Compile Script’, this will create an .exe with the same name.
  2. Then, either move the file to the startup folder here (change [user] to your user name of course):
    C:\Users[user]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

When you restart your computer, your AHK script will be ready and waiting, so when you open Dorico all you need to do to use it will be to press ctrl + m (you can change the script to use a different letter or even different control key combinations).

I just discovered that the reason my script worked is that I “primed” the preferences by selecting the ‘Play’ tab and exiting preferences without changing anything else. When you reopen preferences after setting the tab that it’s on, it appears normal behavior that it defaults to the last know tab you were on. However, if you move to a different tab, such as ‘General’, then exit, the script won’t work.

So, now I’m working on how to get it to always go to the play tab before going through the rest of the steps in the script.

You can get to Play mode via Ctrl-4 (Cmd-4 on Mac).

Thanks, just changed my default. Instead of entering a whole string of nonsense I now just enter one nonsensical chord that I can undo LOL! I don’t expect Dorico to be able to distinguish between an inversion of Cmaj6 and Am7 (or an upper voicing of Db13 vs G7+9+5 either) so I always type it in myself. I have never used MIDI chord symbol input and don’t ever expect to, so it would be cool if I could either turn it off, or temporarily disable my MIDI keyboard for this. (I always use a standalone VST, so no need for Dorico to play back any sort of MIDI thru either.)

I was referring to the ‘Play’ tab in the preferences, not the ‘Play’ tab for the five major items (Setup, Write, Engrave, Play, Print).

There is another way to write the AutoHotKey script enable/disable MIDI input, but it sounds like you’re not interested so I’ll post it separately.