lilypond-user
[Top][All Lists]
Advanced

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

Re: also, lyric help


From: James E. Bailey
Subject: Re: also, lyric help
Date: Tue, 17 Feb 2009 18:26:39 +0100


El 14.02.2009, a las 17:35, Trevor Daniels escribió:


James E. Bailey wrote Wednesday, February 11, 2009 11:38 AM

El 11.02.2009, a las 12:10, Trevor Daniels escribió:

James E. Bailey wrote Wednesday, January 07, 2009 10:28 AM
Am 07.01.2009 um 11:06 schrieb Graham Percival:
On Tue, Jan 06, 2009 at 10:18:02PM +0100, James E. Bailey wrote:

Thanks. I remember seeing that in the choral template, but I never understood that contexts "die" after they're no longer in use. That
explains a lot.

Can I request to the doc team that this be made a bit more explicit in
the documentation section on contexts?

Yes and no.  If you say "could you make this a bit more clear",
then we're going to get pissed off.  If you say "I think the docs
would be more clear if you added a paragraph saying `blah blah
foo' and deleted the sentence that says `to blah blah, you should
bar'", then we'll love you forever.
Okay, then how about what Mats said, since I don't understand it well enough to explain it any better.
"You may have to make sure that the same context survives.
If you do, say,
\new Staff { \new Voice = AAA {c d e f } \new Voice = BBB {g a b c }
  \context Voice = AAA { c1 }
}
the two "AAA" Voices will not be the same context, since the
first one dies after the f. Therefore, any lyrics associated with
the first measure will not continue to be associated with the
third measure."

I finally got around to looking at this, but it turns out
to be not as simple as it might seem.

In Mats' example, voice AAA does *not*, in fact, die, but voice
BBB does, as the following shows:

\new Staff {
 \new Voice = AAA {
   \voiceOneStyle
   c d e f
 }
 \new Voice = BBB {
   \voiceTwoStyle
   g a b c
 }
 \context Voice = AAA { c1 }
 \context Voice = BBB { c1 }
 \context Voice = AAA { c1 }
}

It seems that one voice context in a staff persists in
this way, but the rest die as soon as they have
nothing to do.  Clearly I can't use an example in the
docs of a voice dying when in fact that example demonstrates
the contrary!  It is easy enough to find an example which
does demonstrate the death of contexts, but I have not yet found a way of predicting which voice will persist in all circumstances. I'll raise a discussion on this in -devel
to see if this is intended, an accidental effect or a bug.

In the meantime I'll document how to keep contexts alive.

Trevor

And, how could you keep voice BBB alive? Would that involve some polyphony with voice AAA and spacer rests?

Yes.  You can either add spacer notes directly to the
BBB voice as required to align the real notes correctly
with AAA, or you can add a "keep-alive" block to the BBB
context in parallel, like this:

\new Staff {
 <<
   % keep voice AAA ...
   \new Voice = AAA {
     \voiceOneStyle
     s1*5
   }
   % ... and voice BBB alive for 5 bars ...
   \new Voice = BBB {
     \voiceTwoStyle
     s1*5
   }
   {
     % ... in parallel with the real music
     \context Voice = AAA { c4 d e f }
     \context Voice = BBB { g4 a b c }
     \context Voice = AAA { c1 }
     \context Voice = BBB { c1 }
     \context Voice = AAA { c1 }
   }
 >>
}

While in this example it is not strictly necessary
keep voice AAA alive, keeping both (all) voices alive
is a good habit to cultivate as the voice which persists
by default is difficult to predict.

Trevor

Of course I had to finish engraving a piece of music where I had to have 22 lyrics contexts because I couldn't figure a neat way of keeping the proper voice contexts alive in order to figure out a way to actually keep the voice contexts alive. It was far simpler than I thought.
\version "2.12.2"
dontDie = {
   <<
      \context Voice = AAA { s1*5}
      \context Voice = BBB { s1*5}
   >>
}
music = \transpose c c' {
   \context Voice = AAA {
      \voiceOneStyle
      c4 d e f
   }
   \context Voice = BBB {
      \voiceTwoStyle
      g a b c
   }
   \context Voice = AAA { c1 }
   \context Voice = BBB { c1 }
   \context Voice = AAA { c1 }
}

\score {
   \new Staff <<
      \dontDie
      \music
   >>
}







reply via email to

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