Old 01-05-2017, 09:10 PM   #1
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default Sharing my notation keymap



Awhile back I mentioned on here that I was thinking of sharing the keymap I made for using Reaper's fabulous notation editor. A couple things delayed my following through on this, not least of which is the incredible pace of development of notation editor, which is quickly shaping up to be one of the fastest and easiest of its kind IMO. The same can't be said of this keymap - it's fast to use, but it comes with some caveats if you want to makes changes to it yourself. That said, I've put a lot of thought into the way things are laid out, so give it a chance. It won't be like what you're used to with Sibelius or anything else, but Reaper's notation editor implementation has it's own unique requirements of a control scheme, which I've gone to some lengths to consider.

Using someone else's pre-made customizations is somewhat contrary to Reaper's raison d'etre; it's not something I find myself wanting to do very much. All the same, I'll share this if for no other reason than to have a document to remind myself how to reinstall the thing if I should need to. So I'll give a bit of background info and then provide "simple" directions to install.

=====================

Some things to get out of the way:

- intended for speed entry using Reaper's midi step input, with one hand on midi controller and one hand on computer keyboard, with a minimum of hand movement. This is a popular and efficient way to use notation editors

- enables shift and ctrl+shift key combos on the numpad, as well as use of the numlock key, pause key, and scroll lock key

- requires Autohotkey, plus my supplied AHK script. Therefore this is Windows only (OSX doesn't need workarounds to use shift numpad key combos)

- AHK script activates only in the midi editor and in the action list's Keyboard/MIDI/OSC Input dialog, leaving the keyboard un-remapped in other contexts

- the script swaps shift for alt when the shift key is used as a modifier on the numpad number keys and decimal key. Shift as a modifier to these keys would ordinarily not work. To assign, press alt in combination with the key in the action list shortcut input dialog, rather than shift. When using the shortcut, use shift as you'd expect.



=====================


Some explanation. My keymap is unique because I've used Autohotkey to enable the assignment and use of shift and shift+ctrl modifiers on the numpad, as well as numlock, pause and scroll lock.
Autohotkey is Windows only, but if you use OSX you can just consult the image and more or less map everything you see without any problems, as far as I know. If you have a numpad that is I'd like to make an OSX version when I get a chance.

On Windows, because of technical details having to do with the OS, pressing shift and any numpad key will toggle numlock and send that key instead of a shift+numpad key combo. The problem arrives when we see that the keys sent in such a case are duplicates of the insert, delete, home, end, page up and page down keys. At least in Reaper's case (and much other software as I've been given to understand), these duplicates can't be differentiated. Meaning pressing a shift+numpad combo is redundant because one could just press the dedicated key for that function.

I was intent on getting more out of the numpad/arrow key region. What I've done is to swap the shift key for the alt key when used in combination with the number keys and the decimal key on the numpad. These are the keys which would normally toggle with shift. Now they will act as though alt was pressed instead of shift, when you use shift as a modifier with them. A caveat is that to assign the shortcuts for these keys, you must remember to create the shortcut using alt as the modifier instead. The shortcut should read alt + numpad 1 for example, but it will be triggered by pressing shift and numpad 1 on your keyboard.

Another caveat is that because the script uses numlock, you must have numlock engaged. If you need to engage numlock, you can't do so while the midi editor or action list shortcut assignment dialog have focus, because the script will be active and numlock is remapped. Give another window focus and the script is automatically suspended, or you can suspend it by pressing alt + ScrollLock

=====================

To install:

Export your current keymap as a backup

Go to http://ahkscript.org/ and install Autohotkey

Go to https://stash.reaper.fm/v/29415/Comma...y%20script.zip and download the zip file. Inside are the keymaps and the Autohotkey script. Extract the script wherever you like, you'll need to double-click it later.

In Reaper, go to Options -> Show REAPER resource path, and navigate to Keymaps. Place the keymap here.

