]> git.donarmstrong.com Git - lilypond.git/commitdiff
Oops; the previous update wasn't final. This one should be. :)
authorGraham Percival <graham@percival-music.ca>
Sun, 21 Jan 2007 05:29:37 +0000 (21:29 -0800)
committerGraham Percival <graham@percival-music.ca>
Sun, 21 Jan 2007 05:29:37 +0000 (21:29 -0800)
Documentation/user/putting.itely
Documentation/user/tutorial.itely

index de163bfdb2c6895a4e48eac62c9441a2cb57af0c..1dd8222330d718ae29cb41d2a95ca9a61d8fdc43 100644 (file)
@@ -18,7 +18,6 @@ create @code{\score} blocks.
 * Extending the templates::     
 * How LilyPond files work::     
 * Score is a single musical expression::  
-* Organizing larger pieces::    
 * An orchestral part::          
 @end menu
 
@@ -463,62 +462,6 @@ text editor!
 
 
 
-@node Organizing larger pieces
-@section Organizing larger pieces
-
-When all of the elements discussed earlier are combined to produce
-larger files, the @code{\score} blocks get a lot bigger because the
-music expressions are longer, and, in the case of polyphonic music,
-more deeply nested.  Such large expressions can become unwieldy.
-
-By using variables, also known as identifiers, it is possible to break
-up complex music expressions.  An identifier is assigned as follows
-
-@example
-namedMusic = @{ @dots{} @}
-@end example
-
-@noindent
-The contents of the music expression @code{namedMusic}, can be used
-later by preceding the name with a backslash, i.e., @code{\namedMusic}.
-In the next example, a two-note motive is repeated two times by using
-variable substitution
-
-@lilypond[quote,ragged-right,verbatim,nofragment]
-seufzer = {
-  e'4( dis'4)
-}
-{ \seufzer \seufzer }
-@end lilypond
-
-The name of an identifier should have alphabetic characters only: no
-numbers, underscores, or dashes.  The assignment should be outside of
-running music.
-
-It is possible to use variables for many other types of objects in the
-input.  For example,
-
-@example
-width = 4.5\cm
-name = "Wendy"
-aFivePaper = \paper @{ paperheight = 21.0 \cm @}
-@end example
-
-Depending on its contents, the identifier can be used in different
-places.  The following example uses the above variables
-
-@example
-\paper @{
-  \aFivePaper
-  line-width = \width
-@}
-@{ c4^\name @}
-@end example
-
-More information on the possible uses of identifiers is given in the
-technical manual, in @ref{Input variables and Scheme}.
-@c fixme: the ref is too technical.
-
 
 @node An orchestral part
 @section An orchestral part
index ffefa1c43b7209c673d32eab96383d1d6728d6c0..566a5db8d74ffd482abb4fdb5e001f1df98c4ccd 100644 (file)
@@ -1266,6 +1266,7 @@ of the manual.
 * Version number::              
 * Adding titles::               
 * Absolute note names::         
+* Organizing pieces with identifiers::  
 * After the tutorial::          
 * How to read the manual::      
 @end menu
@@ -1388,6 +1389,67 @@ However, absolute mode is useful for music which has large intervals, and
 is extremely useful for computer-generated LilyPond files.
 
 
+@node Organizing pieces with identifiers
+@subsection Organizing pieces with identifiers
+
+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}.
+
+Identifiers (also known as variables or macros), we can break up
+complex music expressions.  An identifier is assigned as follows
+
+@example
+namedMusic = @{ @dots{} @}
+@end 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 expression.
+
+@lilypond[quote,verbatim,ragged-right]
+violin = \new Staff { \relative c'' {
+  a4 b c b
+}}
+cello = \new Staff { \relative c {
+  \clef bass
+  e2 d
+}}
+{
+  <<
+    \violin
+    \cello
+  >>
+}
+@end lilypond
+
+@noindent
+The name of an identifier should have alphabetic characters only: no
+numbers, underscores, or dashes.
+
+It is possible to use variables for many other types of objects in the
+input.  For example,
+
+@example
+width = 4.5\cm
+name = "Wendy"
+aFivePaper = \paper @{ paperheight = 21.0 \cm @}
+@end example
+
+Depending on its contents, the identifier can be used in different
+places.  The following example uses the above variables:
+
+@example
+\paper @{
+  \aFivePaper
+  line-width = \width
+@}
+@{ c4^\name @}
+@end example
+
+
 @node After the tutorial
 @subsection After the tutorial