bug-lilypond
[Top][All Lists]
Advanced

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

Re: no space after key signature unless time signature


From: Paul Scott
Subject: Re: no space after key signature unless time signature
Date: Wed, 18 Feb 2004 12:40:47 -0700
User-agent: Mozilla Thunderbird 0.5 (X11/20040209)

Mats Bengtsson wrote:



Paul Scott wrote:

Mats Bengtsson wrote:

The original problem turned out to be that you had a separate
line of "music" containing time signatures and bar lines that
ended up in a separate Staff context.



I thought that Han-Wen changed \skip to fix that.

A simple solution to that
is to explicitly include this line of "music" in an existing Staff
context. In your original example from
http://mail.gnu.org/archive/html/bug-lilypond/2004-01/msg00260.html
you could for example do the following change:

 \score {
-    <<
+    \context Staff = flute <<
         \dyxxvicom
         \property Score.skipBars = ##t
         \property Score.MultiMeasureRest \override #'expand-limit = #1
\property Score.MultiMeasureRestNumber \override #'padding = #0
         \property Score.DynamicLineSpanner \override #'padding = #1.0
-        \context Staff = flute { \cli }
+         { \cli }
     >>
-    \paper { \translator { \RemoveEmptyStaffContext } }
+%    \paper { \translator { \RemoveEmptyStaffContext } }
 }



I will try that soon.

I don't fully understand how these contexts work. Is there somewhere in the manual I can read to understand this better?


What happens here is very simple: If LilyPond encounters something
that has to occur within a Staff context, for example, it creates
one. When you then create your own Staff with \context Staff = flute,
you get a second one.
In your original example, you had spacer notes in your \dyxxvicom and
spacer notes need a Staff context. Han-Wen changed such that a \skip
could be used without any Staff context which means that no new Staff
context is created. I just tried your example in version 2.1.24 and it
works well with \skip (and without moving the \dyxxvicom into the flute
Staff context). You can easily check it yourself if you don't use the
\RemoveEmptyStaffContext. As soon as you replace a \skip by an 's', you
will get an additional stave printed in your score.

Another question is why this additional stave destroys the spacing
calculations, but that's beyond my comprehension at the moment.



Thanks.  Using:
\score
   \context Staff <<
      \global
      { \part }
   >>
}

for a part and
\score
   \context StaffGroup <<
      \global
      \new Staff { \part1 }
      \new Staff { \part2 }
   >>
}

for similar parts seems to work (key signature spacing is good). I will now see what happens if I go back to 's' in the global block.

Thanks again,

Paul








reply via email to

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