]> git.donarmstrong.com Git - lilypond.git/commitdiff
Patches from Trevor.
authorGraham Percival <graham@percival-music.ca>
Wed, 28 Nov 2007 01:12:18 +0000 (17:12 -0800)
committerGraham Percival <graham@percival-music.ca>
Wed, 28 Nov 2007 01:12:18 +0000 (17:12 -0800)
Documentation/user/fundamental.itely
Documentation/user/tutorial.itely

index 2259e34c6f09fa61a3291eb5d1da851d5bd1df60..979f5805bf3b208d8644e24c69c36b8024e4380f 100644 (file)
@@ -49,10 +49,10 @@ A basic example of a lilypond input file is
 There are many variations of this basic pattern, but this
 example serves as a useful starting place.
 
-At this point, you may be confused, since you have never seen a
-@code{\score@{@}} before.  This is because LilyPond automatically
-adds the extra commands when you give it simple input.  LilyPond
-treats input like this:
+Up to this point none of the examples you have seen have used a
+@code{\score@{@}} command.  This is because LilyPond automatically
+adds the extra commands which are needed when you give it simple 
+input.  LilyPond treats input like this:
 
 @example
 \relative c'' @{
@@ -64,21 +64,31 @@ treats input like this:
 as shorthand for this:
 
 @example
-\score @{
-  \relative c'' @{
-    c4 a b c
+\book @{
+  \score @{
+    \new Staff @{
+      \new Voice @{
+        \relative c'' @{
+          c4 a b c
+        @}
+      @}
+    @}
+    \layout @{ @}
   @}
-  \layout @{ @}
 @}
 @end example
 
 In other words, if the input contains a single music expression,
 LilyPond will interpret the file as though the music expression
-was wrapped up inside a @code{\score@{@}}.
+was wrapped up inside the commands shown above.  For now, though,
+let us return to the first example and examine the @code{\score}
+command, leaving the others to default.
 
-A @code{\score} must begin with a compound music expression.
+A @code{\score} block must always contain just one music 
+expression, and
+this must appear first within the @code{\score @{..@}} block.
 Remember that a music expression could be anything from a single
-note to a huge
+note to a huge compound expression like
 
 @example
 @{
@@ -108,12 +118,20 @@ such as
 Some people put some of those commands outside the @code{\score}
 block -- for example, @code{\header} is often placed above the
 @code{\score}.  That's just another shorthand that LilyPond
-accepts.  Two more commands you have not previously seen are
+accepts.
+
+Two more commands you have not previously seen are
 @code{\layout @{ @}} and @code{\midi @{@}}.  If these appear as 
 shown they will cause LilyPond to produce a printed output and a 
 MIDI out respectively.  They are described fully in the
-Notation Reference - @ruser{Score layout} and 
-@ruser{Creating MIDI files}.  
+Notation Reference -- @ruser{Score layout} and 
+@ruser{Creating MIDI files}.
+
+The @code{\book} command allows
+several @code{\score} blocks to be combined into one output.
+If there are several @code{\book} blocks each one produces a
+separate output file.  For details see @ruser{Multiple scores
+in a book}.
 
 @cindex variables
 
@@ -133,11 +151,16 @@ melody = \relative c' @{
 When LilyPond looks at this file, it takes the value of
 @code{melody} (everything after the equals sign) and inserts it
 whenever it sees @code{\melody}.  There's nothing special about
-the names -- it could be @code{melody}, @code{global},
-@code{pianorighthand}, or @code{foofoobarbaz}.  You can use
-whatever variable names you want as along as they contain just
-alphabetic characters.  For more details, see
-@ruser{Saving typing with variables and functions}.
+the names -- it could be @code{melody}, @code{global}, 
+@code{TimeKey},
+@code{pianorighthand}, or @code{foofoobarbaz}.  For more details,
+see @ruser{Saving typing with variables and functions}.
+Remember that you can use almost any name you like as long
+as it contains just alphabetic characters and is distinct from
+LilyPond command names.  The exact
+limitations on variable names are detailed in 
+@ruser{File structure}.
+
 
 
 @seealso
@@ -269,12 +292,6 @@ lower  = \relative c @{ @}
 @}
 @end example
 
-@noindent
-Remember that you can use almost any name you like as long
-as it contains just alphabetic characters.  The exact
-limitations on variable names are detailed in
-@ruser{File structure}.
-
 Be careful about the difference between notes, which are introduced
 with @code{\relative}, and lyrics, which are introduced with
 @code{\lyricmode}.  These are essential to tell LilyPond
@@ -384,18 +401,18 @@ the different types to be properly nested, like this,
 @code{<< [ @{ ( .. ) @} ] >>}, with the closing brackets being
 encountered in exactly the opposite order to the opening 
 brackets.  This @strong{is} a requirement for the three types of 
-bracket described by the word @q{Encloses} in the table above - 
+bracket described by the word @q{Encloses} in the table above --
 they must nest properly.
 However, the remaining brackets, described with the word 
 @q{Marks} in the table above together with ties and tuplets,
 do @strong{not} have to nest
 properly with any of the brackets.  In fact, these are not 
 brackets in the sense that
-they enclose something - they are simply markers to indicate
+they enclose something -- they are simply markers to indicate
 where something starts and ends.
 
 So, for example, a phrasing slur can start before a manually
-inserted beam and end before the end of the beam - not very
+inserted beam and end before the end of the beam -- not very
 musical, perhaps, but possible:
 
 @lilypond[quote,verbatim,fragment,ragged-right,relative=2]
@@ -425,7 +442,7 @@ two tuplets, and a phrasing slur extending out of a tuplet
 
 Singers need voices to sing, and so does LilyPond.
 The actual music for all instruments in a score 
-is contained in Voices - the most fundamental 
+is contained in Voices -- the most fundamental 
 of all LilyPond's concepts.
 
 @menu
@@ -448,7 +465,8 @@ packages.
 
 In fact, a Voice layer or context is the only one which can
 contain music.  If a Voice context is not explicitly declared
-one is created automatically.  Some instruments such as an 
+one is created automatically, as we saw at the beginning of
+this chapter.  Some instruments such as an 
 Oboe can play only one note at a time.  Music written for
 such instruments is monophonic and requires just a single
 voice.  Instruments which can play more than one note at a
@@ -542,6 +560,9 @@ of polyphony.  Here's a simple example:
 << { a2. r4 }         \\ { fis2. s4 }       >>
 @end lilypond
 
+It is not necessary to use a separate @code{<< \\ >>} construct
+for each bar, but it does help the legibility of the code.  TODO
+
 This example has just two voices, but the same contruct may be
 used to encode three or more voices by adding more back-slash
 separators.
@@ -580,14 +601,18 @@ blue triangle voice.
   c16 d e f
   << % Bar 1
     { g4 f e } \\
-    { \voiceTwoStyle
-      r8 e4 d c8 ~ }
+    {
+      \voiceTwoStyle
+      r8 e4 d c8 ~
+    }
   >> |
   << % Bar 2
     { d2 e2 } \\
     { c8 b16 a b8 g ~ g2 } \\
-    { \voiceThreeStyle
-      s4 b4 c2 }
+    {
+      \voiceThreeStyle
+      s4 b4 c2
+     }
   >>
 }
 @end lilypond
@@ -649,7 +674,7 @@ of music.  We can correct this
 by telling LilyPond that this third voice is really a fourth
 voice, with stems going down, using the @code{\voiceFour} 
 command.  There are also corresponding @code{\voiceOne},
-@code{\voiceTwo}, and @code{voiceThree} 
+@code{\voiceTwo}, and @code{\voiceThree} 
 commands.  This results in the following:
 
 @lilypond[quote,verbatim,fragment,ragged-right]
@@ -685,26 +710,41 @@ TODO link.
 Voice contexts can also be created manually
 inside a @code{<< >>} block to create polyphonic music, using
 @code{\voiceOne} ... @code{\voiceFour} to indicate the required
-directions of stems, slurs, etc.
+directions of stems, slurs, etc.  In longer scores this method
+is clearer, as it permits the voices to be separated and to be
+given more descriptive names.
 
 Specifically, the construct @code{<< \\ >>} which we used in
 the previous section:
 
 @example
-<< \upper \\ \lower >>
+\new Staff @{
+  \relative c' @{
+    << @{ e4 f g a @} \\ @{ c,4 d e f @} >>
+  @}
+@}
 @end example
 
 @noindent
-where @code{upper} and @code{lower} are user-defined variables 
-containing the music for the two voices, is equivalent to 
+is equivalent to 
 
 @example
-<<
-  \new Voice = "1" @{ \voiceOne \upper @}
-  \new Voice = "2" @{ \voiceTwo \lower @}
+\new Staff <<
+  \new Voice = "1" @{ \voiceOne \relative c' @{ e4 f g a @} @}
+  \new Voice = "2" @{ \voiceTwo \relative c' @{ c4 d e f @} @}
 >>
 @end example
 
+Both of the above would produce
+
+@c The following example should not display the code
+FIXME: weird compiling bug!  Leave for gp.
+@c @lilypond{ragged-right,quote]
+@c \relative c' {
+@c %  << { e4 f g a } \\ { c,4 d e f } >>
+@c }
+@c @end lilypond
+
 The @code{\voiceXXX} commands set the direction of stems, slurs,
 ties, articulations, text annotations, augmentation dots of dotted
 notes, and fingerings.  @code{\voiceOne} and @code{\voiceThree}
@@ -727,18 +767,18 @@ markup, ties, slurs, and dynamics:
 @lilypond[quote,ragged-right,verbatim]
 \relative c'{
   \voiceOne
-  c-"\\voiceOne" d8 ~ d e4 ( f g a ) b-> c
+  c d8 ~ d e4 ( f g a ) b-> c
   \oneVoice
-  c,-"\\oneVoice" d8 ~ d e4 ( f g a ) b-> c
+  c, d8 ~ d e4 ( f g a ) b-> c
 }
 @end lilypond
 
 @lilypond[quote,ragged-right,verbatim]
 \relative c'{
   \voiceTwo
-  c-"\\voiceTwo" d8 ~ d e4 ( f g a ) b-> c
+  c d8 ~ d e4 ( f g a ) b-> c
   \oneVoice
-  c,-"\\oneVoice" d8 ~ d e4 ( f g a ) b-> c
+  c, d8 ~ d e4 ( f g a ) b-> c
 }
 @end lilypond
 
