version that you are working on. See TRANSLATION for details.
@end ignore
-@c \version "2.11.51"
-
@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}
@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}
@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{Introduction to the LilyPond file structure}.
<<
\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'' @{
@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
@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
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.
+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.
@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.
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
@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
@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 an example of the first line of a hymn with four
verses, set for SATB. In this case the words for all four
@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,