OK, that's clear now.

attached you'll find a working file where I (partly) combined the
templates (you'll figure out the rest).

I removed the text variables from the first template (sopranoWords etc.)
Instead I entered the stanza variables (and the chords variable) from
the second template.

In the score block you have a ChoirStaff which includes all individual
staves (and 'contexts'):
There I inserted the Chordnames context above the soprano staff.
Below the soprano staff I inserted four Lyrics contexts with the
respective stanzas.
If you really need the four stanzas below each staff you can repeat that
for the other staves too.
Explanation:
"\new Lyrics" tells LilyPond to insert a line with lyrics at that
position (e.g. below the soprano staff).
"\lyricsto" tells LilyPond which music the text is aligned to

BTW: You don't need the empty lines I have inserted but they make the
code more readable.

HTH
Urs

Am Freitag, den 03.05.2013, 08:11 +0000 schrieb Nandi:
> Urs Liska <ul <at> openlilylib.org> writes:
> 
> > As I don't quite see what you exactly want to achieve, I suggest you
> > - decide which of the templates is better as a start, 
> > - try to figure out which music variables you would need in addition,
> > - send this as an attachment and
> > - tell us exactly what is still missing
> > 
> > Best
> > Urs
> > 
> 
> 
> This first template almost does what I want (SATB + piano + one stanza):
> 
> global = { \key d \major \time 4/4 }
> sopranoMusic = \relative c' {
>   \clef "treble"
>   r4 d2 a4
> }
> sopranoWords = \lyricmode {
>   Words here
> }
> altoMusic = \relative c' {
>   \clef "treble"
>   r4 a2 a4
> }
> altoWords = \sopranoWords
> tenorMusic = \relative c' {
>   \clef "treble"
>   r4 fis2 e4
> }
> tenorWords = \sopranoWords
> bassMusic = \relative c' {
>   \clef "bass"
>   r4 d2 cis4
> }
> bassWords = \sopranoWords
> 
> upper = \relative c' {
>   \clef "treble"
>   \global
>   r4 <a d fis>2 <a e' a>4
> }
> lower = \relative c, {
>   \clef "bass"
>   \global
>   <d d'>4 <d d'>2 <cis cis'>4
> }
> 
> \score {
>   <<
>     \new ChoirStaff <<
>       \new Staff = "sopranos" <<
>         \set Staff.instrumentName = #"Soprano"
>         \new Voice = "sopranos" { \global \sopranoMusic }
>       >>
>       \new Lyrics \lyricsto "sopranos" { \sopranoWords }
>       \new Staff = "altos" <<
>         \set Staff.instrumentName = #"Alto"
>         \new Voice = "altos" { \global \altoMusic }
>       >>
>       \new Lyrics \lyricsto "altos" { \altoWords }
>       \new Staff = "tenors" <<
>         \set Staff.instrumentName = #"Tenor"
>         \new Voice = "tenors" { \global \tenorMusic }
>       >>
>       \new Lyrics \lyricsto "tenors" { \tenorWords }
>       \new Staff = "basses" <<
>         \set Staff.instrumentName = #"Bass"
>         \new Voice = "basses" { \global \bassMusic }
>       >>
>       \new Lyrics \lyricsto "basses" { \bassWords }
>     >>
> 
>     \new PianoStaff <<
>       \set PianoStaff.instrumentName = #"Piano  "
>       \new Staff = "upper" \upper
>       \new Staff = "lower" \lower
>     >>
>   >>
> }
> 
> 
> But I would need chords for the soprano part and more stanzas for each staff,
> as this second template has it:
> 
> verseI = \lyricmode {
>   \set stanza = #"1."
>   This is the first verse
> }
> 
> verseII = \lyricmode {
>   \set stanza = #"2."
>   This is the second verse.
> }
> 
> verseIII = \lyricmode {
>   \set stanza = #"3."
>   This is the third verse
> }
> 
> verseIV = \lyricmode {
>   \set stanza = #"4."
>   This is the fourth verse
> }
> 
> theChords = \chordmode {
>    c2 g4 c
> }
> 
> staffMelody = \relative c' {
>    \key c \major
>    \clef treble
>    c4 d8 e f4 g
>    \bar "|."
> }
> 
> \score {
>   <<
>     \context ChordNames { \theChords }
>     \new Staff {
>       \context Voice = "voiceMelody" { \staffMelody }
>     }
>     \new Lyrics = "lyricsI" {
>       \lyricsto "voiceMelody" \verseI
>     }
>     \new Lyrics = "lyricsII" {
>       \lyricsto "voiceMelody" \verseII
>     }
>     \new Lyrics = "lyricsIII" {
>       \lyricsto "voiceMelody" \verseIII
>     }
>  \new Lyrics = "lyricsIV" {
>       \lyricsto "voiceMelody" \verseIV
>     }
>   >>
> }
> 
> I would like to combine these two,
> but unfortunately I couldn't figure it out how.
> Thanks for your help:
> Nandi
> 
> 
> 
> 
> 
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

global = { \key d \major \time 4/4 }
sopranoMusic = \relative c' {
  \clef "treble"
  r4 d2 a4
}

altoMusic = \relative c' {
  \clef "treble"
  r4 a2 a4
}

tenorMusic = \relative c' {
  \clef "treble"
  r4 fis2 e4
}

bassMusic = \relative c' {
  \clef "bass"
  r4 d2 cis4
}


upper = \relative c' {
  \clef "treble"
  \global
  r4 <a d fis>2 <a e' a>4
}
lower = \relative c, {
  \clef "bass"
  \global
  <d d'>4 <d d'>2 <cis cis'>4
}

verseI = \lyricmode {
  \set stanza = #"1."
  first verse
}

verseII = \lyricmode {
  \set stanza = #"2."
  second verse.
}

verseIII = \lyricmode {
  \set stanza = #"3."
  third verse
}

verseIV = \lyricmode {
  \set stanza = #"4."
  fourth verse
}

theChords = \chordmode {
   d2. a4
}

\score {
  <<
    \new ChoirStaff <<
      
      \context ChordNames { \theChords }
      
      \new Staff = "sopranos" <<
        \set Staff.instrumentName = #"Soprano"
        \new Voice = "sopranos" { \global \sopranoMusic }
      >>
      
      \new Lyrics = "lyricsI" {
        \lyricsto "sopranos" \verseI
      }
      \new Lyrics = "lyricsII" {
        \lyricsto "sopranos" \verseII
      }
      \new Lyrics = "lyricsIII" {
        \lyricsto "sopranos" \verseIII
      }
      \new Lyrics = "lyricsIV" {
        \lyricsto "sopranos" \verseIV
      }
      
      \new Staff = "altos" <<
        \set Staff.instrumentName = #"Alto"
        \new Voice = "altos" { \global \altoMusic }
      >>
      \new Lyrics \lyricsto "altos" { \altoWords }
      \new Staff = "tenors" <<
        \set Staff.instrumentName = #"Tenor"
        \new Voice = "tenors" { \global \tenorMusic }
      >>
      \new Lyrics \lyricsto "tenors" { \tenorWords }
      \new Staff = "basses" <<
        \set Staff.instrumentName = #"Bass"
        \new Voice = "basses" { \global \bassMusic }
      >>
      \new Lyrics \lyricsto "basses" { \bassWords }
    >>

    \new PianoStaff <<
      \set PianoStaff.instrumentName = #"Piano  "
      \new Staff = "upper" \upper
      \new Staff = "lower" \lower
    >>
  >>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to