Metronome settings can be entered as follows
@example
- \tempo @var{duration} = @var{per-minute}
+ i \tempo @var{duration} = @var{per-minute}
@end example
In the MIDI output, they are interpreted as a tempo change, and in the
@code{edge-width}, @code{edge-height}, and @code{shorten-pair} of
@code{PianoPedalBracket} objects (see
@internalsref{PianoPedalBracket} in the Program reference) can be modified. For example, the
-bracket may be extended to the end of the note head
+bracket may be extended to the right edge of the note head
@lilypond[quote,fragment,verbatim,relative=2]
\override Staff.PianoPedalBracket
A square bracket on the left indicates that the player should not
arpeggiate the chord
+@c todo: ugh, lousy typography. Look for real example. --hwn
+
@lilypond[quote,fragment,relative=1,verbatim]
\arpeggioBracket
<c' e g c>\arpeggio
@seealso
-Program reference: @internalsref{ArpeggioEvent} music expressions lead to
-@internalsref{Arpeggio} objects. Cross staff arpeggios are
-@internalsref{PianoStaff}.@internalsref{Arpeggio}.
+Program reference: @internalsref{ArpeggioEvent},
+@internalsref{Arpeggio}.
@refbugs
It is not possible to mix connected arpeggios and unconnected
-arpeggios in one @internalsref{PianoStaff} at the same time.
+arpeggios in one @internalsref{PianoStaff} at the same point in time.
@node Staff switch lines
@subsection Staff switch lines
@cindex @code{followVoice}
Whenever a voice switches to another staff a line connecting the notes
-can be printed automatically. This is enabled if the property
-@code{PianoStaff.followVoice} is set to true
+can be printed automatically. This is switched on by setting
+@code{PianoStaff.followVoice} to true
@lilypond[quote,fragment,relative=1,verbatim]
\context PianoStaff <<
@seealso
-The associated object is @internalsref{VoiceFollower}.
+Program reference: @internalsref{VoiceFollower}.
@refcommands
@node Vocal music
@section Vocal music
+There are three different issues when printing vocal music
-The easiest way to add lyrics to a melody, is by appending
+@itemize @bullet
+@item
+ Song texts must be entered as texts, not notes. For example, for
+lyrics, the input @code{a} should be interpreted as
+a one letter text, and not the note A.
+@item
+ Song texts must be printed as text, and not as notes.
+@item
+ Song texts must be aligned with the notes of their melody
+@end itemize
+
+The simplest solution to printing music uses the @code{\addlyrics}
+function to deal with these three problems in one go. However, these
+three functions can be controlled separately, which is necessary
+for complex vocal music.
+@menu
+* Setting simple songs::
+* Entering lyrics::
+* Hyphens and extenders::
+* The Lyrics context::
+* Flexibility in alignment::
+* More stanzas::
+* Ambitus::
+@end menu
+
+@node Setting simple songs
+@subsection Setting simple songs
+
+The easiest way to add lyrics to a melody is to append
@cindex \addlyrics
@example
\addlyrics @{ @var{the lyrics} @}
@end example
+@noindent
to a melody. Here is an example,
@lilypond[raggedright,verbatim]
- \relative { \time 3/4 c2 e4 g2. }
- \addlyrics { play the game }
+{
+ \time 3/4
+ \relative { c2 e4 g2. }
+ \addlyrics { play the game }
+}
@end lilypond
More stanzas can be added by adding more
@code{\addlyrics} sections
@lilypond[raggedright,verbatim]
- \relative { \time 3/4 c2 e4 g2. }
+{
+ \time 3/4
+ \relative { c2 e4 g2. }
\addlyrics { play the game }
\addlyrics { speel het spel }
- \addlyrics { joue le jeu }
+ \addlyrics { joue le jeu }
+}
@end lilypond
-The @code{\addlyrics} keyword has three functions: it interprets the
-following words as texts instead of notes, it sets up a context for
-printing texts (the @code{Lyrics} context), and it couples the melody
-with the lyrics, so the durations of both are aligned.
-
-These three functions can be controlled separately, and that is what
-the following sections are about.
-
-@menu
-* Entering lyrics::
-* The Lyrics context::
-* Flexibility in alignment::
-* More stanzas::
-* Ambitus::
-@end menu
-
@node Entering lyrics
@subsection Entering lyrics
Lyrics are entered in a special input mode. This mode is is introduced
by the keyword @code{\lyrics}. In this mode you can enter lyrics,
-with punctuation and accents without any hassle. Syllables are
-entered like notes, but with pitches replaced by text. For example,
+with punctuation and accents, and the input @code{a} is not parsed as
+a pitch, but rather as a one letter syllable. Syllables are entered
+like notes, but with pitches replaced by text. For example,
@example
\lyrics @{ Twin-4 kle4 twin- kle litt- le star2 @}
@end example
-A word in Lyrics mode begins with: an alphabetic character, @code{_},
-@code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
-through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
-any 8-bit character with ASCII code over 127, or a two-character
-combination of a backslash followed by one of @code{`}, @code{'},
-@code{"}, or @code{^}.
-Subsequent characters of a word can be any character that is not a digit
-and not white space. One important consequence of this is that a word
-can end with @code{@}}. The following example is usually a bug. The
-syllable includes a @code{@}}, and hence the opening brace is not balanced
+A word lyrics mode begins with an alphabetic character, and ends with
+any space or digit. The following characters can be any character
+that is not a digit or white space. One important consequence of this
+is that a word can end with @code{@}}. The following example is
+usually a bug. The syllable includes a @code{@}}, so the
+opening brace is not balanced
@example
\lyrics @{ twinkle@}
@end example
@cindex @code{\property}, in @code{\lyrics}
-Similarly, a period following a alphabetic sequence, is included in
+@noindent
+Similarly, a period following an alphabetic sequence, is included in
the resulting string. As a consequence, spaces must be inserted around
property commands
@example
@end example
This example is slightly academic, since it gives better looking
-results to use matched single quotes, @code{``} and @code{''}
+results to use single quotes, @code{``} and @code{''}
@example
\lyrics @{ He said: ``Let my peo ple go'' @}
@end example
+
+The full definition of a word start in Lyrics mode is somewhat more
+complex.
+
+A word in Lyrics mode begins with: an alphabetic character, @code{_},
+@code{?}, @code{!}, @code{:}, @code{'}, the control characters @code{^A}
+through @code{^F}, @code{^Q} through @code{^W}, @code{^Y}, @code{^^},
+any 8-bit character with ASCII code over 127, or a two-character
+combination of a backslash followed by one of @code{`}, @code{'},
+@code{"}, or @code{^}.
+
+
+
+@seealso
+
+Program reference: events @internalsref{LyricEvent}, and
+@internalsref{LyricText}.
+
+@refbugs
+
+The definition of lyrics mode is too complex.
+
+@node Hyphens and extenders
+@subsection Hyphens and extenders
+
@cindex hyphens
Centered hyphens are entered as `@code{-}@code{-}' between syllables.
next one. Such a line is called an extender line, and it is entered as
@code{__}.
+
@seealso
-Program reference: events @internalsref{LyricEvent},
-@internalsref{HyphenEvent}, and @internalsref{ExtenderEvent}. Objects
-@internalsref{LyricHyphen}, @internalsref{LyricExtender} and
-@internalsref{LyricText}.
+Program reference: @internalsref{HyphenEvent},
+@internalsref{ExtenderEvent}, @internalsref{LyricHyphen}, and
+@internalsref{LyricExtender}
Examples: @inputfileref{input/test,lyric-hyphen-retain.ly}.
-@refbugs
-
-The definition of lyrics mode is too complex.
-
@node The Lyrics context
In addition, notes are considered a melisma if they are manually
beamed, and automatic beaming (see @ref{Setting automatic beam
-behavior}) is switched off. The criteria for deciding melismata can
+behavior}) is switched off.
+
+@ignore
+
+@c nonformation:
+
+The criteria for deciding melismata can
be tuned with the property @code{melismaBusyProperties}. See
@internalsref{Melisma_translator} in the program reference for more
information.
+@end ignore
+
Lyrics can also be entered without @code{\lyricsto}. In this case the
durations of each syllable must be entered explicitly, for example,
sink2 or4 swim2.
@end verbatim
-Alignment to a melody can be specified with the @code{associatedVoice}
-property,
+The alignment to a melody can be specified with the
+@code{associatedVoice} property,
@verbatim
- \set associatedVoice = #"melody"
+ \set associatedVoice = #"lala"
@end verbatim
+@noindent
+The value of the property (here: @code{"lala"}) should be the name of
+a @internalsref{Voice} context. Without this setting, extender lines
+will not be formatted properly.
+
Here is an example demonstrating manual lyric durations,
@lilypond[relative=1,verbatim,fragment]
@seealso
-Program reference: Music expressions: @internalsref{LyricCombineMusic},
-Contexts: @internalsref{Lyrics}, @internalsref{Melisma_translator}.
+Program reference: @internalsref{LyricCombineMusic},
+@internalsref{Lyrics}, @internalsref{Melisma_translator}.
Examples: @inputfileref{input/template,satb.ly},
@inputfileref{input/regression,lyric-combine-new.ly},
inserted by hand.
-For proper processing of extender lines, the
- @internalsref{Lyrics} and @internalsref{Voice} should be
-linked. This can be achieved either by using @code{\lyricsto} or by
-setting corresponding names for both contexts. The latter is explained
-in @ref{More stanzas}.
-
@c TODO: document \new Staff << Voice \lyricsto >> bug
@node Flexibility in alignment
The term @emph{ambitus} denotes a range of pitches for a given voice
in a part of music. It also may denote the pitch range that a musical
-instrument is capable of playing. Ambits are printed on vocal
-parts, so singers can easily determine if it meets his or her
-capabilities.
+instrument is capable of playing. Ambits are printed on vocal parts,
+so performers can easily determine it meets their capabilities.
It denoted at the beginning of a piece near the initial clef. The
range is graphically specified by two note heads, that represent the
}
}
- \context ChoirStaff
- \relative c' <<
- \new Staff {
- as'' c e2 cis,2
- }
- \new Staff {
- es4 b c f as g
- }
- >>
+ \relative \new Staff {
+ as'' c e2 cis,2
+ }
@end lilypond
If you have multiple voices in a single staff, and you want a single
@cindex guitar tablature
Tablature notation is used for notating music for plucked string
-instruments. It notates pitches not by using note heads, but by
+instruments. Pitches are not denoted with note heads, but by
indicating on which string and fret a note must be played. LilyPond
offers limited support for tablature.
being the pitch (measured in semitones relative to middle C) of an
open string. The numbers specified for @code{stringTuning} are the
numbers of semitones to subtract or add, starting the specified pitch
-by default middle C, in string order. Thus, the notes are e, a, d, and
-g
+by default middle C, in string order. In the next example,
+@code{stringTunings} is set for the pitches e, a, d, and g
@lilypond[quote,fragment,verbatim]
\context TabStaff <<
@lilypond[quote,verbatim,raggedright]
-twoWays = \transpose c c' {
+twoWays = \transpose c c' {
\chords {
c1 f:sus4 bes/f
}
@subsection Chords mode
@cindex Chords mode
-Chord mode is a mode where you can input sets of pitches using common
-names. It is introduced by the keyword @code{\chords}.
-In chords mode, a chord is entered by the root, which is entered
-like a common pitch
+In chord mode sets of pitches (chords) are entered with common names.
+A chord is entered by the root, which is entered like a common pitch
+
@lilypond[quote,fragment,verbatim,relative=2]
\chords { es4. d8 c2 }
@end lilypond
+
+@noindent
+The mode is introduced by the keyword @code{\chords}.
+
@cindex chord entry
@cindex chord mode
@cindex @code{chordNameExceptions}
@item chordNameExceptions
This is a list that contains the chords that have special formatting.
-For an example, see
+For an example of tuning this property, see
@inputfileref{input/regression,chord-name-exceptions.ly}.
@cindex exceptions, chord names.
@item The group is started with a brace at the left, and bar lines are
connected. This is done with the @internalsref{GrandStaff} context.
+@lilypond[verbatim]
+\new GrandStaff
+\relative <<
+ \new Staff { c1 c }
+ \new Staff { c c }
+>>
+@end lilypond
+
+
@item The group is started with a bracket, and bar lines are connected. This is done with the
@internalsref{StaffGroup} context
+@lilypond[verbatim]
+\new GrandStaff
+\relative <<
+ \new Staff { c1 c }
+ \new Staff { c c }
+>>
+@end lilypond
+
@item The group is started with a vertical line. Bar lines are not
connected. This is the default for the score.
+@lilypond[verbatim]
+\relative <<
+ \new Staff { c1 c }
+ \new Staff { c c }
+>>
+@end lilypond
+
@end itemize
@cindex Staff, multiple
@cindex @code{\mark}
To print a rehearsal mark, use the @code{\mark} command
-@lilypond[quote,fragment,verbatim]
-\relative c'' {
+
+@lilypond[quote,fragment,verbatim,relative=1]
+{
c1 \mark \default
c1 \mark \default
c1 \mark #8
@noindent
(The letter I is skipped in accordance with engraving traditions.)
+@c FIXME - should make that tunable.
+
The mark is incremented automatically if you use @code{\mark
\default}, but you can also use an integer argument to set the mark
manually. The value to use is stored in the property
c1 \mark \default
\set Score.markFormatter
= #(lambda (mark context)
- (make-bold-markup (make-box-markup (number->string mark))))
+ (make-bold-markup
+ (make-box-markup (number->string mark))))
c1 \mark \default
c1 \mark \default
@end lilypond
The file @file{scm/translation-functions.scm} contains the definitions
of @code{format-mark-numbers} (the default format) and
-@code{format-mark-letters}. They can be used as inspiration for other
+@code{format-mark-letters}. These can be used as inspiration for other
formatting functions.
formatting functions.
Examples: @inputfileref{input/regression,rehearsal-mark-letter.ly},
+
@inputfileref{input/regression,rehearsal-mark-number.ly}.
\partcombine @var{musicexpr1} @var{musicexpr2}
@end example
-The music expressions will be interpreted as @internalsref{Voice}
-contexts. If using relative octaves, @code{\relative} should be
-specified for both music expressions, i.e.
-
-@example
-\partcombine \relative @dots{} @var{musicexpr1}
- \relative @dots{} @var{musicexpr2}
-@end example
-
-@noindent
-A @code{\relative} section that is outside of @code{\partcombine} has
-no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
The following example demonstrates the basic functionality of the part
@lilypond[quote,verbatim,raggedright,fragment,relative=2]
\new Staff <<
- \set Staff.soloADue = ##f
+ \set Staff.printPartCombineTexts = ##f
\partcombine
\relative g' { g a( b) r }
\relative g' { g r4 r f }
>>
@end lilypond
+
+Both arguments to @code{\partcombine} will be interpreted as
+@internalsref{Voice} contexts. If using relative octaves,
+@code{\relative} should be specified for both music expressions, i.e.
+
+@example
+\partcombine
+ \relative @dots{} @var{musicexpr1}
+ \relative @dots{} @var{musicexpr2}
+@end example
+
+@noindent
+A @code{\relative} section that is outside of @code{\partcombine} has
+no effect on the pitches of @var{musicexpr1} and @var{musicexpr2}.
+
@seealso
Program reference: @internalsref{PartCombineMusic},
@refbugs
-In @code{soloADue} mode, when the two voices play the same notes on and
-off, the part combiner may typeset @code{a2} more than once in a
-measure.
+When @code{soloADue} is set, when the two voices play the same notes
+on and off, the part combiner may typeset @code{a2} more than once in
+a measure.
@code{\partcombine} cannot be inside @code{\times}.
@lilypond[quote,verbatim]
- \paper {
- linewidth = 6.\cm
- \context { \RemoveEmptyStaffContext }
- }
+\paper {
+ \context { \RemoveEmptyStaffContext }
+}
{
\relative c' <<
}
@end lilypond
-The first page shows all staves in full. If empty staves should be
-removed from the first page too, set @code{remove-first} to false in
+The first system shows all staves in full. If empty staves should be
+removed from the first system too, set @code{remove-first} to false in
@internalsref{RemoveEmptyVerticalGroup}.
Another application is making ossia sections, i.e. alternative
@example
c1
- \relative c' <<
+ <<
\tag #'part <<
R1 \\
@{
By applying the @code{remove-tag} function, tagged expressions can be
filtered. For example,
@example
-\simultaneous @{
+<<
@var{the music}
\applymusic #(remove-tag 'score) @var{the music}
\applymusic #(remove-tag 'part) @var{the music}
-@}
+>>
@end example
would yield