In Reaper, open the midi editor actions list and go to import (on the lower left)

Navigate to the keymaps and import them. The second keymap consists of custom scripts by Lokasenna to duplicate selected notes at intervals up and down, and are assigned to the number row. You can choose whether you feel you need this.

Double click the Autohotkey script. Autohotkey should begin. You're good to go

Optional: I have the Autohotkey script set to run on start up so I don't have to bother opening it manually. You can do this by creating a shortcut to the script in the start up folder. To find it, type %appdata% in explorer, press enter, then paste this after the word appdata in the resulting directory name: "\Microsoft\Windows\Start Menu\Programs\Startup"

Last edited by Commala; 01-07-2017 at 09:06 PM.
Commala is offline   Reply With Quote
Old 01-05-2017, 09:27 PM   #2
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Notes on usage:

Arrow keys
Pressing the left/right arrow keys unmodified will move the edit cursor left/right by grid length, and select the nearest note (the pitch cursor position determines which note if there are several). Use numpad 0 in conjunction to deselect. Arrow keys up/down will move the pitch cursor up/down. Shift+left/right will expand the note selection. The note selection can be expanded per chord using shift+alt up/down. Ctrl+shift with the arrow keys will move move the position of the notes, either in pitch or in time by grid length.

Grid length divisions are on the numpad itself, and are modelled after Sibelius, where numpad 4 is a quarter note. Shift+numpad 1 sets the 64th note grid

Commands are grouped by function, and placed depending on the frequency of their use. More commonly used actions are easier to reach.

Unmodified keypresses are assigned the most commonly used actions. Shift is the modifier to access the 'secondary' tier of actions, while ctrl is used as a modifier to access actions that delete notations, move notes, or are broadly more particular in context, and therefore less often used. This layout should correspond with how easy each modifier is to reach in relation to the majority of the keys surrounding the numpad.

"Numpad del" is indicated with a rest symbol, and will delete notes but not other events. There are a number of different delete commands in Reaper's notation editor, and I've laid these out in what I hope are logical locations. Backspace will delete text ornaments and text notations when modified with ctrl.

Use the insert key to place text ornaments, and with the ctrl modifier to place text notation.

Numpad 7, 8, and 9 will change the grid division type to triplet, straight, or dotted rhythm, respecting the grid division already set.

Several keys are open to more assignments, like Enter and some of the keys surrounding it.

The number row is used to duplicate notes at intervals above the selected notes (and below using ctrl in combination). These custom actions were graciously provided by Lokasenna. They are in a separate keymap file in case you don't have a need for them, or need the number row for something else.

The "I" key is assigned to a custom action to insert notes at grid length

Besides that it should be pretty self explanatory if you look at the image.


Edit: the "Select all to end" action on the question mark/forward slash key (left of shift) is a pass through action to main, where the same shortcut (Ctrl+/) is assigned to "SWS/AW: Select from cursor to end of project". I find it useful when editing performances to use that in conjunction with julian sader's script to move all notes and cc together. This way, I can easily push and pull the tempo at a particular place without affecting the relative timing of anything after it. It's intended for editing free tempo performances, not notation

Last edited by Commala; 01-07-2017 at 09:02 PM.
Commala is offline   Reply With Quote
Old 01-06-2017, 01:18 PM   #3
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Quote:
Originally Posted by TonE View Post
How did you create the above image?
I used gimp. The glyphs are Bravura
Commala is offline   Reply With Quote
Old 01-06-2017, 02:56 PM   #4
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Quote:
Originally Posted by TonE View Post
And using a qwerty .svg as a starting point?

Maybe you can share the gimp file?
It's a bit of a mess, and I created new layers from all visible a couple times to arrive at what you see. What did you want to use it for?
Commala is offline   Reply With Quote
Old 01-07-2017, 03:53 PM   #5
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Quote:
Originally Posted by TonE View Post
No problem, nothing seriously, just to see if a method can be found to make it simple to share own qwerty mappings, to custom actions mainly.

