LYTXOL: LilyPond ScratchPad for iPhone

The LilyPond ScratchPad for iPhone is a TextExpander Overlay Keyboard, to write basic LilyPond (LY) code, which can then be quickly transferred to a desktop computer, and integrated into actual LY code. LilyPond ScratchPad for iPhone is abbreviated LY-ScratchPad, or LYTXOL (for LilyPond TextExpander Overlay Keyboard).

LYTXOL is hosted by SourceForge.net: http://lytxol.sourceforge.net. The main sourceforge project page is https://sourceforge.net/p/lytxol/home

Combining the LilyPond ScratchPad with a TextExpander- and DropBox-enabled text editor, makes a powerful platform on which to write LilyPond-code on the go, quickly transport that code to your desktop, and then integrate it into actual LY code files.

LilyPond ScratchPad for iPhone was written with the xbn.textexpanderOL Java library, another sourceforge.net-hosted project.


Contents

Contribute to LYTXOL

Please help improve the LilyPond ScratchPad for iPhone. Your advice, suggestions, and criticism are all appreciated. I am a relative newcomer to LilyPond, and my relatively-narrow focus is on arranging acapella music. It is easily-possible to make multiple flavors of LYTXOL available simultaneously, based upon the needs and wishes of the larger LilyPond-iOS community.

Beyond fixing bugs and addressing critical-missing functionality, here are the primary needs of the LYTXOL project:

Any contributions are greatly appreciated.

            Yours sincerely,
           
            Jeff Epstein
           




[TOP]   Using LYTXOL: LilyPond ScratchPad for iPhone

This documentation assumes you have a basic knowledge of LilyPond. There is a very quick tutorial if you need it.

Reference: LYTXOL Quick-Reference Card complete key-command reference with LYTXOL key-commands only and with both overlay and actual (symbol) key-commands.

There are four kinds of snippets:

The LYTXOL LilyPond TextExpander Overlay Keyboard

The red section is for Quick-Entry Mode. The mirror image of Quick-Entry Mode (the left side) is for entering unusually-high (32-128) duration, dots (2 and 3) and octavization (2 and 3 apostrophes or commas).

Download this overlay for printing: A single (smaller, grayscale) JPG (26kb), DOC (330kb), PDF (16kb), and all three ZIPped (65kb).

And here is the actual (symbol) keyboard in iOS4 (on my iPod Touch), which is 'underneath' the LilyPond overlay:




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Pitches

Pitches can be output




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
High duration, high duration dots and high octavization

Contents:




[BACK] LYTXOL: LilyPond ScratchPad for iPhone
High octavization and duration: An overview

Low duration and octavization may accompany pitches in the same snippet. High octavization and duration may not accompany pitches. They are separate snippets which may follow pitch-snippets.

Low is defined as:

High is defined as:

Unfortunately, because every snippet is followed by two spaces (because of a TextExpander quirk), you'll need to eliminate the spaces between the raw-pitch snippet and the following high-duration/octavization snippet. Press backspace a couple times before executing the latter...or just do a global search and replace on your desktop before integrating it into your LY code files.

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
High octavization (no duration)

High octavization is two or three octaves up (apostrophes) or down (commas).

Examples:

What LY code Key Combination Description Key Combination
Two octaves up (two apostrophes) '' Click the apostrophe button twice, then the button just above it twice. The second terminates the snippet.
Two octaves down (two commas) ,, Click the comma button twice, then the button just below it twice.
Three octaves up (three apostrophes) ,,, Click the apostrophe button three times, then the button just above it twice. The second indicates that no duration will follow.
Three octaves down (three commas) ,,, Click the comma button three times, then the button just below it twice.
F-sharp two octaves up fis'' Pitch: Click the pitch button and the button to its right twice. This terminates the pitch-only snippet.
Eliminate excess space: Hit backspace twice.
High octavization: Click the apostrophe button twice, then the button just above it twice.


