version that you are working on. See TRANSLATION for details.
@end ignore
-@c \version "2.11.38"
+@c \version "2.11.51"
@node Fundamental concepts
@chapter Fundamental concepts
}
@end lilypond
-@funindex \voiceXXXStyle
+@funindex \voiceOneStyle
+@funindex \voiceTwoStyle
+@funindex \voiceThreeStyle
+@funindex \voiceFourStyle
+@funindex \voiceNeutralStyle
The commands @code{\voiceXXXStyle} are mainly intended for use in
educational documents such as this one. They modify the color
note head, so that the voices may be easily distinguished.
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. We shall see later how commands like
-these may be created by the user.
+here) to magenta crosses; @code{\voiceNeutralStyle} (also not
+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}.
@funindex \voiceTwo
@funindex \voiceThree
@funindex \voiceFour
+@funindex \oneVoice
@funindex \new Voice
@cindex Voice contexts, creating
}
% Initiate second voice
\new Voice {
- % set stems, etc down
+ % Set stems, etc, down
\voiceTwo
s4 r8 e4 d c8 ~ | c8 b16 a b8 g ~ g2 |
}
% Initiate third voice
\new Voice {
- % set stems, etc up
+ % Set stems, etc, up
\voiceThree
s1 | s4 b4 c2 |
}
annotated real-music example:
@lilypond[quote,verbatim,ragged-right]
-\score { % start single compound music expression
+\score { % start of single compound music expression
<< % start of simultaneous staves section
\time 2/4
\new Staff { % create RH staff
g8 <bes d> ees, <g c> |
g8 <bes d> ees, <g c> |
} % end of LH voice one notes
- } % end of first LH voice
+ } % end of LH voice one
\new Voice { % create LH voice two
\voiceTwo
\relative g { % start of LH voice two notes
d e
\set fontSize = #2.5 % make note heads larger
f g
- \unset fontSize % return to original size
+ \unset fontSize % return to default size
a b
}
@end lilypond
@c The following should appear as music without code
@lilypond[quote,ragged-right]
global = { \key d \major \time 4/4 }
-sopMusic = \relative c'' {
+sopranoMusic = \relative c'' {
\clef "treble"
r4 d2 a4 | d4. d8 a2 | cis4 d cis2 |
}
-sopWords = \lyricmode {
+sopranoWords = \lyricmode {
Wor -- thy is the lamb that was slain
}
altoMusic = \relative a' {
\clef "treble"
r4 a2 a4 | fis4. fis8 a2 | g4 fis e2 |
}
-altoWords = \sopWords
+altoWords = \sopranoWords
tenorMusic = \relative c' {
\clef "G_8"
r4 fis2 e4 | d4. d8 d2 | e4 a, cis2 |
}
-tenorWords = \sopWords
+tenorWords = \sopranoWords
bassMusic = \relative c' {
\clef "bass"
r4 d2 cis4 | b4. b8 fis2 | e4 d a'2 |
}
-bassWords = \sopWords
+bassWords = \sopranoWords
upper = \relative a' {
\clef "treble"
\global
\new ChoirStaff <<
\new Staff = "sopranos" <<
\set Staff.instrumentName = "Soprano"
- \new Voice = "sopranos" { \global \sopMusic }
+ \new Voice = "sopranos" { \global \sopranoMusic }
>>
- \new Lyrics \lyricsto "sopranos" { \sopWords }
+ \new Lyrics \lyricsto "sopranos" { \sopranoWords }
\new Staff = "altos" <<
\set Staff.instrumentName = "Alto"
\new Voice = "altos" { \global \altoMusic }
\new ChoirStaff <<
\new Staff = "sopranos" <<
\set Staff.instrumentName = "Soprano"
- \new Voice = "sopranos" @{ \global \sopMusic @}
+ \new Voice = "sopranos" @{ \global \sopranoMusic @}
>>
- \new Lyrics \lyricsto "sopranos" @{ \sopWords @}
+ \new Lyrics \lyricsto "sopranos" @{ \sopranoWords @}
\new Staff = "altos" <<
\set Staff.instrumentName = "Alto"
\new Voice = "altos" @{ \global \altoMusic @}
<< % combine ChoirStaff and PianoStaff one above the other
\new ChoirStaff <<
\new Staff = "sopranos" <<
- \new Voice = "sopranos" @{ \global \sopMusic @}
+ \new Voice = "sopranos" @{ \global \sopranoMusic @}
>>
- \new Lyrics \lyricsto "sopranos" @{ \sopWords @}
+ \new Lyrics \lyricsto "sopranos" @{ \sopranoWords @}
\new Staff = "altos" <<
\new Voice = "altos" @{ \global \altoMusic @}
>>
@lilypond[quote,verbatim,ragged-right,addversion]
global = { \key d \major \time 4/4 }
-sopMusic = \relative c'' {
+sopranoMusic = \relative c'' {
\clef "treble"
r4 d2 a4 | d4. d8 a2 | cis4 d cis2 |
}
-sopWords = \lyricmode {
+sopranoWords = \lyricmode {
Wor -- thy is the lamb that was slain
}
altoMusic = \relative a' {
\clef "treble"
r4 a2 a4 | fis4. fis8 a2 | g4 fis fis2 |
}
-altoWords = \sopWords
+altoWords = \sopranoWords
tenorMusic = \relative c' {
\clef "G_8"
r4 fis2 e4 | d4. d8 d2 | e4 a, cis2 |
}
-tenorWords = \sopWords
+tenorWords = \sopranoWords
bassMusic = \relative c' {
\clef "bass"
r4 d2 cis4 | b4. b8 fis2 | e4 d a'2 |
}
-bassWords = \sopWords
+bassWords = \sopranoWords
upper = \relative a' {
\clef "treble"
\global
\new ChoirStaff <<
\new Staff = "sopranos" <<
\set Staff.instrumentName = "Soprano"
- \new Voice = "sopranos" { \global \sopMusic }
+ \new Voice = "sopranos" { \global \sopranoMusic }
>>
- \new Lyrics \lyricsto "sopranos" { \sopWords }
+ \new Lyrics \lyricsto "sopranos" { \sopranoWords }
\new Staff = "altos" <<
\set Staff.instrumentName = "Alto"
\new Voice = "altos" { \global \altoMusic }