lilypond-user
[Top][All Lists]
Advanced

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

Re: How to set lyrics to temporarily divided parts


From: Mats Bengtsson
Subject: Re: How to set lyrics to temporarily divided parts
Date: Tue, 11 Jan 2005 15:51:03 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913



Kilian A. Foth wrote:
Ferenc Wagner writes:

 > > \score {
 > >   <<  \context Voice = "melody" { \relative c' { c c c c | c } }
 > >       \new Lyrics \lyricsto "melody" { we shall o- ver- come } >> }
> > > > \score {
 > >   <<  \context Voice = "melody" { \relative c' { c c8 e c4 c | c } }
 > >       \new Lyrics \lyricsto "melody" { we shall not o- ver- come } >> }
 > >
 > > \score {
> > << \context Voice = "melody" { > > \relative c' { c > > << {\voiceOne c8 e} \\ {\voiceTwo c4} >> > > \oneVoice c4 c | c > > } > > } > > \new Lyrics \lyricsto "melody" { we o- ver- come } > > \new Lyrics \lyricsto "1" { shall not } > > \new Lyrics \lyricsto "2" { shall } > > >>
 > > }

 > >
 > > The third score correctly combines the first two (although the split
 > > lyrics are typeset one line too low). But that trick only works once
 > > for a part -- the next assignment to "1" would put yet another line of
 > > lyrics under the same split note, rather than the next one. Can notes
 > > and text be associated closer somehow to avoid this?
> > \new Lyrics creates a new lyrics context (ie. a fresh and
 > independent line of lyrics); what you want is putting more
 > words into the *same* context (line) you already created.

Yes, apparently I need to, but I can't figure out how to do it! Do you
know a way to put alternative lyrics into the same context, so that in
the example both `shall' and `shall not' are aligned with the second
note?

That's trivial. If you give a name to a context, it is uniquely
identified by its name, so you can do

 \context Lyrics = mainlyrics \lyricsto "melody" { we o- ver- come }
 \context Lyrics =mainlyrics \lyricsto "1" { shall not }
 \new Lyrics \lyricsto "2" { shall }

However, a simpler solution is to avoid to keep the original
Voice context for the upper music line when the music splits
into two voices. This is easiest done by not using the
<<{...} \\ {...}>> feature (untested):
\score{
<<
\context Voice = "melody" {
     \relative c' { c
       << {\voiceOne c8 e} \context Voice = splitpart {\voiceTwo c4} >>
      \oneVoice c4 c | c
      }
   }
\new Lyrics \lyricsto "melody" { we shall not o- ver- come }
\new Lyrics \lyricsto "splitpart" { shall }
>>
}

   /Mats




 > Since "2" is a short lived voice context, I'm not sure if it
 > will just work.  As a side note, I found it more natural not
 > to use the implicit voice creation syntax, but explicitly
 > name contexts (and possible keep them alive) by the other
 > method illustrated in the referred article.





--
=============================================
        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: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================




reply via email to

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