]> git.donarmstrong.com Git - lilypond.git/commitdiff
Small update to tutorial.
authorGraham Percival <graham@percival-music.ca>
Sun, 25 Nov 2007 01:20:33 +0000 (17:20 -0800)
committerGraham Percival <graham@percival-music.ca>
Sun, 25 Nov 2007 01:20:33 +0000 (17:20 -0800)
Documentation/user/tutorial.itely

index 5769244075bc473fba08305831c0a87e9bd71295..8b377a34e2f450c94a2b5f3fcf12207faa92fb36 100644 (file)
@@ -1584,8 +1584,6 @@ namedMusic = @{ @dots{} @}
 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).
-Variables must be defined @emph{before} the main music
-expression.
 
 @lilypond[verbatim,quote,ragged-right]
 violin = \new Staff { \relative c'' {
@@ -1607,7 +1605,22 @@ cello = \new Staff { \relative c {
 The name of a variable must have alphabetic characters only, no
 numbers, underscores, or dashes.
 
-It is possible to use variables for many other types of objects in
+Variables must be defined @emph{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.
+
+@lilypond[verbatim,quote,ragged-right]
+tripletA = \times 2/3 { c,8 e g }
+barA = { \tripletA \tripletA \tripletA \tripletA }
+
+\relative c'' {
+ \barA \barA
+}
+@end lilypond
+
+Variables may be used for many other types of objects in
 the input.  For example,
 
 @example