Ideal system would be something like, taking a text file as input, with line by line contents for each defined key, e.g.

a custom action 1
s 2
d 3
f 4

q 5
w 6
e 7
r 8

y 9
x 10
c 11
v 12

Output could be a similar image as yours, directly, without long discussions, great for sharing in the forum.

Best would be making variables, then simply defining the contents of those variables. But I am sure there should be such tools available somewhere.

Here an example https://commons.wikimedia.org/wiki/File:Qwerty.svg
That sounds very cool TonE, it'd be really useful to have an automatically generated visual keymap. Although in my case, with autohotkey remapping going on, the automatic process would somehow need to be able to account for that. Sounds complicated

If you decide to go ahead with that idea let me know. I didn't start from an svg though, I don't know if that makes a difference for implementing something like what you suggest.
Commala is offline   Reply With Quote
Old 01-07-2017, 06:02 PM   #6
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Quote:
Originally Posted by TonE View Post
Using AutoHotkey in your solution makes it uninteresting for many I guess, even I know ahk quite well, but as soon as you are not on Windows (mac,linux) you would need adaptations for them, is makeable via xbindkeys, xdotool, see http://forum.cockos.com/showthread.php?t=185992
I assume people have their own methods. This is mine, and I know I probably wouldn't want to use a method created by someone else. So there's that.

As far as AHK is involved, that's a bit of a hurdle for those on Windows, but actually for users of OSX at least there is no need for workarounds, because the numpad can be used with all the modifiers. At least, this is what I've read, whether Reaper accepts that input I don't know. I'd like to find this out next time I get in front of a Mac, and make a version of this keymap for OSX if all is straightforward like I'm thinking.

Edit: I see from those links you're an old hand at AHK. You're on Linux now?
Commala is offline   Reply With Quote
Old 01-07-2017, 06:13 PM   #7
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

I was also struck the other night with a very simple idea I overlooked to accomplish the same functionality in the keymap. In which case, all I've done was an enormous exercise in frustration The use of numlock scrolllock and pause would still justify some of the effort though.

My new idea would still use AHK, but only to exchange shift and alt when the midi editor is in focus. Then all the same functions could be used on the numpad, which take advantage of the physical proximity of the shift and ctrl modifiers, without the drawbacks that come from remapping so many things.
Commala is offline   Reply With Quote
Old 01-07-2017, 08:17 PM   #8
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Quote:
Originally Posted by TonE View Post
I see, thanks. How did you come up with your concept? For example you want to concentrate on numpad, then using the modifiers, why you want those modifiers and not others? And why not even more modifiers? Is this all for mouseless operation?
Yes it's to cut down on needing to move the hand between the mouse and computer keyboard. I didn't come up with the concept, it's common to use the numpad in notation editors. I like the numpad area because it's very tactile, you can easily tell what key you're touching without needing to look. Some people are probably like this with the rest of the computer keyboard too, but the numpad is just easier in that regard.

The keys shift and ctrl are used because of their physical placement relative to the numpad. Alt is too far for most hands, using it in combination with another modifier only compounds that problem.
Commala is offline   Reply With Quote
Old 01-07-2017, 08:36 PM   #9
Commala
Human being with feelings
 
Join Date: Feb 2014
Posts: 603
Default

Quote:
Originally Posted by TonE View Post
Had a look to your ahk, did you try:

#IfWinActive Keyboard/MIDI/OSC Input OR MIDI take

Then you could save the repetition, did not try myself, but should work.
Thanks, that's a good tip!

Got it working like this:
#If WinActive ("Keyboard/MIDI/OSC Input") || WinActive("MIDI take")


Edit: updated the keymap to take advantage of new script which exchanges shift for alt when used in combination with the numpad number keys and decimal keys, which is a much simpler implementation than what was here previously

Last edited by Commala; 01-07-2017 at 09:04 PM.
Commala is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:37 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.