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
@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
@lilypond[verbatim,quote]
\new GrandStaff <<
- \new Staff = "Vln" {
+ \new Staff = "violin" {
\relative c'' {
\set Staff.instrumentName = "Vln"
\set Staff.midiInstrument = "violin"
and use them as follows:
@lilypond[quote,verbatim]
-emph = {
+emphasize = {
\override Lyrics . LyricText #'font-shape = #'italic
\override Lyrics . LyricText #'font-series = #'bold
}
-norm = {
+normal = {
\revert Lyrics . LyricText #'font-shape
\revert Lyrics . LyricText #'font-series
}
global = { \time 4/4 \partial 4 \key c \major}
-SopMusic = \relative c' { c4 | e4. e8 g4 g | a a g }
+SopranoMusic = \relative c' { c4 | e4. e8 g4 g | a a g }
AltoMusic = \relative c' { c4 | c4. c8 e4 e | f f e }
TenorMusic = \relative c { e4 | g4. g8 c4. b8 | a8 b c d e4 }
BassMusic = \relative c { c4 | c4. c8 c4 c | f8 g a b c4 }
-VerseOne = \lyrics { E -- | ter -- nal \emph Fa -- ther, \norm | strong to save, }
-VerseTwo = \lyricmode { O | \emph Christ, \norm whose voice the | wa -- ters heard, }
-VerseThree = \lyricmode { O | \emph Ho -- ly Spi -- rit, \norm | who didst brood }
-VerseFour = \lyricmode { O | \emph Tri -- ni -- ty \norm of | love and pow'r }
+VerseOne = \lyrics { E -- | ter -- nal \emphasize Fa -- ther, \normal | strong to save, }
+VerseTwo = \lyricmode { O | \emphasize Christ, \normal whose voice the | wa -- ters heard, }
+VerseThree = \lyricmode { O | \emphasize Ho -- ly Spi -- rit, \normal | who didst brood }
+VerseFour = \lyricmode { O | \emphasize Tri -- ni -- ty \normal of | love and pow'r }
\score {
\new ChoirStaff <<
\new Staff <<
\clef "treble"
- \new Voice = "Sop" { \voiceOne \global \SopMusic }
+ \new Voice = "Soprano" { \voiceOne \global \SopranoMusic }
\new Voice = "Alto" { \voiceTwo \AltoMusic }
\new Lyrics \lyricsto "Sop" { \VerseOne }
\new Lyrics \lyricsto "Sop" { \VerseTwo }
You may even realize that this could be useful in minimalist music:
@lilypond[quote,verbatim,ragged-right]
-fragA = \relative c'' { a4 a8. b16 }
-fragB = \relative c'' { a8. gis16 ees4 }
-violin = \new Staff { \fragA \fragA \fragB \fragA }
+fragmentA = \relative c'' { a4 a8. b16 }
+fragmentB = \relative c'' { a8. gis16 ees4 }
+violin = \new Staff { \fragmentA \fragmentA \fragmentB \fragmentA }
\score {
{
\violin