]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/tutorial.itely
($(outdir)/%.pdf): add DVIPS_FLAGS. This will
[lilypond.git] / Documentation / user / tutorial.itely
index d3eb2c11e50d0f3ebd3d3ce00eb68da3764f34c2..b220d2ca0a6ce138074b3d647c9350cc2f6ee0f4 100644 (file)
@@ -1,4 +1,6 @@
+\version "2.1.22"
 @c -*-texinfo-*-
+@c This file is part of lilypond.tely
 
 @c TODO:
 @c   * more details about running lilypond; error messages,
@@ -99,8 +101,8 @@ a1 a2 a4 a16 a32
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
-\property Staff.autoBeaming = ##f
+\set Score.timing =  ##f
+\set Staff.autoBeaming =  ##f
 \transpose c c' { a1 a2 a4 a16 a32 s16_" " }
 @end lilypond
 
@@ -111,7 +113,7 @@ a4 a a2 a
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \transpose c c' { a a a2 a s16_" " }
 @end lilypond
 
@@ -125,9 +127,9 @@ r2 r4 r8 r16
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.Clef = \turnOff
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.Clef =  \turnOff
+\set Staff.TimeSignature =  \turnOff
 r2 r4 r8 r16
 s16_" "
 @end lilypond
@@ -142,7 +144,7 @@ a2. a4 a8. a16
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \transpose c c' { a2. a4 a8. a16 s16_" " }
 @end lilypond
 
@@ -158,7 +160,7 @@ The @rglos{meter} (or @rglos{time signature}) can be set with the
 
 @c a clef here may lead to confusion
 @lilypond
-\property Staff.Clef \set #'transparent = ##t 
+\override Staff.Clef   #'transparent = ##t 
 \time 3/4
 s4_" "
 \time 6/8
@@ -181,7 +183,7 @@ The @rglos{clef} can be set using the @code{\clef} command:
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \clef violin
 s4_" "
 \clef bass
@@ -382,7 +384,7 @@ cis1 ees fisis aeses
 @end example
 
 @lilypond[notime]
-\property Score.timing = ##f
+\set Score.timing =  ##f
 \transpose c c' { cis1 ees fisis aeses s16_" " }
 @end lilypond
 
@@ -400,7 +402,7 @@ g
 @end example
 
 @lilypond[fragment]
-\property Staff.TimeSignature = \turnOff
+\set Staff.TimeSignature =  \turnOff
 \key d \major
 g'1
 \key c \minor
@@ -426,7 +428,7 @@ not be added automatically, and you must enter what you want to hear.
 
 For example, in this example:
 @lilypond[fragment]
-\property Staff.TimeSignature = #'()
+\set Staff.TimeSignature =  \turnOff
 \key d \major
 d' cis' fis'
 @end lilypond
@@ -444,7 +446,7 @@ staff.'' Rather, it means: ``a note with pitch D-natural.'' In the key
 of A-flat, it gets an accidental:
 
 @lilypond[fragment]
-\property Staff.TimeSignature = #'()
+\set Staff.TimeSignature = \turnOff
 \key as \major
 d'
 @end lilypond
@@ -565,8 +567,8 @@ c'4 c'' c''' \clef bass c c,
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 c'4 c'' c''' \clef bass c c,
 @end lilypond
 @end quotation
@@ -598,8 +600,8 @@ one.  For example, @code{c f} goes up while @code{c g} goes down:
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \relative c'' {
   c f c g c
 }
@@ -635,8 +637,8 @@ Larger intervals are made by adding octavation quotes.
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \relative c'' {
   c f, f c' c g' c,
 }
