involved HTML, La@TeX{}, and Texinfo documents.
A script called @code{lilypond-book} will extract the music fragments,
-run format them, and put back the resulting notation. This program is
-fully described in @ref{lilypond-book manual}. Here we show a small
-example. The example also contains explanatory text, so we will not
-comment on it further
+format them, and put back the resulting notation. Here we show a
+small example for use with @LaTeX{}. The example also contains explanatory text, so we will
+not comment on it further
-@example
-\documentclass[a4paper]@{article@}
-\begin@{document@}
+@verbatim
+\documentclass[a4paper]{article}
+\begin{document}
Documents for lilypond-book may freely mix music and text. For
example,
-\begin@{lilypond@}
- @{ \relative c' @{
- c2 g'2 \times 2/3 @{ f8 e d @} c'2 g4
- @}
-\end@{lilypond@}
+\begin{lilypond}
+\relative {
+ c2 g'2 \times 2/3 { f8 e d } c'2 g4
+}
+\end{lilypond}
Options are put in brackets.
-\begin[fragment,quote,staffsize=26,verbatim]@{lilypond@}
+\begin[fragment,quote,staffsize=26,verbatim]{lilypond}
c'4 f16
-\end@{lilypond@}
+\end{lilypond}
Larger examples can be put in a separate file, and introduced with
\verb+\lilypondfile+.
-\lilypondfile[quote,noindent]@{screech-boink.ly@}
+\lilypondfile[quote,noindent]{screech-boink.ly}
-\end@{document@}
-@end example
+\end{document}
+@end verb+
Under Unix, you can view the results as follows
@example
-$ cd input/tutorial
-$ mkdir -p out/
-$ lilypond-book --output=out/ lilybook.tex
-lilypond-book (GNU LilyPond) 2.1.19
-Reading `input/tutorial/lilybook.tex'
-Reading `input/screech-boink.ly'
-@var{lots of stuff deleted}
-Writing `out/lilybook.tex'
-$ cd out
-$ latex lilybook
-@var{lots of stuff deleted}
-$ xdvi lilybook
+cd input/tutorial
+mkdir -p out/
+lilypond-book --output=out/ lilybook.tex
+@emph{lilypond-book (GNU LilyPond) 2.3.11}
+@emph{Reading `input/tutorial/lilybook.tex'}
+@emph{..lots of stuff deleted..}
+@emph{Compiling `out//lilybook.tex'
+cd out
+latex lilybook
+@emph{lots of stuff deleted}
+xdvi lilybook
@end example
To convert the file into a nice PDF document, run the following
commands
@example
-$ dvips -Ppdf -u+lilypond -u+ec-mftrace lilybook
-$ ps2pdf lilybook.ps
+dvips -Ppdf -u+lilypond -u+ec-mftrace lilybook
+ps2pdf lilybook.ps
@end example
Running lilypond-book and running latex creates a lot of temporary
@subsection Notes
-A note is printed by specifying its pitch and then its duration
-@footnote{Notes constitute the most basic elements of LilyPond input,
-but they do not form valid input on their own without a @code{\score}
-block. However, for the sake of brevity and simplicity we will
-generally omit @code{\score} blocks and @code{\paper} declarations in
-this manual.}
+A note is printed by specifying its pitch and then its duration,
-@lilypond[quote,fragment,verbatim]
-cis'4 d'8 e'16 c'16
+@lilypond[quote,verbatim]
+{ cis'4 d'8 e'16 c'16 }
@end lilypond
to @code{b}. The pitch @code{c} is an octave below middle C and the
letters span the octave above that C
-@lilypond[quote,fragment,verbatim]
+@lilypond[fragment,verbatim,noindent]
\clef bass
a,4 b, c d e f g a b c' d' e' \clef treble f' g' a' b' c''
@end lilypond
@code{as}, but both forms are accepted. Similarly, both
@code{es} and @code{ees} are accepted.
-Half-flats and half-sharps are formed by adding @code{-eh} and
-@code{-ih}; the following is a series of Cs with increasing pitches
-
-@cindex quarter tones
-@cindex semi-flats, semi-sharps
-
@lilypond[fragment,quote,verbatim,relative=2]
ceses4
-ceseh
ces
-ceh
c
-cih
cis
-cisih
cisis
@end lilypond
Program reference: @internalsref{NoteEvent}, and @internalsref{NoteHead}.
+
+
@node Chromatic alterations
@subsection Chromatic alterations
ways. For more information, refer to @ref{Accidentals}.
+
+@node Micro tones
+@subsection Micro tones
+
+Half-flats and half-sharps are formed by adding @code{-eh} and
+@code{-ih}; the following is a series of Cs with increasing pitches
+
+@cindex quarter tones
+@cindex semi-flats, semi-sharps
+
+@lilypond[verbatim,quote,relative=2]
+ceseh ceh cih cisih
+@end lilypond
+
+Micro tones are also exported to the MIDI file
+
+
@refbugs
There are no generally accepted standards for denoting three quarter
@code{>}. A chord may be followed by a duration, and a set of
articulations, just like simple notes.
-@lilypond[fragment,quote,relative=1]
-<c e g>4 <c>8 <>8
+@lilypond[verbatim,fragment,quote,relative=1]
+<c e g>4 <c>8
@end lilypond
@node Rests
A rest's vertical position may be explicitly specified by entering a
note with the @code{\rest} keyword appended. This makes manual
-formatting in polyphonic music easier. Rest collision testing will
-leave these rests alone
+formatting in polyphonic music easier. Automatic rest collision
+formatting will leave these rests alone
@cindex @code{\rest}
@end lilypond
The @code{s} syntax is only available in note mode and chord mode. In
-other situations, you should use the @code{\skip} command
+other situations, for example, when entering lyrics, you should use
+the @code{\skip} command
@lilypond[quote,raggedright,verbatim]
- \new Staff <<
- { \time 4/8 \skip 2 \time 4/4 }
- \relative c'' { a2 a1 }
- >>
+<<
+ \relative { a'2 a1 }
+ \new Lyrics \lyrics { \skip 2 bla1 }
+>>
@end lilypond
The skip command is merely an empty musical placeholder. It does not
commands. For example, the following results in an empty staff.
@lilypond[quote,raggedright,verbatim]
- { s4 }
+{ s4 }
@end lilypond
-The same fragment using @code{\skip} results in an empty page.
+The fragment @code{@{ \skip 4 @} } would produce an empty page.
@seealso
@example
c'\breve
-c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
+c'1 c'2 c'4 c'8 c'16 c'32 c'64 c'64
r\longa r\breve
r1 r2 r4 r8 r16 r32 r64 r64
@end example
-@lilypond[quote]
+@lilypond[quote,noindent]
\score {
\relative c'' {
a\breve*1/2 \autoBeamOff
a1 a2 a4 a8 a16 a32 a64 a64
+ \bar "empty"
+ \break
r\longa*1/4 r\breve *1/2
r1 r2 r4 r8 r16 r32 r64 r64
}
@end lilypond
+@node Augmentation dots
+@subsection Augmentation dots
+
If the duration is omitted then it is set to the previously entered
duration. The default for the first note is a quarter note. The duration
-can be followed by dots (`@code{.}') in order to obtain dotted note
+can be followed by dots (`@code{.}') to obtain dotted note
lengths
@cindex @code{.}
@cindex @code{r}
@cindex @code{s}
-You can alter the length of duration by a fraction @var{N/M}
-appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
-will not affect the appearance of the notes or rests produced.
-
-In the following example, the first three notes take up exactly two
-beats, but no triplet bracket is printed.
-@lilypond[quote,fragment,relative=2,verbatim]
-\time 2/4
-a4*2/3 gis4*2/3 a4*2/3
-a4
-@end lilypond
-
@refcommands
Dots are normally moved up to avoid staff lines, except in polyphonic
@cindex @code{\dotsBoth}
@code{\dotsBoth}.
+@seealso
+
+Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
+
+@node Scaling durations
+@subsection Scaling durations
+
+You can alter the length of duration by a fraction @var{N/M}
+appending `@code{*}@var{N/M}' (or `@code{*}@var{N}' if @var{M=1}). This
+will not affect the appearance of the notes or rests produced.
+
+In the following example, the first three notes take up exactly two
+beats, but no triplet bracket is printed.
+@lilypond[quote,fragment,relative=2,verbatim]
+\time 2/4
+a4*2/3 gis4*2/3 a4*2/3
+a4
+@end lilypond
+
+
@seealso
This manual: @ref{Tuplets}
-Program reference: @internalsref{Dots}, and @internalsref{DotColumn}.
@node Stems
@subsection Stems
When a tie is applied to a chord, all note heads whose pitches match
are connected. When no note heads match, no ties will be created.
-In its meaning a tie is just a way of extending a note duration, similar
-to the augmentation dot; in the following example there are two ways of
-notating exactly the same concept
+A tie is just a way of extending a note duration, similar to the
+augmentation dot. The following example shows two ways of notating
+exactly the same concept
@c
@lilypond[quote,fragment,raggedright]
\time 3/4 c'2. c'2 ~ c'4
@end lilypond
-If you need to tie a lot of notes over bars, it may be easier to use automatic
-note splitting (see @ref{Automatic note splitting}).
+
+@noindent
+Ties are used either when the note crosses a bar line, or when dots
+cannot be used to denote the rhythm. When using ties, larger note
+values should be aligned to subdivisions of the measure, eg.
+
+@lilypond[fragment]
+\relative {
+ r8 c8 ~ c2 r4 | r8^"not" c2 ~ c8 r4
+}
+@end lilypond
+
+If you need to tie a lot of notes over bars, it may be easier to use
+automatic note splitting (see @ref{Automatic note splitting}). This
+mechanism automatically splits long notes, and ties them across bar
+lines.
@refcommands
Program reference: @internalsref{TieEvent}, @internalsref{Tie}.
-For tying only a subset of the note heads of a pair of chords, see
-@inputfileref{input/regression,tie-chord-partial.ly}.
-
@refbugs
Switching staves when a tie is active will not produce a slanted tie.
Formatting of ties is a difficult subject. The results are often not
-optimal.
-
-
+optimal.
@node Tuplets
@subsection Tuplets
The property @code{tupletSpannerDuration} specifies how long each
bracket should last. With this, you can make lots of tuplets while
-typing @code{\times} only once, saving lots of typing. In the next
+typing @code{\times} only once, thus saving lots of typing. In the next
example, there are two triplets shown, while @code{\times} was only
used once
@cindex Music entry
This section deals with tricks and features of the input language that
-were added solely to help entering music, finding and correcting
+were added solely to help entering music and finding and correcting
mistakes. There are also external tools that make debugging easier.
See @ref{Point and click} for more information.
@example
\relative @var{startpitch} @var{musicexpr}
@end example
-
+or
+@example
+ \relative @var{musicexpr}
+@end example
+
The octave of notes that appear in @var{musicexpr} are calculated as
follows: If no octave changing marks are used, the basic interval
between this and the last note is always taken to be a fourth or
The octave changing marks @code{'} and @code{,} can be added to raise
or lower the pitch by an extra octave. Upon entering relative mode,
-an absolute starting pitch must be specified that will act as the
-predecessor of the first note of @var{musicexpr}.
+an absolute starting pitch can be specified that will act as the
+predecessor of the first note of @var{musicexpr}. If no starting pitch
+is specified, then middle C is used as a start.
Here is the relative mode shown in action
@lilypond[quote,fragment,raggedright,verbatim]
The relative conversion will not affect @code{\transpose},
-@code{\chords} or @code{\relative} sections in its argument. If you
-want to use relative within transposed music, you must place an
-additional @code{\relative} inside the @code{\transpose}.
+@code{\chords} or @code{\relative} sections in its argument. To use
+relative within transposed music, an additional @code{\relative} must
+be placed inside @code{\transpose}.
@node Octave check
@subsection Octave check
Failed bar checks are caused by entering incorrect
durations. Incorrect durations often completely garble up the score,
-especially if it is polyphonic, so you should start correcting the
-score by scanning for failed bar checks and incorrect durations. To
-speed up this process, you can use @code{skipTypesetting}, described
-in the next section.
+especially if it is polyphonic, so a good place to correcting input is
+by scanning for failed bar checks and incorrect durations. To speed
+up this process, the @code{skipTypesetting} feature may be used. It is
+described in the next section.
+
+@cindex @code{|}
+@cindex @code{pipeSymbol}
It is also possible to redefine the meaning of @code{|}. This is done
by assigning a music expression to @code{pipeSymbol},
\relative c'' {
c8 d
\set Score.skipTypesetting = ##t
- e f g a g c, f e d
+ e e e e e e e e
\set Score.skipTypesetting = ##f
c d b bes a g c2 }
@end lilypond
@refbugs
Not all durations (especially those containing tuplets) can be
-represented exactly; the engraver will not insert tuplets.
+represented exactly with normal notes and dots, but the engraver will
+not insert tuplets.
@seealso
Examples: @inputfileref{input/regression,completion-heads.ly}.
+@noindent
+
Program reference: @internalsref{Completion_heads_engraver}.