@@ -907,7 +947,7 @@ verses, set for SATB.  In this case the words for all four
 parts are the same.
 
 @lilypond[quote,verbatim]
-global = { \time 4/4 \partial 4 \key c \major}
+TimeKey = { \time 4/4 \partial 4 \key c \major}
 SopMusic   = \relative c' { c4 | e4. e8 g4  g  | a a g }
 AltoMusic  = \relative c' { c4 | c4. c8 e4  e  | f f e }
 TenorMusic = \relative c  { e4 | g4. g8 c4. b8 | a8 b c d e4 }
@@ -925,7 +965,7 @@ VerseFour  = \lyricmode {
   \new ChoirStaff <<
     \new Staff <<
       \clef "treble"
-      \new Voice = "Sop"  { \voiceOne \global \SopMusic }
+      \new Voice = "Sop"  { \voiceOne \TimeKey \SopMusic }
       \new Voice = "Alto" { \voiceTwo \AltoMusic }
       \new Lyrics \lyricsto "Sop" { \VerseOne   }
       \new Lyrics \lyricsto "Sop" { \VerseTwo   }
@@ -1050,26 +1090,23 @@ It is prepended to a music expression, for example
 @cindex Context, creating
 
 @example
-\new @var{type} @var{music expression}
+\new @var{type} @var{music-expression}
 @end example
 
 @noindent
 where @var{type} is a context name (like @code{Staff} or
 @code{Voice}).  This command creates a new context, and starts
-interpreting the @var{music expression} within that context.
+interpreting the @var{music-expression} within that context.
 
-Note that there is no @code{\new Score % Invalid!} command;
+Note that there is no @code{\new Score} command;
 the single top-level @code{Score} context is introduced 
-with @code{\score}.  This is because there can be only one 
-@code{Score} context, whereas there may be multiple 
-@code{Staff} and @code{Voice} contexts - each created 
-by @code{\new}.
+with @code{\score}.  
 
 The @code{\new} command may also give a identifying name to the 
 context to distinguish it from other contexts of the same type,
 
 @example
-\new @var{type} = @var{id} @var{music}
+\new @var{type} = @var{id} @var{music-expression}
 @end example
 
 Note the distinction between the name of the context type,
@@ -1097,7 +1134,7 @@ about any.
 Engravers live and operate in Contexts.
 Engravers such as the @code{Metronome_mark_engraver}, whose
 action and output applies to the score as a whole, operate in
-the highest level context - the @code{Score} context.
+the highest level context -- the @code{Score} context.
 
 The @code{Clef_engraver} and @code{Key_engraver} are to be
 found in every Staff Context, as different staves may require 
@@ -1147,6 +1184,8 @@ the name, or vice versa.
   @tab Engraves the five (by default) lines of the staff
 @item Stem_engraver
   @tab Creates stems and single-stem tremulos
+@item Time_signature_engraver
+  @tab Creates time signatures
 @end multitable
 
 @smallspace
@@ -1236,7 +1275,7 @@ Remember the default context name is Voice, so the second
 @code{\set} command set the property @code{instrumentName} in the
 Voice context to @qq{Alto}, but as LilyPond does not look
 for any such property in the @code{Voice} context, no 
-further action took place.  this is not an error, and no error 
+further action took place.  This is not an error, and no error 
 message is logged in the log file.
 
 Similarly, if the property name is mis-spelt no error message 
@@ -1245,6 +1284,10 @@ If fact, you can set any (fictitious) @q{property} using any
 name you like in any context that exists by using the 
 @code{\set} command.  But if the name is not
 known to LilyPond it will not cause any action to be taken.
+This is one of the reasons why it is highly recommended to
+use a context-sensitive editor with syntax highlighting for
+editing LilyPond files, such as Vim, Jedit, ConTEXT or Emacs,
+since unknown property names will be highlighted differently.
 
 The @code{instrumentName} property will take effect only
 if it is set in the @code{Staff} context, but
@@ -1732,7 +1775,7 @@ the template do not correspond with the order in the vocal
 score shown above.  We need to rearrange them so there are
 four staves with the words written directly underneath the
 notes for each part.
-All the voices should be @code{voiceOne}, which is
+All the voices should be @code{\voiceOne}, which is
 the default, so the @code{\voiceXXX} commands can be removed.
 We also need to specify the tenor clef for the tenors.
 The way in which lyrics are specified has also been simplified
index 8b377a34e2f450c94a2b5f3fcf12207faa92fb36..126da730854289aee8a9657bbfae86e882a9d483 100644 (file)
@@ -920,7 +920,7 @@ than one voice on the same staff.
 @menu
 * Music expressions explained::  
 * Multiple staves::             
-* Piano staves::                
+* Staff groups::                
 * Combining notes into chords::  
 * Single staff polyphony::      
 @end menu
@@ -952,6 +952,34 @@ one).  The result is another music expression:
 { { a4 g } f g }
 @end lilypond
 
