lilypond-user
[Top][All Lists]
Advanced

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

Re: Newly defined Voice context and RemoveEmptyStaffContext


From: Roman Stawski
Subject: Re: Newly defined Voice context and RemoveEmptyStaffContext
Date: Mon, 24 Nov 2008 12:05:55 +0100

At 13:59 22/11/2008, Mats Bengtsson wrote:
See the "Known issues and warnings" of section 5.1.4 "Changing default context settings" in the Notation Reference.
If you really want to understand what happens, it may also help
to look at the definition of \RemoveEmptyStaffContext in the
file ly/engraver-init.ly.

  /Mats

Magic /Mats! I hadn't noticed that paragraph. Changing the order of
context declaration makes things much better. And ly/engraver-init.ly
is certainly interesting and answers my second question.

Nevertheless, I still have a problem. Nothing to do with
\RemoveEmptyStaffContext though. When I use my new 'MainVoice' in
parallel with another voice, and attach some lyrics to it, I lose the
first syllable of the lyrics. If I use a standard Voice, then lyric
alignment works fine. If I comment out the parallel Voice, alignment
works correctly too.

Does anyone on the list have the reference to the correct section in
the documentation (I didn't find anything, not that that means
anything) or any other ideas? Thanks in advance.

- - - - [Start]
\version "2.11.60"
\layout { ragged-right = ##t }

\layout {
  \context {
    \Voice
    \name MainVoice
    \alias Voice
  }
  \context {
    \Staff
    \accepts "MainVoice"
  }
}

tx = \lyricmode   { Foo bar }
va = \relative c' { c2 e2 }
vb = \relative c' { c2 c2 }

\score {
  <<
    \new Staff {
      <<
      % Either
\new MainVoice = "t" { \voiceOne \va } % First note not used for lyrics
      % or
      % \new Voice = "t"     { \voiceOne \va } % First note used for lyrics ok
      %
         \\ \new Voice        { \voiceTwo \vb }
      >>
    }
    \new Lyrics { \lyricsto "t" \tx }
  >>
}
- - - - [End]

Regards

Roman





reply via email to

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