Skip to content
LilyQuick: allows fast entry of Lilypond code inspired by Finale's Speedy Note Entry. Currently for Linux only. Requires a MIDI keyboard and a numeric keypad.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LuaSource
.gitignore
Auxillary_stuff.lua
INSTALL
LQ_Reference.png
LQconfig.lua
LQkeyboardEvents.lua
LilyQuick.c
LilyQuick.lua
Linux.lua
Makefile
README
installLQ.sh

README

LILYQUICK

Welcome to LilyQuick, originally written as a replacement for Speedy Note Entry when I moved from Finale to Lilypond, and then much improved. The basic idea is to play notes on a MIDI keyboard with your left hand, then while they are sounding, press a note on the numeric keypad with your right hand corresponding to the duration. For example, to get "f2", play an F on the MIDI keyboard, and press number 5 on the numeric keypad. The advantage to this approach is excellent speed and accuracy, and you get to hear the notes as they are being entered.

VIDEO

I did a demonstration video that you can watch at https://youtu.be/eh8mgF1CNAo

NUMERIC KEYPAD LAYOUT

The default key layout is as follows: numeric keypad keys 0-6 produce notes in conjunction with the MIDI keyboard.
6 - semibreve/whole
5 - minim/half
4 - crochet/quarter
1 - quaver/eighth
2 - semiquaver/sixteenth
3 - demisemiquaver/thirty-second
0 - last note value (useful with repeated dotted notes)

For longer and shorter values, see setting note lengths below.

7 adds whole measure rests such as R1* , then changes to data entry mode, where the numeric keypad behaves as normal. Pressing enter leaves data entry mode. The type of rest is from the variable fullRest in LQconfig.lua. So to enter 15 measures of rest, you would type 7, 1, 5, enter on the numeric keypad.

8 is for entering tuplets. The 8 key enters \tuplet, then enters data entry mode for the numbers. The enter key leaves data entry mode and adds the curly bracket " { ", ready for note entry. So for quintuplets you would press 8, 5, /, 4, enter; which would type " \tuplet 5/4 {"

If you only ever use triplets, you can add the ratio after the Tuplets function:
	["8"] = { Tuplets, "3/2" }, 
(in LQkeyboardEvents.lua)

9 just adds a right curly bracket " }"

+ alternates between entering left and right slurs: " (" and " )"

- adds "\fermata", but can be customised to your own needs

= or / adds a tie "~"

. adds a dot to the rhythm

* changes the previous note enharmonically, for example cis to des. Press again to cycle between possibilities.

The Enter key either exits data entry mode, or adds a bar check and newline: " |\n".

F8/F15 exits LilyQuick.

F9/F16 sets the key. Press F9, then type the number of sharps or flats on the numeric keypad.
For example, "1" means one sharp, "-3" means three flats, etc.

In C major, LilyQuick will type a chromatic scale as follows: c cis d es e f fis g gis a bes b.

SHIFT F9/F16 alternates absolute and relative input modes. The first note played after relative mode is selected becomes the reference note (so to avoid octave indications on your first note, play it straight away after selecting relative mode).

F10/F17 sets the measure length for rhythm counting and full measure rests. Type in either a duration (eg. "1", "2." etc) or two numbers like "3/4" or "5/8". The plus key on the numeric keypad will enter "\breve".

SHIFT F10/F17 Set note lengths. For notes longer than whole or shorter than thirty-seconds you can change the note lengths the keys 1-6 will produce. After pressing SHIFT F10/F17, press:
"2" for \longa - 8
"3" for \breve - 16
"5" for 1 - 32
"6" for 2 - 64
"0" to duplicate Denemo’s layout (0 = 1, 1 = 2, 2 = 4 ... 6 = 64)

F11/F18 Toggles rhythm counting (see below).

F12/F19 lets you adjust the octave of a note that has just been entered (useful for the first note of a relative octave passage). Press F12/F19, then (on the numeric keypad) '+' to raise an octave, or '-' to lower an octave.

SHIFT F12/F19 disables/enables the numeric keypad. If you are typing some numbers into another program and you get r8 r2 etc, press shift F12/F19 make the numeric keypad behave as it normally does without quitting LilyQuick and losing your key/time settings.

RHYTHM COUNTING

When rhythm counting is turned on, LilyQuick will keep track of rhythms you have entered and automatically enter a bar check ("|") and a newline. Enter your measure length with F10/F17.

Pressing Enter on the numeric keypad adds a bar check and new line manually, and resets the counting (useful for \partial measures). Pressing SHIFT Enter resets the counting without typing anything.

To enter a tie over the barline, enter any note value larger than the remaining time left in the bar. For example in 3/4 time, pressing 4 twice while holding an F on the midi keyboard will produce:

f4 f

Pressing 5 (for a half-note) will produce:

f4 f f~ |

IMPLEMENTATION

LilyQuick intercepts keystrokes from the computer keyboard. If they’re not from the numeric keypad, they are sent straight on to the system. If they are, they are sent to the Lua program, which can create vitual keystrokes. At the moment it can send any character that can be typed on the regular part of the computer keyboard using the shift key. This includes all characters I regularly use for inputting Lilypond code. I don’t know enough about non-English keyboard layouts, and whether people would want to enter non-ASCII characters when entering notes in Lilypond. It shouldn’t be too hard to add this feature if the need arises.

What LilyQuick does with incoming keystrokes is defined in LQkeyboardEvents.lua

Intercepting computer keyboard keystrokes requires superuser privileges (sudo).

CUSTOMIZATION
LQconfig.lua contains a number of options you may wish to change, such as absolute/relative note entry, MIDI output channel etc. See the INSTALL file for more information on deviceName and MIDIKeyboardName. The file LQkeyboardEvents.lua determines how incoming computer keyboard keystrokes are handled, and is completely customizable. To type a simple string, just include it (like the entry for "9"). Otherwise the entry should be a table containing a function, and the parameter to send to it. To send multiple parameters, put them in a table (like the function Articulation).

DIFFERENT KEYBOARD LAYOUTS
If you use a different keyboard layout (German for example), some characters may not type properly. For example the character "'" may be typed as "ä". There is experimental support for other layouts. First set you layout at the bottom of LQconfig.lua:

specialKeyboardLayout = "de"

for German keyboards. Then add keyboard exceptions as needed in Ausillary_stuff.lua from line 191. I have added most of the problematic punctuation, but this should be tested (I’m having trouble getting my keyboard to stay in German layout). Ask me if you need help with your own layout.

You can look up your current layout by typing
"setxkbmap -query".



TODO
- Allow make install to put the executable into some /bin directory. Not sure how to tell it where the Lua scripts are yet.

You can’t perform that action at this time.