@@ -664,8 +666,8 @@ Here is an example of the difference between relative mode and
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \relative a {
 \clef bass
   a d a e d c' d'
@@ -681,8 +683,8 @@ Here is an example of the difference between relative mode and
 @end example
 
 @lilypond[fragment]
-\property Score.timing = ##f
-\property Staff.TimeSignature = \turnOff
+\set Score.timing =  ##f
+\set Staff.TimeSignature =  \turnOff
 \clef bass
   a d a e d c' d'
 @end lilypond
@@ -1061,9 +1063,9 @@ surrounding them with @code{\lyrics @{ @dots{} @}}, for example,
 
 Like notes, lyrics are also a form of music, but they must not be
 printed on a staff, which is the default way to print music. To print
-them as lyrics, they must be marked with @code{ \new LyricsVoice}:
+them as lyrics, they must be marked with @code{ \new Lyrics}:
 @example
-  \new LyricsVoice  \lyrics @{ I want to break free @}
+  \new Lyrics  \lyrics @{ I want to break free @}
 @end example
 The melody for this song is as follows:
 
@@ -1076,14 +1078,14 @@ The melody for this song is as follows:
 The lyrics can be set to these notes, combining both with the
 @code{\lyricsto} keyword:
 @example
-  \lyricsto "@var{name}" \new LyricsVoice @dots{}
+  \lyricsto "@var{name}" \new Lyrics @dots{}
 @end example
 where @var{name} identifies to which melody the lyrics should be
 aligned. In this case, there is only one melody, so we can leave it
 empty.
 
 The final result is 
-@lilypond[verbatim,linewidth=6.0\cm]
+@lilypond[verbatim,fragment]
 \score  {
  \notes <<
    \relative c' \new Voice {
@@ -1091,7 +1093,7 @@ The final result is
      c8
      \times 2/3 { f g g } \times 2/3 { g4( a2) }
    }
-   \lyricsto "" \new LyricsVoice \lyrics { I want to break free }
+   \lyricsto "" \new Lyrics \lyrics { I want to break free }
  >>
  \paper{ }
 }
@@ -1106,14 +1108,14 @@ line}. It is entered as two underscores, i.e.
 @example
   \lyrics @{ I want to break free __ @}
 @end example 
-@lilypond[]
+@lilypond[raggedright]
 \score  {
  \notes <<
    \relative c' \new Voice {
      \partial 8
      c8
      \times 2/3 { f g g } \times 2/3 { g4( a2) } }
-   \lyricsto "" \new LyricsVoice \lyrics { I want to break free __ }
+   \lyricsto "" \new Lyrics \lyrics { I want to break free __ }
    >>
  \paper{ }
 }
@@ -1187,7 +1189,7 @@ a lead sheet, for example,
   <<
     \context ChordNames \chords @{ @emph{chords} @}
     \notes @emph{the melody}
-    \lyricsto "" \new LyricsVoice \lyrics @{ @emph{the text} @}
+    \lyricsto "" \new Lyrics \lyrics @{ @emph{the text} @}
   >>
   \paper @{ @}
 @}
@@ -1200,7 +1202,7 @@ a lead sheet, for example,
      \partial 8
      c8
      \times 2/3 { f g g } \times 2/3 { g4( a2) } }
-   \new LyricsVoice \lyricsto "" \lyrics { I want to break free __ }
+   \new Lyrics \lyricsto "" \lyrics { I want to break free __ }
   >>
  \paper{ raggedright = ##t }
 }
@@ -1400,7 +1402,7 @@ accidentals to print, and where barlines must be placed, are stored in
 variables. These variables are called @emph{context properties}.
 The properties can also be manipulated from input files. Consider this input:
 @example
-\property Staff.autoBeaming = ##f
+\set Staff.autoBeaming =  ##f
 @end example 
 
 @noindent
@@ -1410,7 +1412,7 @@ property controls whether beams are printed automatically:
 @c
 @lilypond[relative=1,fragment,verbatim]
   c8 c c c
-  \property Staff.autoBeaming = ##f
+  \set Staff.autoBeaming =  ##f
   c8 c c c  
 @end lilypond
 
@@ -1424,23 +1426,23 @@ entered as follows:
 @itemize @bullet
 @item a string, enclosed in double quotes, for example,
 @example
