2.4.1 Organizing pieces with variables

When all of the elements discussed earlier are combined to produce
larger files, the music expressions get a lot bigger. In
polyphonic music with many staves, the input files can become very
confusing. We can reduce this confusion by using
variables.

With variables (also known as identifiers or macros), we can break
up complex music expressions. A variable is assigned as
follows:

namedMusic = { … }

The contents of the music expression namedMusic can be used
later by placing a backslash in front of the name
(\namedMusic, just like a normal LilyPond command).

The name of a variable must have alphabetic characters only, no
numbers, underscores, or dashes.

Variables must be defined before the main music
expression, but may be used as many times as required anywhere after
they have been defined. They may even be used in a later definition
of another variable, giving a way of shortening the input if a
section of music is repeated many times.