]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/user/tutorial.itely
''
[lilypond.git] / Documentation / user / tutorial.itely
index 4ac0a5679fe040c268372dc7a8c7ae9fb58032b8..79cc1c79be02cbb04750648d00efaca5da4af527 100644 (file)
@@ -2,10 +2,13 @@
 
 @c TODO: LilyPond LilyPond LilyPond
 
-
 @node Tutorial
 @chapter Tutorial
-  
+
+@html
+<!--- @@WEB-TITLE@@=Tutorial --->
+@end html
+
 @menu
 * First steps::                 Music language of LilyPond
 * Simple legend::               Small table of music language symbols
@@ -87,7 +90,7 @@ a1 a2 a4 a16 a32
 @lilypond[fragment]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 %\property Staff.Clef = \turnOff
 \transpose c'' { a1 a2 a4 a16 a32 }
 s16_" "
@@ -255,7 +258,7 @@ We continue with the introduction of the remaining musical constructs.
 
 @c maybe legend here?
 
-Rests are entered just like notes with the name ``@code{r}'':
+Normal rests are entered just like notes with the name ``@code{r}'':
 
 @quotation
 @example
@@ -650,7 +653,7 @@ fine tuning output, polyphonic music, and integrating text and music.
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 [a8 b]
 @end lilypond
@@ -661,7 +664,7 @@ fine tuning output, polyphonic music, and integrating text and music.
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 d ~ d
 @end lilypond
@@ -672,7 +675,7 @@ d ~ d
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 c( d )e
 @end lilypond
@@ -682,7 +685,7 @@ c( d )e
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 a a'
 @end lilypond
@@ -693,7 +696,7 @@ a a'
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 c c,
 @end lilypond
@@ -704,7 +707,7 @@ c c,
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 \context Voice { <a c> }
 @end lilypond
@@ -715,7 +718,7 @@ c c,
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 a\< a \!a
 @end lilypond
@@ -726,7 +729,7 @@ a\< a \!a
 @lilypond[fragment, relative 1]
 \property Score.timing = ##f
 \property Staff.TimeSignature = \turnOff
-\property Staff.noAutoBeaming = ##t
+\property Staff.autoBeaming = ##f
 \property Staff.Clef = \turnOff
 a\> a \!a
 @end lilypond
