example of including lyrics into seperate files

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

example of including lyrics into seperate files

Stephen Torri
I am playing around with the tag feature so that I can print out a
master score for a piece and the individual instrument music. In order
to follow along on the hymn I want to include the lyrics for all four
verses in the master score and the individual instrument music. Below is
the master lilypond file (piece.ly) and a instrument file (guitar1.ly).
I can print out the master score using score.ly and an instrument using
guitar1.ly.

Any idea of how to insert the lyrics into the score.ly and guitar1.ly
respectively"?

Stephen

-------- piece.ly --------
\version "2.6.5"

global= {
        \time 2/2
}

\header {
        title = "Let All Mortal Flesh Keep Silence"
        subtitle = \markup \normal-text \italic "The Lord is in his holy
temple; let all the earth be silent before him. Hab. 2:20"
        arranger = "Arr. by Stephen Torri"
}

%---------------------------
%   First guitar (regular)
%--------------------------
firstGuitar = \new Voice {
        \set Staff.instrument = \markup {
                \column { "Guitar 1"
                   "(capo 5)"
                }
        }
        \relative c
        {
                        \global
                        \key a \minor
                        % Am (measure 1)
                        d'4^"Am" a' f' d |

                        % Am F (measure 2)
                        a2
                        <f a d f>2\arpeggio^"F" |

                        % C (measure 3)
                        f4^"C" a f' c |

                        % Am (measure 4)
                        d,4^"Am" a' f' d |

                        % F (measure 5)
                        d,^"F" a' f' d |

                        % E (measure 6)
                        <e, a des f a>1\arpeggio^"E" |

                        % F (measure 7)
                        d4^"F" bes' f' d |

                        % C (measure 8)
                        f,4^"C" a f' c |

                        % Dm Am (measure 9)
                        <g d' g a>2\arpeggio^"Dm"
                        <d a' d f a>\arpeggio^"Am" |

                        % Am G#m (measure 10)
                        g,4 d'
                        <bes g' c dis g c>4\arpeggio^"G#m"
                        ( <bes g' c dis g c> ) |

                        % F (measure 11)
                        d4^"F" bes' f' d |

                        % C (measure 12)
                        <f, a c f a>1\arpeggio^"C" |

                        % A (measure 13)
                        d4^"A" a' ges' d |

                        % Dm (measure 14)
                        g,^"Dm" d' bes' g |

                        % Am (measure 15)
                        d,4^"Am" a' f' d |

                        % G (measure 16)
                        <c, e g c e c'>1\arpeggio^"G" |

                        % Am (measure 17)
                        d,4^"Am" a' f' d |

                        % Dm G (measure 18)
                        <g d' g a>2\arpeggio^"Dm"
                        <c, e g c e c'>2\arpeggio^"G" |

                        % Am (measure 19)
                        <d a' d f a>1\arpeggio^"Am" |
        }
}

%---------------------------
%   Lyrics
%---------------------------
firstVerse = \lyricmode
{
  \set stanza = "1. "
  Let all mor -- tal |
  flesh keep |
  si -- _ lence, _ |
  and with fear and |
  trem -- _ bling _ |
  stand; |
  pon -- der noth -- ing |
  earth -- _ ly _ |
  mind -- ed, |
  for with blessing |
  in _ his _ |
  hand, |
  Christ our God to |
  earth _ _ de- |
  scend _ -- _ _ |
  eth, |
  our full hom -- age |
  to de- |
  mand.
}

secondVerse = \lyricmode
{
  \set stanza = "2. "
  King of kings, yet |
  born of |
  Mar _ -- y _ |
  as of old on |
  eather _ he _ |
  stood, |
  Lord of lords, in |
  hu _ -- man _ |
  ves -- ture, |
  in the body |
  and _ the _ |
  blood, |
  he will give to |
  all _ the _ |
  faith _ -- _ _ |
  ful |
  his own self for |
  heav'n -- ly |
  food.
}

thirdVerse = \lyricmode
{
  \set stanza = "3. "
  Rank on rank the |
  host of |
  heav _ -- en _ |
  speads its van -- guard |
  on _ the _ |
  way, |
  as the Light of |
  light _ de -- _ |
  scend -- eth |
  from the "realms of" |
  end -- _ less _ |
  day, |
  that the pow'rs of |
  hell _ may _ |
  van _ -- _ _ |
  ish |
  as the dark -- ness |
  clears a |
  way.
}

fourthVerse = \lyricmode
{
  \set stanza = "4. "
  At his feet the |
  six -- winged |
  ser -- _ aph _ |
  cher -- u -- bim, with |
  sleep -- _ less _ |
  eye, |
  veil their fac -- es |
  to _ the _ |
  pres -- ence, |
  as with "cease-less" |
  voice _ they _ |
  cry, |
  ''Al -- le -- lu -- ia, |
  al -- _ le -- _ |
  lu _ -- _ _ |
  ia, |
  al -- le -- lu -- ia, |
  Lord Most |
  High!'' |
}

%---------------------------
%   Second guitar (tablature)
%---------------------------
secondGuitar = \new Voice {
        \set Staff.instrument = \markup
        {
                \column { "Guitar 2"
                   "(capo 5)"
                }
        }
        \context Voice = "GuitarTwo" {
                \relative c
                {
                        \global
                        \key a \minor
                        % Am (measure 1)
                        d'4 a' a' f |

                        % Am F (measure 2)
                        d2
                        <f, a c f>2\arpeggio |

                        % C (measure 3)
                        f4 a a' f |

                        % Am (measure 4)
                        d,4 a' a' f |

                        % F (measure 5)
                        d, bes' bes' f |

                        % E (measure 6)
                        <e, a e' f>1\arpeggio^"E" |

                        % F (measure 7)
                        d4 bes' bes' f |

                        % C (measure 8)
                        f,4 a a' f |

                        % Dm Am (measure 9)
                        <g, d' g bes>2\arpeggio
                        <d a' d f a>\arpeggio |

                        % Am G#m (measure 10)
                        g,4 d'
                        <bes g' c dis g c>4\arpeggio^"G#m"
                        ( <bes g' c dis g c> ) |

                        % F (measure 11)
                        d4 bes' bes' f |

                        % C (measure 12)
                        <f, a c f a>1\arpeggio |

                        % A (measure 13)
                        d4 a' b' ges |

                        % Dm (measure 14)
                        d,4 g bes' g |

                        % Am (measure 15)
                        d,4 a' a' f |

                        % G (measure 16)
                        <c, e g c e c'>1\arpeggio |

                        % Am (measure 17)
                        d4 a' a' f |

                        % Dm G (measure 18)
                        <g, d' g a>2\arpeggio
                        <c, e g c e c'>2\arpeggio |

                        % Am (measure 19)
                        <d a' d f a>1\arpeggio |
        }
        }
}

%---------------------------
%   Score
%---------------------------
music  = {
    <<
    \tag #'(score guitar1) \new Staff { << \global \firstGuitar >> }
    %\lyricsto "GuitarOne" \new Lyrics \firstVerse
    %\lyricsto "GuitarOne" \new Lyrics \secondVerse
    %\lyricsto "GuitarOne" \new Lyrics \thirdVerse
    %\lyricsto "GuitarOne" \new Lyrics \fourthVerse
    \tag #'(score guitar2) \new Staff { << \global \secondGuitar >> }
    >>
}

---------- score.ly --------------
%%%%%% guitar1.ly
\version "2.6.5"
\include "piece.ly"

\score {
        \new StaffGroup \keepWithTag #'score \music
        \layout{}
}

---------- guitar1.ly ------------
%%%%%% guitar1.ly
\version "2.6.5"
\include "piece.ly"

\score {
        \keepWithTag #'guitar1 \music
        \layout{}
}


_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user

signature.asc (196 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: example of including lyrics into seperate files

Mats Bengtsson-6
Just give an explicit name to the Voice of the first guitar:

firstGuitar = \context Voice GuitarOne {

then your commented lines should work directly.

For the separate parts, you could mark the lyrics with tags. A simple
alternative is to write out the full \score block for each separate version:

---------- score.ly --------------
\version "2.6.5"
\include "piece.ly"
\score {
    <<
    \new Staff { << \global \firstGuitar >> }
    \lyricsto "GuitarOne" \new Lyrics \firstVerse
    \lyricsto "GuitarOne" \new Lyrics \secondVerse
    \lyricsto "GuitarOne" \new Lyrics \thirdVerse
    \lyricsto "GuitarOne" \new Lyrics \fourthVerse
    \new Staff { << \global \secondGuitar >> }
    >>
}

------- guitar1.ly ------------------
\version "2.6.5"
\include "piece.ly"
\score {
    <<
    \new Staff { << \global \firstGuitar >> }
    \lyricsto "GuitarOne" \new Lyrics \firstVerse
    \lyricsto "GuitarOne" \new Lyrics \secondVerse
    \lyricsto "GuitarOne" \new Lyrics \thirdVerse
    \lyricsto "GuitarOne" \new Lyrics \fourthVerse
    >>
}


However, if you want the lyrics included also in the separate part for
guitar 2, it's a bit more tricky, at least if the rhythm of the second
guitar part does not match the lyrics, since then you don't have anything
in the score that the lyrics could get its rhythm from. I can think of
some more or less ugly hacks to include also guitar one but hide it so
it isn't printed, but maybe someone else on the list have a nice working
solution to propose.

   /Mats

Stephen Torri wrote:

>I am playing around with the tag feature so that I can print out a
>master score for a piece and the individual instrument music. In order
>to follow along on the hymn I want to include the lyrics for all four
>verses in the master score and the individual instrument music. Below is
>the master lilypond file (piece.ly) and a instrument file (guitar1.ly).
>I can print out the master score using score.ly and an instrument using
>guitar1.ly.
>
>Any idea of how to insert the lyrics into the score.ly and guitar1.ly
>respectively"?
>
>Stephen
>
>-------- piece.ly --------
>\version "2.6.5"
>
>global= {
> \time 2/2
>}
>
>\header {
> title = "Let All Mortal Flesh Keep Silence"
> subtitle = \markup \normal-text \italic "The Lord is in his holy
>temple; let all the earth be silent before him. Hab. 2:20"
> arranger = "Arr. by Stephen Torri"
>}
>
>%---------------------------
>%   First guitar (regular)
>%--------------------------
>firstGuitar = \new Voice {
> \set Staff.instrument = \markup {
>...
>  
>

>%---------------------------
>%   Score
>%---------------------------
>music  = {
>    <<
>    \tag #'(score guitar1) \new Staff { << \global \firstGuitar >> }
>    %\lyricsto "GuitarOne" \new Lyrics \firstVerse
>    %\lyricsto "GuitarOne" \new Lyrics \secondVerse
>    %\lyricsto "GuitarOne" \new Lyrics \thirdVerse
>    %\lyricsto "GuitarOne" \new Lyrics \fourthVerse
>    \tag #'(score guitar2) \new Staff { << \global \secondGuitar >> }
>    >>
>}
>
>---------- score.ly --------------
>%%%%%% guitar1.ly
>\version "2.6.5"
>\include "piece.ly"
>
>\score {
> \new StaffGroup \keepWithTag #'score \music
> \layout{}
>}
>
>---------- guitar1.ly ------------
>%%%%%% guitar1.ly
>\version "2.6.5"
>\include "piece.ly"
>
>\score {
> \keepWithTag #'guitar1 \music
> \layout{}
>}
>
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>lilypond-user mailing list
>[hidden email]
>http://lists.gnu.org/mailman/listinfo/lilypond-user
>  
>

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user
Reply | Threaded
Open this post in threaded view
|

Re: example of including lyrics into seperate files

Stephen Torri
On Thu, 2005-12-15 at 11:07 +0100, Mats Bengtsson wrote:
> However, if you want the lyrics included also in the separate part for
> guitar 2, it's a bit more tricky, at least if the rhythm of the second
> guitar part does not match the lyrics, since then you don't have anything
> in the score that the lyrics could get its rhythm from. I can think of
> some more or less ugly hacks to include also guitar one but hide it so
> it isn't printed, but maybe someone else on the list have a nice working
> solution to propose.
>
>    /Mats

I do want the lyrics for guitar 2 but I luck out this time that the
timing is the same but different notes. So I can use the lyrics in
guitar2.ly. Thanks for the information.

Stephen

_______________________________________________
lilypond-user mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-user

signature.asc (196 bytes) Download Attachment