version that you are working on. See TRANSLATION for details.
@end ignore
-@c \version "2.11.51"
+@c \version "2.12.0"
@node Fundamental concepts
@chapter Fundamental concepts
example serves as a useful starting place.
@funindex \book
+@funindex book
@funindex \score
+@funindex score
@cindex book
@cindex score
was wrapped up inside the commands shown above.
@cindex implicit contexts
+@cindex contexts, implicit
@strong{A word of warning!} Many of the examples in the LilyPond
documentation will omit the @code{\new Staff} and @code{\new Voice}
examples this works well, but for more complex examples, especially
when additional commands are used, the implicit creation of contexts
can give surprising results, maybe creating extra unwanted staves.
-The way to create contexts explicitly is explained in
+The way to create contexts explicitly is explained in
@ref{Contexts and engravers}.
@warning{When entering more than a few lines of music it is
@example
@{
- \new GrandStaff <<
+ \new StaffGroup <<
@var{...insert the whole score of a Wagner opera in here...}
>>
@}
@end example
@funindex \header
+@funindex header
@funindex \layout
+@funindex layout
@funindex \midi
+@funindex midi
@cindex header
@cindex layout
@cindex midi
@ruser{Creating MIDI files}.
@cindex scores, multiple
+@cindex book block, implicit
+@cindex implicit book block
+@funindex \book
+@funindex book
You may code multiple @code{\score} blocks. Each will be
treated as a separate score, but they will be all combined into
Every @code{\score} block is a separate chunk of music within a
@code{\book} block.
+@cindex layout block, effect of location
+
Every @code{\layout} block affects the @code{\score} or
@code{\book} block in which it appears -- i.e., a @code{\layout}
block inside a @code{\score} block affects only that @code{\score}
@ruser{File structure}.
-
@seealso
-
For a complete definition of the input format, see
@ruser{File structure}.
+
@node Score is a (single) compound musical expression
@subsection Score is a (single) compound musical expression
@funindex \score
+@funindex score
@cindex score
-@cindex Compound music expression
-@cindex Music expression, compound
+@cindex contents of a score block
+@cindex score block, contents of
+@cindex compound music expression
+@cindex music expression, compound
We saw the general organization of LilyPond input files in the
-previous section, @ref{How LilyPond input files work}. But we seemed to
-skip over the most important part: how do we figure out what to
-write after @code{\score}?
+previous section, @ref{Introduction to the LilyPond file structure}.
+But we seemed to skip over the most important part: how do we figure
+out what to write after @code{\score}?
We didn't skip over it at all. The big mystery is simply that
there @emph{is} no mystery. This line explains it all:
@example
\score @{
@{ % this brace begins the overall compound music expression
- \new GrandStaff <<
+ \new StaffGroup <<
@var{...insert the whole score of a Wagner opera in here...}
>>
@} % this brace ends the overall compound music expression
A whole Wagner opera would easily double the length of this
manual, so let's just add a singer and piano. We don't need a
-@code{GrandStaff} for this ensemble, which simply groups a number
-of staves together with a brace at the left, so we shall remove
+@code{StaffGroup} for this ensemble, which simply groups a number
+of staves together with a bracket at the left, so we shall remove
it. We @emph{do} need a singer and a piano, though.
@example
<<
\new Staff = "singer" <<
>>
- \new PianoStaff = piano <<
+ \new PianoStaff = "piano" <<
>>
>>
\layout @{ @}
(left hand).
At this stage, we could start filling in notes. Inside the curly
-braces next to @code{\new Voice = vocal}, we could start writing
+braces next to @code{\new Voice = "vocal"}, we could start writing
@example
\relative c'' @{
on the same horizontal position in your text editor.
+@seealso
+Notation Reference: @ruser{Structure of a score}.
+
+
@node Nesting music expressions
@subsection Nesting music expressions
@cindex staves, temporary
+@cindex temporary staves
@cindex ossias
It is not essential to declare all staves at the beginning; they may
as follows:
@lilypond[verbatim,quote,ragged-right]
-\new Staff ="main" {
+\new Staff = "main" {
\relative g' {
r4 g8 g c4 c8 d |
e4 r8
<<
{ f c c }
\new Staff \with {
- alignAboveContext = "main" }
+ alignAboveContext = #"main" }
{ f8 f c }
>>
r4 |
placed above the staff called @qq{main} instead of the default
position which is below.
+
+@seealso
Ossia are often written without clef and without
time signature and are usually in a smaller font.
These require further commands which
-have not yet been introduced. See @ref{Size of objects}.
+have not yet been introduced. See @ref{Size of objects},
+and @ruser{Ossia staves}.
+
@node On the un-nestedness of brackets and ties
@subsection On the un-nestedness of brackets and ties
@cindex brackets, nesting
+@cindex bracket types
+@cindex brackets, enclosing vs. marking
You have already met a number of different types of bracket in
writing the input file to LilyPond. These obey different rules
tuplets written as @code{\times x/y @{..@}}, and grace notes
written as @code{\grace@{..@}}.
-Outside LilyPond, the conventional use of brackets requires
-the different types to be properly nested, like this,
-@code{<< [ @{ ( .. ) @} ] >>}, with the closing brackets being
-encountered in exactly the opposite order to the opening
-brackets. This @strong{is} a requirement for the three types of
-bracket described by the word @q{Encloses} in the table above --
-they must nest properly.
-However, the remaining brackets, described with the word
-@q{Marks} in the table above together with ties and tuplets,
-do @strong{not} have to nest
-properly with any of the brackets. In fact, these are not
-brackets in the sense that
-they enclose something -- they are simply markers to indicate
-where something starts and ends.
+Outside LilyPond, the conventional use of brackets requires the
+different types to be properly nested, like this, @code{<< [ @{ ( .. )
+@} ] >>}, with the closing brackets being encountered in exactly the
+opposite order to the opening brackets. This @strong{is} a
+requirement for the three types of bracket described by the word
+@q{Encloses} in the table above -- they must nest properly. However,
+the remaining brackets, described with the word @q{Marks} in the table
+above together with ties and tuplets, do @strong{not} have to nest
+properly with any of the brackets. In fact, these are not brackets in
+the sense that they enclose something -- they are simply markers to
+indicate where something starts and ends.
So, for example, a phrasing slur can start before a manually
inserted beam and end before the end of the beam -- not very
@cindex polyphony
@cindex layers
@cindex multiple voices
+@cindex voices, multiple
@cindex Voice context
@cindex context, Voice
@cindex simultaneous music
+@cindex music, simultaneous
@cindex concurrent music
+@cindex music, concurrent
+@cindex voices vs. chords
+@cindex chords vs. voices
The lowest, most fundamental or innermost layers in a LilyPond
score are called @q{Voice contexts} or just @q{Voices} for short.
Voices are sometimes called @q{layers} in other notation
packages.
-In fact, a Voice layer or context is the only one which can
-contain music. If a Voice context is not explicitly declared
-one is created automatically, as we saw at the beginning of
-this chapter. Some instruments such as an
-Oboe can play only one note at a time. Music written for
-such instruments is monophonic and requires just a single
-voice. Instruments which can play more than one note at a
-time like the piano will often require multiple voices to
-encode the different concurrent notes and rhythms they are
-capable of playing.
+In fact, a Voice layer or context is the only one which can contain
+music. If a Voice context is not explicitly declared one is created
+automatically, as we saw at the beginning of this chapter. Some
+instruments such as an Oboe can play only one note at a time. Music
+written for such instruments is monophonic and requires just a single
+voice. Instruments which can play more than one note at a time like
+the piano will often require multiple voices to encode the different
+concurrent notes and rhythms they are capable of playing.
A single voice can contain many notes in a chord, of course,
so when exactly are multiple voices needed? Look first at
@end lilypond
+@cindex voices, naming
+@cindex voices crossing brackets
+@cindex slurs crossing brackets
+@cindex ties crossing brackest
+
This example has just two voices, but the same construct may be
used to encode three or more voices by adding more back-slash
separators.
Voice one is set to red diamonds, voice two to blue triangles,
voice three to green crossed circles, and voice four (not used
here) to magenta crosses; @code{\voiceNeutralStyle} (also not
-used here) reverts the style back to the default.
+used here) reverts the style back to the default.
We shall see later how commands like these may be created by the
user.
See @ref{Visibility and color of objects} and
@ref{Using variables for tweaks}.
+@cindex polyphony and relative note entry
+@cindex relative note entry and polyphony
+
Polyphony does not change the relationship of notes within a
@code{\relative @{ @}} block. Each note is still calculated
relative to the note immediately preceding it, or to the first
\relative c' @{ noteE ... @}
@end example
-Let us finally analyze the voices in a more complex piece of
-music. Here are
-the notes from the first two bars of the second of Chopin's
-Deux Nocturnes, Op 32. This example will be used at later
-stages in this and the next chapter to illustrate several
-techniques for producing notation, so please ignore for now
-anything in the underlying code which looks mysterious and
-concentrate just on the music and the voices -- the
-complications will all be explained in later sections.
+Let us finally analyze the voices in a more complex piece of music.
+Here are the notes from the first two bars of the second of Chopin's
+Deux Nocturnes, Op 32. This example will be used at later stages in
+this and the next chapter to illustrate several techniques for
+producing notation, so please ignore for now anything in the
+underlying code which looks mysterious and concentrate just on the
+music and the voices -- the complications will all be explained in
+later sections.
@c The following should appear as music without code
@lilypond[quote,ragged-right]
}
@end lilypond
-The direction of the stems is often used to indicate the
-continuity of two simultaneous melodic lines. Here the
-stems of the highest notes are all pointing up and the
-stems of the lower notes are all pointing down.
-This is the first indication that more than one voice
-is required.
+The direction of the stems is often used to indicate the continuity of
+two simultaneous melodic lines. Here the stems of the highest notes
+are all pointing up and the stems of the lower notes are all pointing
+down. This is the first indication that more than one voice is
+required.
But the real need for multiple voices arises when notes
which start at the same time have different durations.
@end lilypond
@cindex stem down
+@cindex voices and stem directions
+@cindex stem directions and voices
@cindex stem up
The stem directions are automatically assigned with the
odd-numbered voices taking upward stems and the even-numbered
voices downward ones. The stems for voices 1 and 2 are right,
but the stems in voice 3 should go down in this particular piece
-of music. We can correct this simply by missing out voice three
-and placing the music in voice four:
+of music. We can correct this by skipping voice three
+and placing the music in voice four. This is done by simply
+adding another pair of @code{\\}.
@lilypond[quote,verbatim,fragment,ragged-right]
\new Staff \relative c'' {
overlapping notation}.
+@seealso
+Notation Reference: @ruser{Multiple voices}.
+
+
@node Explicitly instantiating voices
@subsection Explicitly instantiating voices
@funindex \voiceOne
+@funindex voiceOne
@funindex \voiceTwo
+@funindex voiceTwo
@funindex \voiceThree
+@funindex voiceThree
@funindex \voiceFour
+@funindex voiceFour
@funindex \oneVoice
+@funindex oneVoice
@funindex \new Voice
-@cindex Voice contexts, creating
+@cindex voice contexts, creating
Voice contexts can also be created manually
inside a @code{<< >>} block to create polyphonic music, using
>>
@end lilypond
+@cindex voices, reverting to single
+@cindex reverting to a single voice
+
The @code{\voiceXXX} commands set the direction of stems, slurs,
ties, articulations, text annotations, augmentation dots of dotted
notes, and fingerings. @code{\voiceOne} and @code{\voiceThree}
@cindex nesting music expressions
@cindex nesting simultaneous constructs
-
+@cindex nesting voices
@cindex voices, temporary
@cindex voices, nesting
@subsubheading Note columns
@cindex note column
+@cindex note collisions
+@cindex collisions, notes
@cindex shift commands
@funindex \shiftOff
+@funindex shiftOff
@funindex \shiftOn
+@funindex shiftOn
@funindex \shiftOnn
+@funindex shiftOnn
@funindex \shiftOnnn
+@funindex shiftOnnn
Closely spaced notes in a chord, or notes occurring at the same
time in different voices, are arranged in two, occasionally more,
would otherwise occur. By default, the outer voices (normally
voices one and two) have @code{\shiftOff} specified, while the
inner voices (three and four) have @code{\shiftOn} specified.
-When a shift is applied, Voices one and three are shifted to
+When a shift is applied, voices one and three are shifted to
the right and voices two and four to the left.
@code{\shiftOnn} and @code{\shiftOnnn} define further shift
have no shift or the same shift specified, the error message
@qq{Too many clashing note columns} will be produced.
+
+@seealso
+Notation Reference: @ruser{Multiple voices}.
+
+
@node Voices and vocals
@subsection Voices and vocals
@funindex \new Lyrics
@funindex \lyricsto
+@funindex lyricsto
+@funindex Lyrics
@cindex Lyrics context, creating
@cindex lyrics, linking to voice
@cindex lyrics and beaming
@cindex beaming and lyrics
@funindex \autoBeamOff
+@funindex autoBeamOff
The automatic beaming which LilyPond uses by default works well
for instrumental music, but not so well for music with lyrics,
@code{\autoBeamOff} to turn off the automatic beaming.
@funindex \new ChoirStaff
+@funindex ChoirStaff
@funindex \lyricmode
+@funindex lyricmode
@cindex vocal score structure
+@cindex choir staff
Let us reuse the earlier example from Judas Maccabæus to
illustrate this more flexible technique. We first recast
}
@end lilypond
-This is the basic structure of all vocal scores. More staves may
-be added as required, more voices may be added to the staves,
-more verses may be added to the lyrics,
-and the variables containing the music can easily be placed
-in separate files should they become too long.
+This is the basic structure of all vocal scores. More staves may be
+added as required, more voices may be added to the staves, more verses
+may be added to the lyrics, and the variables containing the music can
+easily be placed in separate files should they become too long.
@cindex hymn structure
+@cindex SATB structure
+@cindex vocal scores with multiple verses
+@cindex multiple vocal verses
+@cindex verses, multiple vocal
-Here is a example of the first line of a hymn with four
+Here is an example of the first line of a hymn with four
verses, set for SATB. In this case the words for all four
parts are the same. Note how we use variables to separate the
music notation and words from the staff structure. See too
One two three four five six
}
\score {
- \new Choirstaff {
+ \new ChoirStaff {
\new Staff <<
\new Voice = "verse" {
\versenotes \break
@cindex book, example of using
@funindex \book
+@funindex book
However, although this is an interesting and useful exercise to
help you to understand how sequential and simultaneous blocks work,
}
@end lilypond
+
+@seealso
+Notation Reference: @ruser{Vocal music}.
+
+
@node Contexts and engravers
@section Contexts and engravers
The input is rather sparse, but in the output, bar lines,
accidentals, clef, and time signature have been added. When
LilyPond @emph{interprets} the input the musical information
-is inspected in time order, similar to reading a score from left
-to right. While reading the input, the program remembers where
-measure boundaries are, and which pitches require explicit
+is parsed from left to right, similar to the way a performer
+reads the score. While reading the input, the program remembers
+where measure boundaries are, and which pitches require explicit
accidentals. This information must be held on several levels.
-For example, the effect of an accidental is limited
-to a single staff, while a bar line must be synchronized across
-the entire score.
-
-Within LilyPond, these rules and bits of information are grouped
-in @emph{Contexts}. We have already met the
-@code{Voice} context.
-Others are the @code{Staff} and @code{Score} contexts.
-Contexts are hierarchical to reflect the hierarchical nature of
-a musical score.
-For example: a @code{Staff} context can contain many
-@code{Voice} contexts, and a @code{Score} context can
-contain many @code{Staff} contexts.
+For example, an accidental affects only a single staff, while
+a bar line must be synchronized across the entire score.
+
+Within LilyPond, these rules and bits of information are grouped in
+@emph{Contexts}. We have already introduced the @code{Voice} context.
+Others are the @code{Staff} and @code{Score} contexts. Contexts are
+hierarchical to reflect the hierarchical nature of a musical score.
+For example: a @code{Staff} context can contain many @code{Voice}
+contexts, and a @code{Score} context can contain many @code{Staff}
+contexts.
@quotation
@sourceimage{context-example,5cm,,}
preceding word with no hyphen or underscore, e.g.,
@code{GregorianTranscriptionStaff}.
+
+@seealso
+Notation Reference: @ruser{Contexts explained}.
+
+
@node Creating contexts
@subsection Creating contexts
@funindex \new
+@funindex new
@cindex new contexts
@cindex creating contexts
@cindex contexts, creating
-There can be only one top level context: the
-@code{Score}
-context. This is created with the @code{\score} command,
-or, in simple scores, it is created automatically.
+There can be only one top level context: the @code{Score} context.
+This is created with the @code{\score} command, or, in simple scores,
+it is created automatically.
-For scores with only one voice and one staff, the
-@code{Voice} and @code{Staff} contexts may be left to be
-created automatically, but for more complex scores it is
-necessary to create them by hand.
-The simplest command that does this is @code{\new}.
-It is prepended to a music expression, for example
+For scores with only one voice and one staff, the @code{Voice} and
+@code{Staff} contexts may be left to be created automatically, but for
+more complex scores it is necessary to create them by hand. The
+simplest command that does this is @code{\new}. It is prepended to a
+music expression, for example
@example
\new @var{type} @var{music-expression}
Note the distinction between the name of the context type,
@code{Staff}, @code{Voice}, etc, and the identifying name of a
particular instance of that type, which can be any sequence of letters
-and digits invented by the user. The identifying name is used to
+invented by the user. Digits and spaces can also be used in the
+identifying name, but then it has to be placed in quotes,
+i.e. @code{\new Staff = "MyStaff 1" @var{music-expression}}.
+The identifying name is used to
refer back to that particular instance of a context. We saw this in
-use in the section on lyrics in @ref{Voices and vocals}.
+use in the section on lyrics, see @ref{Voices and vocals}.
+
+
+@seealso
+Notation Reference: @ruser{Creating contexts}.
@node Engravers explained
more than a few, and for simple scores you do not need to know
about any.
-Engravers live and operate in Contexts.
-Engravers such as the @code{Metronome_mark_engraver}, whose
-action and output applies to the score as a whole, operate in
-the highest level context -- the @code{Score} context.
+Engravers live and operate in Contexts. Engravers such as the
+@code{Metronome_mark_engraver}, whose action and output apply to the
+score as a whole, operate in the highest level context -- the
+@code{Score} context.
The @code{Clef_engraver} and @code{Key_engraver} are to be
-found in every Staff Context, as different staves may require
+found in every @code{Staff} Context, as different staves may require
different clefs and keys.
The @code{Note_heads_engraver} and @code{Stem_engraver} live
by modifying the action of Engravers.
+@seealso
+Internals reference: @rinternals{Engravers and Performers}.
+
+
@node Modifying context properties
@subsection Modifying context properties
@cindex context properties, modifying
@cindex modifying context properties
@funindex \set
+@funindex set
@funindex \unset
+@funindex unset
Contexts are responsible for holding the values of a number of
context @emph{properties}. Many of them can be changed to
in the @code{\set} statement. So when a Boolean is being
entered you need to code two hash signs, e.g., @code{##t}.
+@cindex properties operating in contexts
+@cindex setting properties within contexts
+
Before we can set any of these properties we need to know
in which context they operate. Sometimes this is obvious,
but occasionally it can be tricky. If the wrong context
is specified, no error message is produced, but the expected
action will not take place. For example, the
-@code{instrumentName} clearly lives in the Staff context, since
+@code{instrumentName} clearly lives in the @code{Staff} context, since
it is the staff that is to be named.
In this example the first staff is labelled, but not the second,
because we omitted the context name.
>>
@end lilypond
-Remember the default context name is Voice, so the second
+Remember the default context name is @code{Voice}, so the second
@code{\set} command set the property @code{instrumentName} in the
-Voice context to @qq{Alto}, but as LilyPond does not look
+@code{Voice} context to @qq{Alto}, but as LilyPond does not look
for any such property in the @code{Voice} context, no
further action took place. This is not an error, and no error
message is logged in the log file.
Similarly, if the property name is mis-spelt no error message is
-produced, and clearly the expected action cannot be performed. If
+produced, and clearly the expected action cannot be performed. In
fact, you can set any (fictitious) @q{property} using any name you
like in any context that exists by using the @code{\set} command. But
if the name is not known to LilyPond it will not cause any action to
shall see later that text can actually be specified in a much more
general way by using the very powerful @code{markup} command.
-@unnumberedsubsubsec Setting context properties with @code{\with}
+@subsubheading Setting context properties with @code{\with}
@funindex \with
+@funindex with
@cindex context properties, setting with \with
Context properties may also be set at the time the context is
Properties set in this way may still be changed dynamically using
@code{\set} and returned to their default value with @code{\unset}.
+@cindex fontSize, default and setting
+
The @code{fontSize} property is treated differently. If this is
set in a @code{\with} clause it effectively resets the default
value of the font size. If it is later changed with @code{\set},
this new default value may be restored with the
@code{\unset fontSize} command.
-@unnumberedsubsubsec Setting context properties with @code{\context}
+@subsubheading Setting context properties with @code{\context}
+
+@cindex context properties, setting with \context
+@funindex \context
+@funindex context
The values of context properties may be set in @emph{all} contexts
of a particular type, such as all @code{Staff} contexts, with a single
command. The context type is identified by using its
type name, like @code{Staff}, prefixed by a back-slash: @code{\Staff}.
-The statement which sets the property value is the same as that in a
+The statement which sets the property value is the same as that in a
@code{\with} block, introduced above. It is placed in a
@code{\context} block within a @code{\layout} block. Each
@code{\context} block will affect all contexts of the type specified
instances of contexts by statements in a @code{\with} block, and by
@code{\set} commands embedded in music statements.
-More information about changing context properties can be found in
-the Notation Reference -- see
+
+@seealso
+Notation Reference:
@ruser{Changing context default settings}.
+@c FIXME
+@c uncomment when backslash-node-name issue is resolved -pm
+@c @ruser{The set command}.
+
+Internals Reference:
+@rinternals{Contexts},
+@rinternals{Tunable context properties}.
@node Adding and removing engravers
@subsection Adding and removing engravers
@cindex engravers, adding
+@cindex adding engravers
@cindex engravers, removing
+@cindex removing engravers
@funindex \consists
+@funindex consists
@funindex \remove
+@funindex remove
We have seen that contexts each contain several engravers, each
of which is responsible for producing a particular part of the
@subsubheading Changing all contexts of the same type
@funindex \layout
+@funindex layout
The examples above show how to remove or add engravers to
individual contexts. It is also possible to remove or add
}
@end lilypond
+@noindent
+The values of context properties may also be set
+for all contexts of a particular type by including the
+@code{\set} command in a @code{\context} block in the
+same way.
+
+
+@seealso
+Notation Reference: @ruser{Modifying context plug-ins},
+@ruser{Changing context default settings}.
+
@node Extending the templates
@section Extending the templates
@subsection Soprano and cello
@cindex template, modifying
+@cindex modifying templates
Start off with the template that seems closest to what you want to end
up with. Let's say that you want to write something for soprano and
}
@end lilypond
-@seealso
+@seealso
The starting templates can be found in the @q{Templates} appendix,
see @ref{Single staff}.
<< % combine ChoirStaff and PianoStaff in parallel
\new ChoirStaff <<
\new Staff = "sopranos" <<
- \set Staff.instrumentName = "Soprano"
+ \set Staff.instrumentName = #"Soprano"
\new Voice = "sopranos" { \global \sopranoMusic }
>>
\new Lyrics \lyricsto "sopranos" { \sopranoWords }
\new Staff = "altos" <<
- \set Staff.instrumentName = "Alto"
+ \set Staff.instrumentName = #"Alto"
\new Voice = "altos" { \global \altoMusic }
>>
\new Lyrics \lyricsto "altos" { \altoWords }
\new Staff = "tenors" <<
- \set Staff.instrumentName = "Tenor"
+ \set Staff.instrumentName = #"Tenor"
\new Voice = "tenors" { \global \tenorMusic }
>>
\new Lyrics \lyricsto "tenors" { \tenorWords }
\new Staff = "basses" <<
- \set Staff.instrumentName = "Bass"
+ \set Staff.instrumentName = #"Bass"
\new Voice = "basses" { \global \bassMusic }
>>
\new Lyrics \lyricsto "basses" { \bassWords }
>> % end ChoirStaff
\new PianoStaff <<
- \set PianoStaff.instrumentName = "Piano"
+ \set PianoStaff.instrumentName = #"Piano"
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
The variables holding the music and words for the vocal parts are
fine, but we shall need to add variables for the piano reduction.
-The order in which the contexts appear in the ChoirStaff of
-the template do not correspond with the order in the vocal
-score shown above. We need to rearrange them so there are
-four staves with the words written directly underneath the
-notes for each part.
-All the voices should be @code{\voiceOne}, which is
-the default, so the @code{\voiceXXX} commands should be removed.
-We also need to specify the tenor clef for the tenors.
-The way in which lyrics are specified in the template has not yet
-been encountered so we need to use the method with which we are
-familiar. We should also add the names of each staff.
+The order in which the contexts appear in the ChoirStaff of the
+template do not correspond with the order in the vocal score shown
+above. We need to rearrange them so there are four staves with the
+words written directly underneath the notes for each part. All the
+voices should be @code{\voiceOne}, which is the default, so the
+@code{\voiceXXX} commands should be removed. We also need to specify
+the tenor clef for the tenors. The way in which lyrics are specified
+in the template has not yet been encountered so we need to use the
+method with which we are familiar. We should also add the names of
+each staff.
Doing this gives for our ChoirStaff:
@example
\new ChoirStaff <<
\new Staff = "sopranos" <<
- \set Staff.instrumentName = "Soprano"
+ \set Staff.instrumentName = #"Soprano"
\new Voice = "sopranos" @{ \global \sopranoMusic @}
>>
\new Lyrics \lyricsto "sopranos" @{ \sopranoWords @}
\new Staff = "altos" <<
- \set Staff.instrumentName = "Alto"
+ \set Staff.instrumentName = #"Alto"
\new Voice = "altos" @{ \global \altoMusic @}
>>
\new Lyrics \lyricsto "altos" @{ \altoWords @}
\new Staff = "tenors" <<
- \set Staff.instrumentName = "Tenor"
+ \set Staff.instrumentName = #"Tenor"
\new Voice = "tenors" @{ \global \tenorMusic @}
>>
\new Lyrics \lyricsto "tenors" @{ \tenorWords @}
\new Staff = "basses" <<
- \set Staff.instrumentName = "Bass"
+ \set Staff.instrumentName = #"Bass"
\new Voice = "basses" @{ \global \bassMusic @}
>>
\new Lyrics \lyricsto "basses" @{ \bassWords @}
@example
\new PianoStaff <<
- \set PianoStaff.instrumentName = "Piano "
+ \set PianoStaff.instrumentName = #"Piano "
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
>> % end ChoirStaff
\new PianoStaff <<
- \set PianoStaff.instrumentName = "Piano"
+ \set PianoStaff.instrumentName = #"Piano"
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
<< % combine ChoirStaff and PianoStaff in parallel
\new ChoirStaff <<
\new Staff = "sopranos" <<
- \set Staff.instrumentName = "Soprano"
+ \set Staff.instrumentName = #"Soprano"
\new Voice = "sopranos" { \global \sopranoMusic }
>>
\new Lyrics \lyricsto "sopranos" { \sopranoWords }
\new Staff = "altos" <<
- \set Staff.instrumentName = "Alto"
+ \set Staff.instrumentName = #"Alto"
\new Voice = "altos" { \global \altoMusic }
>>
\new Lyrics \lyricsto "altos" { \altoWords }
\new Staff = "tenors" <<
- \set Staff.instrumentName = "Tenor"
+ \set Staff.instrumentName = #"Tenor"
\new Voice = "tenors" { \global \tenorMusic }
>>
\new Lyrics \lyricsto "tenors" { \tenorWords }
\new Staff = "basses" <<
- \set Staff.instrumentName = "Bass"
+ \set Staff.instrumentName = #"Bass"
\new Voice = "basses" { \global \bassMusic }
>>
\new Lyrics \lyricsto "basses" { \bassWords }
>> % end ChoirStaff
\new PianoStaff <<
- \set PianoStaff.instrumentName = "Piano "
+ \set PianoStaff.instrumentName = #"Piano "
\new Staff = "upper" \upper
\new Staff = "lower" \lower
>>
@subsection Building a score from scratch
@cindex template, writing your own
+@cindex example of writing a score
+@cindex writing a score, example
+@cindex score, example of writing
After gaining some facility with writing LilyPond code, you
may find that it is easier to build a score from scratch