@@ -832,12 +835,20 @@ at @uref{http://www.ghostscript.com}.
 @cindex PostScript
 
 @unnumberedsubsec Windows users
-Windows users start the terminal by clicking on the LilyPond icon.
-Notepad is sufficient for editing the LilyPond file. Viewing the PS file
-can be done with @code{gsview32 test.ps}.  Viewing DVI files can be done
-with @code{yap test.dvi}.  The "print" button in Yap will print files.
-You can also print from the command line by executing @code{gsview32 /s
-test.ps}
+Windows users start the terminal by clicking on the LilyPond or Cygwin
+icon.  Notepad is sufficient for editing the LilyPond file.  Viewing
+the PS file can be done with:
+@quotation
+@example
+@code{gsview32 test.ps}
+@end example
+@end quotation
+You can also print from the command line by executing:
+@quotation
+@example
+@code{gsview32 /s test.ps}
+@end example
+@end quotation
 
 
 @node The first real tune
@@ -914,7 +925,9 @@ can also make longer comments by enclosing text in @code{%@{} and
 @end example
 @cindex @code{\include}
 @cindex point, printer's
-@cindex staff size setting 
+@cindex staff size, setting
+@cindex font size, setting
+
 By default, LilyPond will typeset the music in a size such that each
 staff is 20 point (0.7 cm, or 0.27 inch) high.  We want smaller output
 (16 point staff height), so we must import the settings for that size,
@@ -1006,6 +1019,10 @@ The following piece of music is played twice.  The first argument
 indicates the type of repeat.  In this case, @code{"volta"} means that
 prima volta/secunda volta brackets are used for the alternative
 endings---if there were any.
+
+A special notation for repeats allows you to get correct repeats in
+MIDI output. However, some extra trickery is needed to get this
+working, See @ref{Repeats and MIDI}.  
 @separate
 @example 
 
@@ -1037,7 +1054,7 @@ note have real pitch @code{g'}.  The @code{8} represents an eight note.
 @end example 
 Two more notes, with pitch @code{a} and @code{b}.  Because their
 duration is the same as the @code{g,8}, there is no need to enter the
-duration, but you may enter it anyway, i.e., @code{a4 b4}
+duration, but you may enter it anyway, i.e., @code{a8 b8}
 @separate
 @example 
 
@@ -1218,7 +1235,7 @@ accompaniment =\chords @{
 
           \addlyrics
             \context Staff = mel @{        
-              \property Staff.noAutoBeaming = ##t
+              \property Staff.autoBeaming = ##f
               \property Staff.automaticMelismata = ##t
               \melody 
             @}
@@ -1269,7 +1286,7 @@ accompaniment =\chords {
 
           \addlyrics
             \context Staff = mel {
-              \property Staff.noAutoBeaming = ##t
+              \property Staff.autoBeaming = ##f
               \property Staff.automaticMelismata = ##t
               \melody 
             }
@@ -1525,16 +1542,16 @@ the melody and accompaniment staves different names.
 @separate
 @example 
 
-        \property Staff.noAutoBeaming = ##t
+        \property Staff.autoBeaming = ##f
  
 @end example
 @cindex \property
 @cindex context variables
 @cindex setting context variables
 An interpretation context has variables, called properties, that tune
-its behavior.  One of the variables is @code{noAutoBeaming}.  Setting
-this @code{Staff}'s property to @code{##t}, which is the boolean value
-@var{true}, turns the automatic beaming mechanism off for the current
+its behavior.  One of the variables is @code{autoBeaming}.  Setting
+this @code{Staff}'s property to @code{##f}, which is the boolean value
+@var{false}, turns the automatic beaming mechanism off for the current
 staff.
 @cindex GUILE
 @cindex Scheme
@@ -1809,10 +1826,10 @@ will be at the left.
 @node A piano excerpt
 @section A piano excerpt
 
-Our fourth subject is a piece of piano music.  The fragment in the input
-file is a piano reduction of the G major Sinfonia by Giovanni Battista
-Sammartini.  It was composed around 1740.  It's in the source package
-under  the name @file{sammartini.ly}.
+Our fourth subject is a piece of piano music.  The fragment in the
+input file is a piano reduction of the G major Sinfonia by Giovanni
+Battista Sammartini.  It was composed around 1740.  It's in the source
+package under the name @file{sammartini.ly}.
 
 @lilypond[verbatim]
 \include "paper16.ly"
@@ -1851,11 +1868,11 @@ oboes = \notes \relative c'' \context Voice = oboe {
 }
 
 hoomPah = \repeat unfold 8 \notes
-    \transpose c' { \stemUp c8 \stemBoth \stemDown c'8 \stemBoth }
+    \transpose c' { \stemUp c8 \stemBoth \stemDown g'8 \stemBoth }
 
 bassvoices = \notes \relative c' {
     c4 g8. b,16
-    \autochange Staff \hoomPah
+    \autochange Staff \context Voice \hoomPah
     \translator Staff = down
     \stemDown [c8 c'8] r4
     <g d'> r4
@@ -2122,7 +2139,7 @@ having to worry about getting the motive in a wrong octave.
 @example 
 bassvoices = \notes \relative c' @{
 c4 g8. b,16
-\autochange Staff \hoomPah 
+\autochange Staff \hoomPah \context Voice
 @end example
 @cindex staff switch, automatic
 @cindex cross staff voice, automatic
@@ -2385,7 +2402,7 @@ When naming the tuning of the french horn, we'll need a piece of text
 with a flat sign.  LilyPond has a mechanism for font selection and
 kerning called Scheme markup text (See @ref{Text markup}).  The flat
 sign is taken from the music font, and its name is @code{accidentals--1}
-(The sharp sign is called @code{accidentals-1}).  The default font is
+(The natural sign is called @code{accidentals-0}).  The default font is
 too big for text, so we select a relative size of @code{-2}.
 
 @separate
@@ -2728,9 +2745,8 @@ Under Unix, you can view the results as follows.
 $ cd input/tutorial
 $ lilypond-book --outdir=out/ lilbook.tex
 lilypond-book (GNU LilyPond) 1.3.146
-Reading `/home/hanwen/usr/src/lilypond-1.3.146/input/tutorial/lilbook.tex'
-Reading
-`/home/hanwen/usr/src/lilypond-1.3.146/input/tutorial/sammartini.ly'
+Reading `input/tutorial/lilbook.tex'
+Reading `input/tutorial/sammartini.ly'
 @var{lots of stuff deleted}
 Writing `out/lilbook.latex'
 $ cd out