@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
@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_" "
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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
@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,
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
@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
\addlyrics
\context Staff = mel @{
- \property Staff.noAutoBeaming = ##t
+ \property Staff.autoBeaming = ##f
\property Staff.automaticMelismata = ##t
\melody
@}
\addlyrics
\context Staff = mel {
- \property Staff.noAutoBeaming = ##t
+ \property Staff.autoBeaming = ##f
\property Staff.automaticMelismata = ##t
\melody
}
@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
@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"
}
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
@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
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
$ 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