+@cindex expression
+@cindex music expression
+@subheading Analogy: mathematical expressions
+
+This mechanism is similar to mathematical formulas: a big formula
+is created by composing small formulas.  Such formulas are called
+expressions, and they can contain other music expressions, so you
+can make arbitrarily complex and large expressions.  For example,
+
+@example
+1
+
+1 + 2
+
+(1 + 2) * 3
+
+((1 + 2) * 3) / (4 * 5)
+@end example
+
+This is a sequence of expressions, where each expression is
+contained in the next (larger) one.  The simplest expressions are
+numbers, and larger ones are made by combining expressions with
+operators (like @code{+}, @code{*} and @code{/}) and parentheses.
+Like mathematical expressions, music expressions can be nested
+arbitrarily deep, which is necessary for complex music like
+polyphonic scores.
+
+
 @subheading Simultaneous music expressions: multiple staves
 
 Music Glossary: @rglos{polyphony}.
@@ -999,34 +1027,6 @@ staff.
 }
 @end lilypond
 
-@cindex expression
-@cindex music expression
-@subheading Analogy: mathematical expressions
-
-This mechanism is similar to mathematical formulas: a big formula
-is created by composing small formulas.  Such formulas are called
-expressions, and they can contain other music expressions, so you
-can make arbitrarily complex and large expressions.  For example,
-
-@example
-1
-
-1 + 2
-
-(1 + 2) * 3
-
-((1 + 2) * 3) / (4 * 5)
-@end example
-
-This is a sequence of expressions, where each expression is
-contained in the next (larger) one.  The simplest expressions are
-numbers, and larger ones are made by combining expressions with
-operators (like @code{+}, @code{*} and @code{/}) and parentheses.
-Like mathematical expressions, music expressions can be nested
-arbitrarily deep, which is necessary for complex music like
-polyphonic scores.
-
-
 @node Multiple staves
 @subsection Multiple staves
 
