An "Auto HotKey" script for adding short rhythm groups in MuseScore
I devised a short AutoHotkey script to automate the process of adding short rhythm groups of notes in MS (Windows).
It works like this once Auto HotKey (macro program) has been installed and the script is running:
Select any rest, then
Pressing "Ctrl+1" creates this:
Pressing "Ctrl+2" creates this:
Pressing "Ctrl+3" creates this:
Pressing "Ctrl+4" creates this:
Pressing "Ctrl+5" creates this:
For anyone not familiar with using AHK, here are instructions:
1. Download and install the small free program Auto Hotkey.
2. Download the attached .txt file, put it somewhere handy like on the desktop.
3. Delete the extension of this file and change it from .txt to .ahk (a warning message might appear but click OK);
3. Right-click the .ahk file and select "Edit Script" to read it (text will appear in Notepad), then close Notepad;
4. Right-click the .ahk file and select "Run Script".
5. Open any MuseScore file.
Then ......
6. Click on any rest in MS and select either Ctrl+1,Ctrl+2,Ctrl+3,Ctrl+4 or Ctrl+5.
The appropriate rhythm group will immediately be created, all notes pitched as A's. Re-pitch as necessary.
The hotkeys can be customised by editing the script, as can the actual note groups.
Here's an explanation of some AHK terms, again for the uninitiated in AHK terminology:
"SetKeyDelay,50" - this makes sure the speed of key presses is not too fast. Do not change!
"^" means "Ctrl"
"^1::" sets the "hotkey" (trigger which starts the sequence of keypresses) as "Ctrl+1"
"send" simply means "type"
"4.a3a" is the sequence of keypresses giving the rhythm group
in MS
"{esc}" means the escape key. This is to turn off Step-time Note Input (delete this in the script if you'd like to continue in step-time)
"Return" stops the process.
Attachment | Size |
---|---|
Musescore add dotted rhythms and other rhythm groups by Jon Ray.txt | 350 bytes |
Comments
Thanks Jon, especially for your clear instructions.
Maybe you're interested in the following:
A few days ago I published an AutoHotKey file with which you can apply all symbols from Palette.
E.g you type 'P' and the dynamic is attached. ALL symbols of the advanced workspace have a shortcut.
Type 'M.' and marcato staccato appears and so on.
You can find it on https://musescore.org/en/node/303798
It is the first instalment of a series, which speeds up the workflow incredibly.
It has given me also the opportunity to rethink accessibility.
And questions about reducing manual stress.
One of the aims is to eliminate using the mouse. I'm almost there and will publish about it.
It's a pity that AFAIK there is no free alternative to AutoHotKey for other platforms.
In reply to Thanks Jon, especially for… by MichLeon
Thanks, MitchLeon - looks interesting. I'll take a look.
So, I had some fun and added this code to tmy AHK script:
This code means that after selecting a rest in MS and pressing "Ctrl+6", MS automatically writes out the tune "English Country Gardens"!
Haven't had so much fun in ages, so I made a screen capture video of this in action. The video is running in real-time - no speeding up! Honest! (Please note that after the tune was automatically added, I shift-dragged the first part of the tune and put it up an octave so it sounded correct). Make sure your sound is on....
https://streamable.com/3lh7xs
Amended script attached. Change ".txt" to ".ahk".
Cool idea! There are lots of interesting things that can be done with AHK, too bad it's not available for all platforms.
Hello!
I'm a Musescore user but I don't understand programming. I found this tool that you created very interesting, however, when I download the file
"Musescore add dotted rhythms and other rhythm groups by Jon Ray.txt" appears only a notepad. I can't find an option to download the file like any other, I have the option to download only the link.
Under the link but the option "Run script" does not appear.
Could you please guide me?
Much obliged...
In reply to Hello! I'm a Musescore user… by mjbartemusica1
Hi, change the extension .txt to ".ahk".
In reply to Hi, change the extension … by Jon Ray
Sim, mas como vou alterar a extensão se não consigo baixar?
In reply to Sim, mas como vou alterar a… by mjbartemusica1
Hi, right-click file, "save link as". Worked for me.
In reply to Hi, right-click file, "save… by Jon Ray
Hello friend, I did everything as you taught me however, this is not working! Through the video could you guide me in what I'm doing wrong?
I am very interested in learning as there are more resources of this type available on the MuseScore website.
Note: Use Windows 10
LINK: https://www.youtube.com/watch?v=TsAnUyGxPa8
Much obliged...
In reply to Hello friend, I did… by mjbartemusica1
Hi, the only thing that looks odd in your video is that the usual icon for AHK scripts looks like this:
(with a large H)
Maybe you could re-install AHK? Other than that I am not sure.
In reply to Hello friend, I did… by mjbartemusica1
You didn't rename the file (correctly). It's still a txt-file as you can see in your video at second 16 in the popup when you hover over it.
Windows by default doesn't show file extentions for known file types; which is a very dangerous thing. Open your explorer and turn of that view option and you'll be able to really rename the file and remove the .txt extention from it.
In reply to You didn't rename the file … by jeetee
I would love to learn how to use this feature, I've done everything I've been taught however, on my notebook it just doesn't work!
If you can guide me in what I'm doing wrong, thank you very much!
In reply to I would love to learn how to… by mjbartemusica1
Assuming Windows 10:
1. Open Windows File Explorer.
2. Switch the ribbon to the
View
tab3. Tick the
File name extensions
boxWhen you now go to rename your file, you'll be able to also change the actual extension of it.
How about #298735: Add macro facilities ?
In reply to How about #298735: Add macro… by [DELETED] 1831606
Interesting!