-  \property Staff.instrument = #"French Horn"
+  \set Staff.instrument =  #"French Horn"
 @end example
 @item a boolean: either @code{#t} or @code{#f}, for true and false
 respectively, e.g.
 @example
-  \property Voice.autoBeaming = ##f
-  \property Score.skipBars = ##t
+  \set autoBeaming =  ##f
+  \set Score.skipBars =  ##t
 @end example
 
 @item a number, such as
 @example
-  \property Score.currentBarNumber = #20
+  \set Score.currentBarNumber =  #20
 @end example
 
 @item a symbol, which is introduced by a quote character, as in 
 @example
-  \property Staff.crescendoSpanner = #'dashed-line
+  \set Staff.crescendoSpanner =  #'dashed-line
 @end example
 
 @item a pair, which is also introduced by a quote character, like in
@@ -1448,15 +1450,15 @@ the following statements, which set properties to the pairs (-7.5, 6)
 and (3, 4) respectively:
 
 @example
-  \property Staff.minimumVerticalExtent  = #'(-7.5 . 6)
-  \property Staff.timeSignatureFraction  = #'(3 . 4)
+  \set Staff.minimumVerticalExtent =  #'(-7.5 . 6)
+  \set Staff.timeSignatureFraction =  #'(3 . 4)
 @end example
 
 @item a list, which is also introduced by a quote character. In the
 following example, the @code{breakAlignOrder} property is set to a
 list of symbols:
 @example
-  \property Score.breakAlignOrder =
+  \set Score.breakAlignOrder = 
     #'(left-edge time-signature key-signatures)
 @end example
 
@@ -1486,16 +1488,16 @@ object.  These layout objects also carry variables, which we call
 @emph{layout properties}. By changing these variables from their
 values, we can alter the look of a formatted score:
 
-@lilypond[verbatim,]
+@lilypond[verbatim,relative]
   c4
-  \property Voice.Stem \override #'thickness = #3.0
+  \override Stem   #'thickness = #3.0
   c4 c4 c4 
 @end lilypond
 
 @noindent
 In the example shown here, the layout property @code{thickness} (a
 symbol) is set to 3 in the @code{Stem} layout objects of the current
-Voice.  As a result, the notes following @code{\property} have thicker
+  As a result, the notes following @code{\property} have thicker
 stems.
 
 In most cases of manual overrides, only a single object must be
@@ -1503,12 +1505,12 @@ changed. This can be achieved by prefixing @code{\once} to the
 @code{\property} statement, i.e.
 
 @example
- \once \property Voice.Stem \set #'thickness = #3.0
+ \once \override Stem   #'thickness = #3.0
 @end example
 
 @lilypond[relative]
   c4
-  \once \property Voice.Stem \set #'thickness = #3.0
+  \once \override Stem   #'thickness = #3.0
   c4 c4 c4 
 @end lilypond
 
@@ -1546,8 +1548,8 @@ the left, and 1.8 staff space downwards:
 @lilypond[relative=1,verbatim]
 \stemUp
 f-5
-\once \property Voice.Fingering
-  \set #'extra-offset = #'(-0.3 . -1.8) 
+\once \override Fingering
+    #'extra-offset = #'(-0.3 . -1.8) 
 f-5
 @end lilypond
 
@@ -1567,7 +1569,7 @@ in that voice, the tie appears to cross voices:
 
 @lilypond[fragment,relative=1,verbatim]
   c4 << {
-      \once \property Voice.Stem \set #'transparent = ##t
+      \once \override Stem   #'transparent = ##t
       b8~ b8
   } \\ {
        b[ g8]
@@ -1584,7 +1586,7 @@ tweak}:
 
 @lilypond[relative=1,verbatim]
   c2\fermata
-  \property Voice.Script \set #'padding = #3
+  \override Script   #'padding = #3
   b2\fermata
 @end lilypond
 
@@ -1711,14 +1713,14 @@ When printing the part, the following @code{skipBars} property must be
 set to false, to prevent the rest from being expanded in three one bar
 rests:
 @example
-  \property Score.skipBars = ##t
+  \set Score.skipBars =  ##t
 @end example
 Prepending the rest and the property setting above, leads to the
 following result:
 
 @lilypond[raggedright]
 \score {\notes { \transpose f c' \relative c { \time 2/4
-\property Score.skipBars = ##t 
+\set Score.skipBars =  ##t 
         R2*3
     r4 f8 a cis4 f e d } }}
 @end lilypond
@@ -1772,8 +1774,8 @@ If you use HTML, La@TeX{}, or Texinfo, you can mix text and LilyPond
 code.  A script called @code{lilypond-book} will extract the music
 fragments, run LilyPond on them, and put back the resulting notation.
 This program is fully described in @ref{lilypond-book manual}.  Here
-we show a small example;  since the example contains also explanatory
-text, we will not comment it further:
+we show a small example. The example contains also explanatory text,
+so we will not comment it further:
 
 @example
 \documentclass[a4paper]@{article@}
@@ -1817,7 +1819,7 @@ $ mkdir -p out/
 $ lilypond-book --output=out/ lilybook.tex
 lilypond-book (GNU LilyPond) 2.1.19
 Reading `input/tutorial/lilybook.tex'
-Reading `input/screech-boink6.ly'
+Reading `input/screech-boink.ly'
 @var{lots of stuff deleted}
 Writing `out/lilybook.latex'
 $ cd out