@c Therefore, it should somehow be included rather than duplicated all
@c the time. --jr
-@c why not make identifiers in ly/engraver-init.ly? --hwn
+@c why not make variables in ly/engraver-init.ly? --hwn
@c Because it's just used to typeset plain notes without
@c a staff for demonstration purposes rather than something
@smallspace
@cindex variables
-@cindex identifiers
-Another great shorthand is the ability to define identifiers. All
+Another great shorthand is the ability to define variables. All
the templates use this
@example
the names -- it could be @code{melody}, @code{global},
@code{pianorighthand}, or @code{foofoobarbaz}. You can use
whatever variable names you want. For more details, see
-@ruser{Saving typing with identifiers and functions}.
+@ruser{Saving typing with variables and functions}.
@seealso
But if we did that, the @code{\score} section would get pretty
long, and it would be harder to understand what was happening. So
-let's use identifiers (or variables) instead.
+let's use variables instead.
@example
melody = @{ @}
@noindent
Remember that you can use almost any name you like. The
-limitations on identifier names are detailed in @ruser{File
+limitations on variable names are detailed in @ruser{File
structure}.
When writing (or reading) a @code{\score} section, just take it
expressions, wherever they appear.
@cindex variables
-@cindex identifiers
@item
-An identifier, such as
+An variable, such as
@example
foo = @{ c4 d e d @}
@end example
This can be used later on in the file by entering @code{\foo}. The
-name of an identifier should have alphabetic characters only; no
+name of an variable should have alphabetic characters only; no
numbers, underscores or dashes.
@end itemize
@subsection Functions without arguments
In most cases a function without arguments should be written
-with an identifier,
+with an variable,
@example
dolce = \markup@{ \italic \bold dolce @}
@refbugs
-Mixing Scheme and LilyPond identifiers is not possible with the
+Mixing Scheme and LilyPond variables is not possible with the
@code{--safe} option.
Rewrite, fix, etc. -gp
In orchestral music, all notes are printed twice. Once in a part for
-the musicians, and once in a full score for the conductor. Identifiers can
+the musicians, and once in a full score for the conductor. Variables can
be used to avoid double work. The music is entered once, and stored in
a variable. The contents of that variable is then used to generate
both the part and the full score.
normal size. To distinguish between variables defined in input files (like
@code{twentyFour} in the example above) and variables of internal
objects, we will call the latter @q{properties} and the former
-@q{identifiers.} So, the stem object has a @code{thickness} property,
-while @code{twentyFour} is an identifier.
+@q{variables.} So, the stem object has a @code{thickness} property,
+while @code{twentyFour} is an variable.
-@cindex properties vs. identifiers
-@cindex identifiers vs. properties
+@cindex properties vs. variables
+@cindex variables vs. properties
Two-dimensional offsets (X and Y coordinates) as well as object sizes
(intervals with a left and right point) are entered as @code{pairs}. A
In some instances of complex polyphonic music, you may need
additional voices to avoid collisions between notes. Additional
-voices are added by defining an identifier, as shown below:
+voices are added by defining an variable, as shown below:
@lilypond[quote,verbatim,ragged-right,relative=2]
voiceFive = #(context-spec-music (make-voice-props-set 4) 'Voice)
but scores any more complex than this simple example are
better produced by separating out the staff structure
-from the notes and lyrics with identifiers. These are
-discussed later (see @ref{Organizing pieces with identifiers}).
+from the notes and lyrics with variables. These are
+discussed later (see @ref{Organizing pieces with variables}).
@seealso
@quotation
* Version number::
* Adding titles::
* Absolute note names::
-* Organizing pieces with identifiers::
+* Organizing pieces with variables::
* After the tutorial::
* How to read the manual::
@end menu
files.
-@node Organizing pieces with identifiers
-@subsection Organizing pieces with identifiers
+@node Organizing pieces with variables
+@subsection 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
-@emph{identifiers}.
+@emph{variables}.
-With identifiers (also known as variables or macros), we can break
-up complex music expressions. An identifier is assigned as
+With variables (also known as variables or macros), we can break
+up complex music expressions. An variable is assigned as
follows
@example
The contents of the music expression @code{namedMusic} can be used
later by placing a backslash in front of the name
(@code{\namedMusic}, just like a normal LilyPond command).
-Identifiers must be defined @emph{before} the main music
+Variables must be defined @emph{before} the main music
expression.
@lilypond[quote,verbatim,ragged-right]
@end lilypond
@noindent
-The name of an identifier must have alphabetic characters only: no
+The name of an variable must have alphabetic characters only: no
numbers, underscores, or dashes.
It is possible to use variables for many other types of objects in
aFivePaper = \paper @{ paperheight = 21.0 \cm @}
@end example
-Depending on its contents, the identifier can be used in different
+Depending on its contents, the variable can be used in different
places. The following example uses the above variables:
@example
* Assigning more than one syllable to a single note::
* More than one note on a single syllable::
* Extenders and hyphens::
-* Working with lyrics and identifiers::
+* Working with lyrics and variables::
* Flexibility in placement::
* Lyrics to multiple notes of a melisma::
* Divisi lyrics::
combination of a backslash followed by one of @code{`}, @code{'},
@code{"}, or @code{^}.
-To define identifiers containing lyrics, the function @code{lyricmode}
+To define variables containing lyrics, the function @code{lyricmode}
must be used.
@example
@internalsref{LyricHyphen}
-@node Working with lyrics and identifiers
-@unnumberedsubsubsec Working with lyrics and identifiers
-@cindex lyrics, identifiers
+@node Working with lyrics and variables
+@unnumberedsubsubsec Working with lyrics and variables
+@cindex lyrics, variables
-To define identifiers containing lyrics, the function @code{\lyricmode}
+To define variables containing lyrics, the function @code{\lyricmode}
must be used. You do not have to enter durations though, if you add
@code{\addlyrics} or @code{\lyricsto}
-when invoking your identifier.
+when invoking your variable.
@example
verseOne = \lyricmode @{ Joy to the world the Lord is come @}
@menu
* Suggestions for writing LilyPond files::
-* Saving typing with identifiers and functions::
+* Saving typing with variables and functions::
* Style sheets::
* Updating old files::
* Troubleshooting (taking it all apart)::
in the number of @code{@{} and @code{@}}.
@item @strong{Explicitly add durations} at the beginnings of sections
-and identifiers. If you specify @code{c4 d e} at the beginning of a
+and variables. If you specify @code{c4 d e} at the beginning of a
phrase (instead of just @code{c d e}) you can save yourself some
problems if you rearrange your music later.
@item @strong{Separate tweaks} from music definitions. See
-@ruser{Saving typing with identifiers and functions}, and
+@ruser{Saving typing with variables and functions}, and
@ruser{Style sheets}.
@end itemize
@itemize @bullet
-@item @strong{Use an identifier for each voice}, with a minimum of
+@item @strong{Use an variable for each voice}, with a minimum of
structure inside the definition. The structure of the
@code{\score} section is the most likely thing to change;
the @code{violin} definition is extremely unlikely to change
@end itemize
-@node Saving typing with identifiers and functions
-@section Saving typing with identifiers and functions
+@node Saving typing with variables and functions
+@section Saving typing with variables and functions
@cindex variables
-@cindex identifiers
+@cindex variables
By this point, you've seen this kind of thing:
}
@end lilypond
-However, you can also use these identifiers (also known as
+However, you can also use these variables (also known as
variables, macros, or (user-defined) command) for tweaks:
@lilypond[quote,verbatim,ragged-right]
}
@end lilypond
-These identifiers are obviously useful for saving
+These variables are obviously useful for saving
typing. But they're worth considering even if you
only use them once -- they reduce complexity. Let's
look at the previous example without any
-identifiers. It's a lot harder to read, especially
+variables. It's a lot harder to read, especially
the last line.
@example
}
@end lilypond
-Using identifiers is also a good way to reduce work if the
+Using variables is also a good way to reduce work if the
LilyPond input syntax changes (see @ruser{Updating old files}). If
you have a single definition (such as @code{\dolce}) for all your
files (see @ruser{Style sheets}), then if the syntax changes, you