@@ -1069,7 +1069,9 @@ Time signatures entered in one staff affect all other
 staves@footnote{This behavior may be changed if desired; for
 details, see @ruser{Polymetric notation}.}.  On the other hand,
 the key signature of one staff does @emph{not} affect other
-staves.
+staves.  This different default behaviour is because scores with
+transposing instruments are more common than polyrhythmic
+scores.
 
 @lilypond[verbatim,quote,ragged-right]
 \relative c'' {
@@ -1083,11 +1085,12 @@ staves.
 
 
 
-@node Piano staves
-@subsection Piano staves
+@node Staff groups
+@subsection Staff groups
 
-@cindex staff switch, manual
-@cindex cross staff voice, manual
+@cindex piano staff
+@cindex choir staff
+@cindex grand staff
 
 Music Glossary: @rglos{brace}.
 
@@ -1115,9 +1118,18 @@ Here is a small example:
 }
 @end lilypond
 
+Other staff groupings are introduced with
+@code{\new GrandStaff,} suitable for orchestral
+scores, and @code{\new ChoirStaff,} suitable for
+vocal scores.  These staff groups each form another
+type of context, one that generates the brace at the
+left end of every system and also controls the extent
+of barlines.
+
 @seealso
 
-Notation Reference: @ruser{Piano music}.
+Notation Reference: @ruser{Piano music}, 
+@ruser{Displaying staves}.
 
 
 @node Combining notes into chords
