Guide, node Updating translation committishes..
@end ignore
-@c \version "2.17.11"
+@c \version "2.19.2"
@ignore
Tutorial guidelines: (different from policy.txt!)
on one staff.
@menu
-* Bar checks::
-* Accidentals and key signatures::
+* Bar lines and bar checks::
+* Pitches and key signatures::
* Ties and slurs::
* Articulation and dynamics::
* Adding text::
* Advanced rhythmic commands::
@end menu
+@node Bar lines and bar checks
+@subsection Bar lines and bar checks
+
+@menu
+* Bar lines::
+* Bar checks::
+@end menu
+
+@node Bar lines
+@unnumberedsubsubsec Bar lines
+
+
+Single bar lines are automatically placed in the music so
+there is no need to add them manually. Other types of bar
+lines are added using @code{\bar}, for example
+@code{\bar "||"} for a double bar line, or @code{\bar "|."}
+for an ending bar line. For a full list of bar lines see
+the @ruser{Bar lines}.
+
+@lilypond[verbatim,quote,relative=2]
+g1 e1 \bar "||" c2. c'4 \bar "|."
+@end lilypond
@node Bar checks
-@subsection Bar checks
+@unnumberedsubsubsec Bar checks
+
Though not strictly necessary, @emph{bar checks} should be
used in the input code to show where bar lines are expected
length. Bar checks also make your input code easier to
read, since they help to keep things organized.
-@lilypond[verbatim,quote,relative=2]
-g1 | e1 | c2. c'4 | g4 c g e | c4 r r2 |
+@c This example deliberately produces a warning
+@lilypond[verbatim,quote]
+\relative g' {
+ g1 | e1 | c2. c' | g4 c g e | c4 r r2 |
+}
@end lilypond
+If you compile the code in the example above, you should see a
+warning in the console output:
+
+@example
+warning: barcheck failed at: 1/2
+ g1 | e1 | c2. c'
+ | g4 c g e | c4 r r2 |
+@end example
+
+Although the missing duration is clear in the musical output in this
+simple example, the warning in the console output is far more
+effective in drawing attention to the missing @code{4} in bar 3.
+
@seealso
Notation Reference:
@ruser{Bar and bar number checks}.
-@node Accidentals and key signatures
-@subsection Accidentals and key signatures
+@node Pitches and key signatures
+@subsection Pitches and key signatures
+
+@menu
+* Pitch alterations::
+* Key signatures::
+* Warning key signatures and pitches::
+@end menu
-@warning{New users are often confused by these -- please read the
-warning at the bottom of this page, especially if you are not
-familiar with music theory!}
+@warning{New users often misunderstand how LilyPond uses the key
+signature -- please read the warning at the bottom of this page.}
+
+@node Pitch alterations
+@unnumberedsubsubsec Pitch alterations
-@subheading Accidentals
@cindex accidentals
-@cindex accidentals and key signatures
+@cindex natural
@cindex sharp
@cindex double sharp
@cindex sharp, double
Music Glossary: @rglos{sharp}, @rglos{flat}, @rglos{double sharp},
@rglos{double flat}, @rglos{accidental}.
+Note-names in LilyPond identify pitches. For example, @code{c}
+always means C-natural, regardless of the key signature.
+
A @notation{sharp} pitch is made by adding @code{is} to the name,
and a @notation{flat} pitch by adding @code{es}. As you might
expect, a @notation{double sharp} or @notation{double flat} is
made by adding @code{isis} or @code{eses}. This syntax is derived
from note naming conventions in Nordic and Germanic languages,
like German and Dutch. To use other names for
-@notation{accidentals}, see @ruser{Note names in other languages}.
+@notation{alterations}, see @ruser{Note names in other languages}.
@lilypond[verbatim,quote,relative=2]
cis4 ees fisis, aeses
@end lilypond
@cindex key signature, setting
-@subheading Key signatures
+
+@node Key signatures
+@unnumberedsubsubsec Key signatures
+
@cindex key signature
@cindex major
The @notation{key signature} is set with the command @code{\key}
followed by a pitch and @code{\major} or @code{\minor}.
-@lilypond[verbatim,quote,relative=2]
+@lilypond[verbatim,quote,relative=1]
\key d \major
-a1 |
-\key c \minor
-a1 |
+d4 fis a c |
+\bar "||" \key c \minor
+c,4 ees g b |
@end lilypond
@smallspace
-@subheading Warning: key signatures and pitches
+@node Warning key signatures and pitches
+@unnumberedsubsubsec Warning: key signatures and pitches
+
Music Glossary: @rglos{accidental}, @rglos{key signature},
@rglos{pitch}, @rglos{flat}, @rglos{natural}, @rglos{sharp},
@rglos{transposition}, @rglos{Pitch names}.
-To determine whether to print an @notation{accidental}, LilyPond
-examines the pitches and the @notation{key signature}. The key
-signature only affects the @emph{printed} accidentals, not the
-note's @notation{pitch}! This is a feature that often causes
-confusion to newcomers, so let us explain it in more detail.
-
-LilyPond makes a clear distinction between musical content and
-layout. The alteration (@notation{flat}, @notation{natural sign} or
-@notation{sharp}) of a note is part of the pitch, and is therefore
-musical content. Whether an accidental (a @emph{printed} flat,
-natural or sharp sign) is printed in front of the corresponding
-note is a question of layout. Layout is something that follows
-rules, so accidentals are printed automatically according to those
-rules. The pitches in your music are works of art, so they will
-not be added automatically, and you must enter what you want to
-hear.
+LilyPond makes a distinction between musical content and
+its printed representation. Input such as @code{d4 e fis2}
+defines the pitches and durations of notes, which is musical
+content. The @notation{key signature} is part of the printed
+representation. The key signature also sets rules for the
+printed representations of notes. LilyPond compares each input
+pitch to the key signature to determine whether to print an
+@notation{accidental}.
+
+The command @code{\key} sets the @notation{key signature}, which
+affects the printed representation, but does @emph{not} change
+the pitch assigned to a note such as @code{c} in the input.
In this example:
aes4 c b c
@end lilypond
-If the above seems confusing, consider this: if you were playing a
-piano, which key would you hit? If you would press a black key,
-then you @emph{must} add @w{@code{-is}} or @w{@code{-es}} to the note
-name!
+Whenever you enter a pitch that is a black key on the piano, you
+@emph{must} add @w{@code{-is}} or @w{@code{-es}} to the note name.
Adding all alterations explicitly might require a little more
effort when typing, but the advantage is that
@funindex ( ... )
@funindex \( ... \)
-@subheading Ties
+@menu
+* Ties::
+* Slurs::
+* Phrasing slurs::
+* Warnings slurs vs. ties::
+@end menu
+@node Ties
+@unnumberedsubsubsec Ties
Music Glossary: @rglos{tie}.
A @notation{tie} is created by appending a tilde @code{~} to the
-first note being tied.
+first of the two notes being tied.
@lilypond[verbatim,quote,relative=2]
g4~ g c2~ | c4~ c8 a~ a2 |
@end lilypond
-@subheading Slurs
+@cindex bare duration
+@cindex duration, bare
+
+When the pitch does not change, as is always the case with tied notes,
+subsequent pitches may be omitted, specifying just the bare duration:
+
+@lilypond[verbatim,quote,relative=2]
+g4~ 4 c2~ | 4~ 8 a~ 2 |
+@end lilypond
+
+This shorthand may be useful in other places where the rhythm changes
+with an unchanging pitch, but remember a bare duration will attach to
+the preceding pitch, making a single note, if only white space
+separates them.
+
+
+@node Slurs
+@unnumberedsubsubsec Slurs
Music Glossary: @rglos{slur}.
d4( c16) cis( d e c cis d) e( d4)
@end lilypond
-@subheading Phrasing slurs
+@node Phrasing slurs
+@unnumberedsubsubsec Phrasing slurs
+
Music Glossary: @rglos{slur}, @rglos{phrasing}.
@smallspace
@cindex slurs versus ties
-@subheading Warnings: slurs vs. ties
+
+@node Warnings slurs vs. ties
+@unnumberedsubsubsec Warnings: slurs vs. ties
+
Music Glossary: @rglos{articulation}, @rglos{slur}, @rglos{tie}.
larger groups of notes. Slurs and ties can be nested.
@lilypond[verbatim,quote,relative=2]
-c4~( c8 d~ d4 e)
+c4~( c8 d~ 4 e)
@end lilypond
@node Articulation and dynamics
@subsection Articulation and dynamics
+@menu
+* Articulations::
+* Fingerings::
+* Dynamics::
+@end menu
+
+@node Articulations
+@unnumberedsubsubsec Articulations
-@subheading Articulations
@cindex articulation
@cindex accent
dash @code{-} and a single character:
@lilypond[verbatim,quote,relative=2]
-c4-^ c-+ c-- c-|
+c4-^ c-+ c-- c-!
c4-> c-. c2-_
@end lilypond
-@subheading Fingerings
+@node Fingerings
+@unnumberedsubsubsec Fingerings
+
@cindex fingering
c4_-^1 d^. f^4_2-> e^-_+
@end lilypond
-@subheading Dynamics
+@node Dynamics
+@unnumberedsubsubsec Dynamics
+
@cindex dynamics
@cindex decrescendo
@node Advanced rhythmic commands
@subsection Advanced rhythmic commands
-@subheading Partial measure
+@menu
+* Partial measure::
+* Tuplets::
+* Grace notes::
+@end menu
+
+@node Partial measure
+@unnumberedsubsubsec Partial measure
+
@cindex pickup
@cindex anacrusis
c2 d |
@end lilypond
-@subheading Tuplets
+@node Tuplets
+@unnumberedsubsubsec Tuplets
+
@cindex tuplets
@cindex triplets
\tuplet 3/2 { d4 a8 }
@end lilypond
-@subheading Grace notes
+@node Grace notes
+@unnumberedsubsubsec Grace notes
+
@cindex grace notes
@cindex acciaccatura
with the keyword @code{\appoggiatura} or @code{\acciaccatura}:
@lilypond[verbatim,quote,relative=2]
-c2 \grace { a32[ b] } c2 |
+c2 \grace { a32 b } c2 |
c2 \appoggiatura b16 c2 |
c2 \acciaccatura b16 c2 |
@end lilypond
@cindex compound music expression
@cindex music expression, compound
+@menu
+* Analogy mathematical expressions::
+* Simultaneous music expressions multiple staves::
+* Simultaneous music expressions single staff::
+@end menu
+
In LilyPond input files, music is represented by @emph{music
expressions}. A single note is a music expression:
{ { a4 g } f4 g }
@end lilypond
-@subheading Analogy: mathematical expressions
+@node Analogy mathematical expressions
+@unnumberedsubsubsec Analogy: mathematical expressions
+
This mechanism is similar to mathematical formulas: a big formula
is created by composing small formulas. Such formulas are called
polyphonic scores.
-@subheading Simultaneous music expressions: multiple staves
+@node Simultaneous music expressions multiple staves
+@unnumberedsubsubsec Simultaneous music expressions: multiple staves
+
@cindex multiple staves
@cindex staves, multiple
@code{@bs{}relative} command.}
-@subheading Simultaneous music expressions: single staff
+@node Simultaneous music expressions single staff
+@unnumberedsubsubsec Simultaneous music expressions: single staff
+
To determine the number of staves in a piece, LilyPond looks at
the beginning of the first expression. If there is a single note,
}
@end lilypond
-
-
-
@node Staff groups
@subsection Staff groups
d4 b8 c4 a8 | d4 b8 g4
}
\addlyrics {
- Girls and boys come | out to play,
+ Girls and boys come out to play,
}
>>
@end lilypond
a4 b8 c b a | d4 b8 g4. |
}
\addlyrics {
- Girls and boys come | out to play,
- The | moon doth shine as | bright as day; |
+ Girls and boys come out to play,
+ The moon doth shine as bright as day;
}
>>
@end lilypond
-If you compile the code in the example above, you should see some
-warnings in the console output:
-
-@example
-song.ly:12:29: warning: barcheck failed at: 5/8
- The | moon doth shine as
- | bright as day; |
-song.ly:12:46: warning: barcheck failed at: 3/8
- The | moon doth shine as | bright as day;
- |
-@end example
-
-This is a good example of the usefulness of bar checks. Now,
-looking at the music, we see that the extra lyrics do not align
+Looking at the music, we see that the extra lyrics do not align
properly with the notes. The word @notation{shine} should be sung
on two notes, not one. This is called a @notation{melisma}, a
single syllable sung to more than one note. There are several
a4 b8 c( b) a | d4 b8 g4. |
}
\addlyrics {
- Girls and boys come | out to play,
- The | moon doth shine as | bright as day; |
+ Girls and boys come out to play,
+ The moon doth shine as bright as day;
}
>>
@end lilypond
a4 b8 c([ b]) a | d4 b8 g4. |
}
\addlyrics {
- Girls and boys come | out to play,
- The | moon doth shine as | bright as day; |
+ Girls and boys come out to play,
+ The moon doth shine as bright as day;
}
>>
@end lilypond
a4 b8 c[ b] a | d4 b8 g4. |
}
\addlyrics {
- Girls and boys come | out to play,
- The | moon doth shine _ as | bright as day; |
+ Girls and boys come out to play,
+ The moon doth shine _ as bright as day;
}
>>
@end lilypond
c4.( bes8 a4. g8 fis4.) g8 | fis1
}
\addlyrics {
- When I am | laid,
- am | laid __ in | earth,
+ When I am laid,
+ am laid __ in earth,
}
>>
@end lilypond
d4 d e | c2
}
\addlyrics {
- A -- | way in a __ | man -- ger,
- no __ | crib for a | bed, __
+ A -- way in a __ man -- ger,
+ no __ crib for a bed,
}
>>
@end lilypond
\clef "bass"
\key c \major
\time 6/8
- c4.~ c8 d b | c8([ d]) b c d b | c8
+ c4.~ 8 d b | c8([ d]) b c d b | c8
}
\addlyrics {
- Lar -- go_al fac -- | to -- tum del -- la cit -- | tà
+ Lar -- go_al fac -- to -- tum del -- la cit -- tà
}
>>
@end lilypond
\key f \major
\time 6/8
\partial 8
- c8 | c8([ bes]) a a([ g]) f | f'4. b, | c4.~ c4
+ c8 | c8([ bes]) a a([ g]) f | f'4. b, | c4.~ 4
}
\addlyrics {
- Let | flee -- cy flocks the | hills a -- | dorn, __
+ Let flee -- cy flocks the hills a -- dorn, __
}
\relative c' {
\key f \major
r8 | r4. r4 c8 | a'8([ g]) f f([ e]) d | e8([ d]) c bes'4
}
\addlyrics {
- Let | flee -- cy flocks the | hills a -- dorn,
+ Let flee -- cy flocks the hills a -- dorn,
}
>>
@end lilypond