lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lyrics and Repeats


From: Kaj Persson
Subject: Re: Lyrics and Repeats
Date: Tue, 18 May 2021 23:20:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0

YES!  YES!  YES!

Thank you Carl. This was exactly the solution I have been searching for. Now I must (a bit ashamed) admit that I have never heard of that function/context Devnull and neither the functions skip-of-length or mmrest-of-length. Devnull isn't even mentioned in Notary Reference, but the other two are. I thought I had read this manual from cover to cover, but obviously there are still material to learn. In fact I in my mind was thinking of a need for just this, and even was pondering on how to create one. A luck that I did not come to action...

Well, now I think I can sleep soundly the whole night, and wake up in a fresh mode tomorrow and take care of the job with "my" piece of music.

Thank you Carl!

/Kaj


On 2021-05-18 20:39, Carl Sorensen wrote:
Kaj,

This is how I approach your problem.  It uses Devnull contexts to space the 
lyrics, and it makes use of the skip-of-length function to provide skips in the 
Devnull contexts.

With this method, you have to make some more variables and contexts, but you 
never need to count notes to or put skips in your lyrics.

HTH,

Carl

\version "2.20.0"
ta = \lyricmode {
    Not re -- peat -- ed.
  }
   tb = \lyricmode {
   The first time words.
   an -- oth -- er bar
   a sec -- ond bar
   the fi -- nal bar
   }
   tc = \lyricmode {
    Sec -- ond time words.
   }
   ty = \lyricmode {
     The alt two words
   }
   tz = \lyricmode {
     con -- tin -- ue on
      }
firstMus = \relative {a'4 a a a}
  voltaMus = \relative {b'4 b b b}
  altOne = \relative {c'4 c c c | c c c c | c c c c}
  altTwo = \relative {d'4 d d d}
  lastMus = \relative {e'4 e e e}

   \score {
     <<
       \new Staff {
         <<
         \new Voice = "melody" {
           \firstMus
             \repeat volta 2 \voltaMus
             \alternative {
               {\altOne }
               {\altTwo}
             }
            \lastMus
           }
\new Devnull = "mainlyrics" {
           \firstMus
           \voltaMus
           \altOne
           #(skip-of-length altTwo)
           \lastMus
         }

         \new Devnull = "extralyrics" {
           #(skip-of-length firstMus)
           \voltaMus
           #(skip-of-length altOne)
           \altTwo
         }
         >>
       }

       \new Lyrics="main" \lyricsto "mainlyrics" {
         \ta
         \tb
         \tz
       }
\new Lyrics="alts"\lyricsto "extralyrics"{
         \tc
         \ty
       }
         >>
   }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]