@@ -1128,15 +1140,19 @@ Notation Reference: @ruser{Piano music}.
 Music Glossary: @rglos{chord}.
 
 @notation{Chords} can be made by surrounding pitches with single
-angle brackets.  Angle brackets are the symbols @code{<} and
-@code{>}.
+angle brackets.  Note that all the notes in a chord must have the
+same duration, and that duration is placed after the closing 
+bracket. 
 
 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
 r4 <c e g>4 <c f a>2
 @end lilypond
 
-You can combine markings like beams and ties with chords.  They
-must be placed outside the angle brackets.
+Think of chords as almost equivalent to single notes:
+almost everything you can attach to a single note can be attached
+to a chord, and everything must go @emph{outside} the angle 
+brackets.  For example, you can combine markings like beams and 
+ties with chords.  They must be placed outside the angle brackets.
 
 @lilypond[verbatim,quote,ragged-right,fragment,relative=2]
 r4 <c e g>8[ <c f a>]~ <c f a>2
@@ -1253,8 +1269,9 @@ separating each syllable with a space.
 @end lilypond
 
 Note the curly brackets delimiting both the music and the lyrics,
-and the angle brackets @code{<< ... >>} around the whole piece to
-show that the music and lyrics are to occur at the same time.
+and the double angle brackets @code{<< ... >>} around the whole 
+piece to show that the music and lyrics are to occur at the same 
+time.
 
 @node Aligning lyrics to a melody
 @subsection Aligning lyrics to a melody
