How do I edit a LilyPond file?

With any text editor, as long as you know the rules.

Learn the words

LilyPond does take some learning.  Fortunately it is well-documented.  Read at least the first two links at lilypond.org/manuals.html.  Before you dive into a massive score, try notating a few short tunes.  At any time, I have at least a dozen 32-bar folk tunes I can’t actually play because they’re bad photocopies of bad handwriting ((If you don’t have any scrappy folk tunes that need rewriting, try hanging around at disreputable folk sessions and you’ll soon acquire some.)).

Continue reading “How do I edit a LilyPond file?”

How do I read this LilyPond file?

By opening it in the LilyPond application and typesetting it to a PDF.

Where do I find the LilyPond application?

LilyPond is free under the GNU General Public License ((To learn more about the General Public License and the philosophy behind it, visit the Free Software Foundation at www.fsf.org.)).  You can find installers for Mac OS, Windows and Unix/Linux at lilypond.org/download.html.

  1. Click on the link for your operating system.
  2. Follow the instructions for “Compiling a file”, to make sure everything works.
  3. Take note of the instructions for “Running on the command-line”.  You don’t need them right now, but you eventually will.

Continue reading “How do I read this LilyPond file?”

What is a LilyPond file?

It’s a text format for storing sheet music, and many existing classical pieces have already been notated using it.

Example

Here is the some LilyPond source code.  It may be written in any text editor.  It may look intimidating, but scroll down to see what happens to it.

\version "2.16.0"
\include "english.ly"
\header {
	title = "Drowsy Maggie"
	composer = "Traditional"
}

\relative c' {
	\key e \minor
	\time 2/2

	\repeat volta 2 {
		e4 b'8 e, d' e, b' e, |
		e4 b'8 e, a fs d fs |
		e4 b'8 e, d' e, b' e, |
	}

	\alternative {
		{ b'8 a b cs d a fs d }
		{ b'8 a b cs d a fs a }
	}

	\bar "||" \break

	d4 fs8 d cs4 e8 cs |
	d8 e fs g a fs g e |
	d4 fs8 d cs4 e8 cs |
	b8 a b cs d a fs a |

	d4 fs8 d cs4 e8 cs |
	d8 e fs g a fs g e | 
	a8 fs g e fs d e cs |
	b8 a b cs d a fs d |

	\bar "||"

	e1

	\bar "|."
}

We can compile the source code using the LilyPond program.  It outputs nicely formatted sheet music, as seen below:

Continue reading “What is a LilyPond file?”

Why will the music CD I play on my computer but not in my CD player?

Most likely because it is a data CD containing audio files, not a music CD containing audio tracks.

Check the basics first

It is also possible that your computer isn’t burning CDs properly.  See Why does the music CD I burnt on my computer skip when I play it?

If you are sure the CD does indeed work in computers, it is probably a formatting problem.

Continue reading “Why will the music CD I play on my computer but not in my CD player?”

Why can other computers write to this memory stick, but mine can’t?

Because the memory stick is not formatted for your computer’s native filesystem.

Assigning meaning to the numbers that assign meaning to other numbers

Back in What is a file extension? Why does it matter?, we learnt the importance of file names and file extensions.  However, even file and directory names are stored as a sequence of numbers.  The filesystem is a set of rules about how to turn that sequence into folders and files.

It would be nice if all computers used the same filesystem.  As usual, they don’t.

Continue reading “Why can other computers write to this memory stick, but mine can’t?”

Why does the music CD I burnt on my computer skip when I play it?

Because it has some burn errors.

Keep the plates spinning

One of the few consistent virtues of computers is patience.  They may rudely insist that we answer “OK” or “Cancel” to some inane question we don’t understand, but they don’t complain if we wait hours before answering.

Burning a disc is a rare exception.  It is a physical process, with the disc being spinning at up to 4,800 revolutions per minute ((Wikipedia entry on CD-ROM Transfer rates)).  Then the drive must write retrieve the information to burn just as it needs it – up to 900 megabytes worth.  There are two ways that this can go wrong: (1) physically shaking the disc as it spins, or (2) interrupting the data transfer.

Continue reading “Why does the music CD I burnt on my computer skip when I play it?”