[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
High duration (no octavization)

The keys below are the high-octavization keys.

Duration number 'Raw' Key combination Dot key Dot-termination key
32
64
128

Notes:

Examples:

What LY code Key Combination
32 duration, by itself 32
Dotted-64 duration 64.
128 duration, 2 dots 128..
Whole note duration, with 3 dots 1...
E natural, double-dotted half-note e2..


Note that any duration accompanying a high number of dots is on the left.

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Rests and silences: With ALL durations

While pitches can only exist in the same snippet as 'low' duration, rests and silences can exist in the same snippet with all duration numbers (and dot-amounts).

For example:

What LY code Key Combination Description Key Combination
Rest by itself r Click either rest button three times. Also see Quick-Entry Mode
or
Silence by itself s Click either rest button once, then the button to its left twice. Also see Quick-Entry Mode
or
Rest half-note r2 Click either rest once, then the 1-duration button on its same side, twice
or
Rest doubly-dotted quarter-note r4.. Rest: Click either rest once.
Duration number: Click the 4-duration button on its same side.
Two dots: Click the button just above the 4 twice, ending with the key just to its right.<
Exception: If a right-side dotted (or doubly-dotted) whole note, end with the button just to the left of the dot--the G.

or
Silence, dotted whole-note s1. The 's': Click either rest button once, then the button to its left once.
Duration number: Click the 2 on its same side once.
The dot: Click the button just above it, and end with the button just to the right of that.

or
Rest triply-dotted half-note r2... Click either rest once, then the 2-duration button on its same side, then the button above it, three times.
or
Silence, 128th-note s128 The 's': Click either rest button once, then the button to its left once.
Duration: is 128. Click the final key twice to indicate no dot.

or

[BACK]




[BACK] LYTXOL: LilyPond ScratchPad for iPhone
High octavization and high duration

Examples:

What LY code Notes Key Combination
Three octaves down, 32 duration ,,,32 Three octaves down:
32 duration, no dots:

One octave up, dotted-64 duration '64. One octave up:
64 duration, one dot:

128 duration, 2 dots, two octaves down ,,128.. is 128, is the 'dot key' right above it (the last one in 128's key-combination), and is the 'dot-termination' (and snippet-termination) key, just to the right of that.
Whole note duration, with 3 dots 1... Low duration numbers (1 through 16) with a high number of dots (2 or 3) may not accompany pitches.
F-sharp dotted-eigth-note, two octaves up fis''8. Pitch: Click the pitch button, then the button to its right twice.
Eliminate the excess space.
High octavization: Click the apostrophe button twice, then the button just above it.
Duration: Click the (right-side) 8, the button just above it for the dot, then terminate the snippet with the key just to the right of that.



Note that any duration accompanying high-octavization is on the left.

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Pitches by themselves: Raw Pitches (no duration or octavization)
Standard note-entry mode

Raw pitches can be output in one of two ways. This section describes standard note-entry mode. There is also a quick-entry mode.

Raw Pitch Type For Example
What LY code Key Combination Description Key Combination
Flat E flat ees Click the pitch button once, then the button to its left twice.
Natural C natural c Click the pitch button three times.
Sharp A sharp ais Click the pitch button once, then the button to its right twice.

When duration follows a pitch

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Pitches with a duration between 1 and 16, having zero or one dot

Notes:

Examples:

What LY code Key Combination Description Key Combination
C natural quarter-note c4 Pitch: Click the pitch button once.
Duration: Click the (left-side) 4-button twice.
F-sharp dotted-eigth-note fis8. Pitch: Click the pitch button and the button to its right,
Duration: Click the (right-side) 8, and end with the button just above it.
D-flat sixteenth-note des16 Pitch: Click the pitch and the button to its left
Duration: Click the (only) 16-duration button once to indicate duration, and one more time to indicate no dot.

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Pitches with one-level octavization (one apostrophe or comma)

Only one-level octavization (one comma or apostrophe, considered 'low octavization') may accompany a pitch in the same snippet. For higher octavization...

Examples:

What LY code Key Combination Description Key Combination
C natural, one octave up c' Octavization: Click the octavization button, then the button above it,
Pitch: Click the pitch once for the pitch itself, then again to terminate the snippet (indicating no duration).
B-flat one octave down bes, Octavization: Click the octavization button, then the button below it.
Pitch: Click the pitch, then the button to its left twice.

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Pitches with both duration and octavization

Only 'low' duration and octavization may accompany pitches in the same snippet. For higher octavization and duration...

Examples:

What LY code Key Combination Description Key Combination
G natural dotted-sixteenth, one octave up g'16. Octavization: Click the octavization button, then the button above it,
Pitch: Click the pitch
Duration: Click the duration-number, then the button right above it.
F-sharp eighth-note, one octave down fis,8 Octavization: Click the octavization button, then the button below it.
Pitch: Click the pitch button, and then the button to its right.
Duration: Click the duration-number twice.

[BACK]




[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Standalone snippets

Hold, slur, hold+slur

~
(
)
(~
)~

Manual beaming

[
]

Tab (2 spaces), return+tabs

Square braces are only to show how many spaces there are. They are not part of the snippet.

[    ]
[      ]
[        ]
[          ]
[            ]
[\r\n  ]
[\r\n    ]
[\r\n      ]
[\r\n        ]
[\r\n             ]

Bar, double-bar, repeats

|
|\r\n
||
||:
:||

Curly braces, variables

{
= {
}
}\r\n

Chords and simultaneous blocks

<
>
<<
>>
\\
}  \\  {
<<  {
}  >>

Documentation

Note the key commands are shaped like a V and lowercase h.

THIS QUICK-REFERENCE CARD
LYTXOL VERSION INFO



[BACK]   LYTXOL: LilyPond ScratchPad for iPhone
Raw pitches: Quick-Entry Mode

When you need to enter a series of raw pitches, particulary in music having lots of runs, Quick-Entry Mode is much easier than inputting raw-pitches in standard entry mode. In Quick-Entry Mode, keys are very close together, and only two presses are required for a snippet. In all other snippets, at least three keys are in each key-command.


Portion of the Brandenburg Concerto No. 3. (only slightly edited...)

Apologies to anyone who uses the Euro, Pound and Yuen keys a lot.


The top right of the LilyPond TextExpander Overlay Keyboard is for Quick-Entry Mode.

-->

There is no way to enter duration or octavization in Quick-Entry Mode.


Quick-Entry Mode: Flat

Notes: To output a d-flat (des):

Rests: To output a rest ('r') in flat mode, use:

Rests can be output in flat and natural quick-entry modes. Silences can be output in sharp mode.


Quick-Entry Mode: Natural

Notes: To output a e-natural (e):

Rests: To output a rest in natural mode, use:


Quick-Entry Mode: Sharp

Notes: To output a e-sharp (eis):

Silences: To output a silence ('s') in sharp mode, use:

[BACK]




[TOP]   LYTXOL: LilyPond ScratchPad for iPhone
A very quick LilyPond tutorial

LilyPond is an open-source-and-free programming language to create beautiful sheet music (and midi/sound-files of that music). It runs on Windows, Mac, and Unix-based OSes (Linux and BSD). Note it is a programming language. There is no window- or mouse-based note-entry to be found. LilyPond only reads plain-text files.

Install LilyPond on your desktop computer. Create a new text file named rainbow_connection.ly, with this text:

\version "2.12.3"

\relative c' {
	\time 9/8
	\key a \major
	cis4.     e~      e4 a8   |
	b4 cis8   cis4.   r       |
	d,4.~     d4 e8   a4.     |
	a4.       b       r       |
}

Run LilyPond on it (via right clicking on the file and clicking 'Generate PDF...', or typing 'lilypond rainbow_connection.ly' in the command console). Look at the PDF file that is created in the same directory as the LY file:

If you have even a minimal knowledge of music, it is not difficult to understand the basics of LilyPond. Some observations:

The basics of LilyPond are indeed easy to understand. Pushing beyond the basics, however, absolutely requires that you read--at least--the first hundred pages of the LilyPond learning manual. Once you get through the learning manual, a world opens up to you.

Only after that, can you start perusing the THOUSANDS of pages of LilyPond documentation. You thought I was exaggerating?

[TOP]




[TOP]   LYTXOL: LilyPond ScratchPad for iPhone
Other standalone snippets




[TOP]   LYTXOL: LilyPond ScratchPad for iPhone
Requirements, installing and uninstalling, and TextExpander quirks

Requirements

Minimum Requirements:

Recommended:

Installation

TextExpander has some quirky behavior. If you have any issues installing LYTXOL, try to uninstall and reinstall.

  1. Purchase TextExpander touch from the Apple iTunes App Store.
  2. Once it is downloaded and installed on your iPhone, open it, and go to the Groups tab (img).
  3. Click on the + at the bottom right.
  4. Select Add via URL (img) and paste this url (img) into it:
    http://lytxol.sourceforge.net/lilypond_scratchpad_txol.textexpander
  5. If you are overwriting an old version of LYTXOL, then click the replace button (img).
  6. You are presented with the list of Snippet Groups (img), one of which is lilypond_scratchpad_txol. Select it.
  7. If you see this (img), it didn't work. This is one of those TextExpander quirks. Go back to the Snippet Group listing, delete lilypond_scratchpad_txol, and then re-get it with 'Add via URL'. If it still doesn't work after a few tries, uninstall and then reinstall. Don't uninstall TextExpander itself, just follow the steps below.
  8. If you see this (img), it worked.
  9. Click on the Compose tab (img), and start using the LilyPond ScratchPad.

Uninstallation

These instructions are how to uninstall only the LilyPond ScratchPad. You never need to uninstall the TextExpander app from your iPhone.

  1. Open up TextExpander and go to the Groups tab (img).
  2. Delete the LY-ScratchPad: Swipe across the lilypond_scratchpad_txol, and then touch [Delete] to confirm (img).
  3. Press the Home Button (the physical button below the screen) to exit TextExpander (img) and any other applications.
  4. Double-click the Home Button to Open the Multitasking tray (img)
  5. In the multitasking tray, touch and hold TextExpander, until it jiggles and a (-) appears at the top left of each app (img).
  6. Close TextExpander by clicking on the (-), and any TextExpander-enabled text editors (I use Notebooks).

Now the installation instructions may be repeated.

TextExpander has some quirky behavior (and wishes)

There are some odd behavior issues to note with TextExpander.

Quirk: Sometimes installation fails

As stated in the installation instructions, sometimes installation fails for no apparent reason. Instead of LilyPond snippets (img), this is what you see (img). When this happens, just delete the LilyPond snippet group and try to install again. If it doesn't work after a few tries, follow the uninstall steps before trying again.

Quirk: Two spaces after every snippet

You'll notice every snippet is followed by two spaces. Without these spaces TextExpander will randomly and frequently stop recognizing snippet-abbreviations. Consider getting used to doing to global search and replace on your desktop computer, to eliminate these spaces.

One known issue is how, if the abbreviation 'ht' were configured to expand to 'Hello there!', then one might expect 'hht' to expand to 'hHello there!'. It doesn't, and I wish it did. Please consider writing to the TextExpander developers and requesting this change.

Wish: The ability to turn on and off Snippet Groups

Not directly related to the LilyPond ScratchPad, but it would be loads of greatitude if it were possible to selectively turn on and off individual Snippet Groups. Please consider writing to the TextExpander developers and requesting this change.

Thanks!