@@ -1310,6 +1327,25 @@ Here we have also used manual beaming (the square brackets @code{[
 ]} ) to generate the beaming which is customarily used with lyrics
 (see @ref{Automatic and manual beams}).
 
+As an alternative to using slurs, the melismata may be indicated
+just in the lyrics by using an underscore, @code{_}, for each
+note that should be included in the melisma:
+
+@lilypond[verbatim,quote,ragged-right]
+<<
+  \relative c'' {
+    \key g \major
+    \time 6/8
+    d4 b8 c4 a8 d4 b8 g4 
+    g8 a4 b8 c[ b] a d4 b8 g4.
+  }
+  \addlyrics {
+    Girls and boys come out to play,
+    The moon doth shine _ as bright as day;
+  }
+>> 
+@end lilypond
+
 If a syllable extends over several notes or a single very long
 note an @notation{extender line} is usually drawn from the
 syllable extending under all the notes for that syllable.  It is
@@ -1416,16 +1452,18 @@ example from Handel's Judas Maccabæus:
 >>
 @end lilypond
 
+@noindent
 but scores any more complex than this simple example are
 better produced by separating out the staff structure
-from the notes and lyrics with variables.  These are
-discussed later (see @ref{Organizing pieces with variables}).
+from the notes and lyrics with variables.  These
+discussed in @ref{Organizing pieces with variables}.
 
 @seealso
 
 Notation Reference: @ruser{Vocal music}.
 
 
+
 @node Final touches
 @section Final touches
 
@@ -1434,15 +1472,100 @@ add the final touches to simple pieces, and provides an
 introduction to the rest of the manual.
 
 @menu
+* Organizing pieces with variables::  
 * Version number::              
 * Adding titles::               
 * Absolute note names::         
-* Organizing pieces with variables::  
 * After the tutorial::          
 * How to read the manual::      
 @end menu
 
 
+@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{variables}.
+
+With variables (also known as identifiers or macros), we can break
+up complex music expressions.  A variable 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).
+
+@lilypond[verbatim,quote,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 a variable must have alphabetic characters only, no
+numbers, underscores, or dashes.
+
+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
+width = 4.5\cm
+name = "Wendy"
+aFivePaper = \paper @{ paperheight = 21.0 \cm @}
+@end example
+
+Depending on its contents, the variable can be used in different
+places.  The following example uses the above variables:
+
+@example
+\paper @{
+  \aFivePaper
+  line-width = \width
+@}
+@{ c4^\name @}
+@end example
+
+
+@menu
+* Version number::              
+* Adding titles::               
+* Absolute note names::         
+* After the tutorial::          
+* How to read the manual::      
+@end menu
+
 @node Version number
 @subsection Version number
 
@@ -1540,9 +1663,9 @@ of quote @code{'} marks.  Consider this fragment from Mozart:
 }
 @end lilypond
 
-All these quotes makes the input less readable and it is a source
+All these quotes makes the input less readable and they are a source
 of errors.  With @code{\relative}, the previous example is much
-easier to read:
+easier to read and type:
 
 @lilypond[verbatim,quote,ragged-right]
 \relative c'' {
@@ -1564,82 +1687,6 @@ intervals, and is extremely useful for computer-generated LilyPond
 files.
 
 
-@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{variables}.
-
-With variables (also known as identifiers or macros), we can break
-up complex music expressions.  A variable 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).
-
-@lilypond[verbatim,quote,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 a variable must have alphabetic characters only, no
-numbers, underscores, or dashes.
-
-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
-width = 4.5\cm
-name = "Wendy"
-aFivePaper = \paper @{ paperheight = 21.0 \cm @}
-@end example
-
-Depending on its contents, the variable 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