StaffSymbol stops short of end-of-\score TimeSignature or KeySignature

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

StaffSymbol stops short of end-of-\score TimeSignature or KeySignature

Daniel Rosen
The following example shows two movements of a work which are to be performed without pause (imagine an "attacca" instruction at the end of the first \score block). My question: how can I get the StaffSymbol to continue through the 4/4 marking at the end of the first \score (and through the key change at the end of the second), as it does through the 2/4 at the end of the line above?

This question is very similar to the one Harm responding to in this post from a couple of months ago: https://lists.gnu.org/archive/html/lilypond-user/2020-01/msg00541.html However, when his solution is applied here the results are still not quite right: when everything in my example is uncommented, the cautionary TimeSignatures are no longer vertically aligned because the 4/4 is pushed slightly to the left, there's a little too much space between the right edge of the TimeSignature and the end of the StaffSymbol, and the StaffSymbol itself stops just short of the right margin (I can't figure out a way to draw a vertical line that will show this latter point more clearly, but if you print it out and use a straight edge it'll be very apparent).

%% Example begins
\version "2.20.0"

music = \repeat unfold 36 b'4

\book {
  \paper { print-all-headers = ##t }

  \score {
    \header { title = "I" }
    {
      %\override Staff.StaffSymbol.break-align-symbols =
      %#'(time-signature key-cancellation key-signature staff-bar break-alignment)
      \numericTimeSignature \time 3/4
      \music \time 2/4 \break
      \music \bar "||"
      %\tweak X-extent #'(0.25 . 2.4)
      \time 4/4
    }
  }

  \score {
    \header { title = "II" }
    { \numericTimeSignature \music \key b \major }
  }

}
%% Example ends
       
DR



Reply | Threaded
Open this post in threaded view
|

Re: StaffSymbol stops short of end-of-\score TimeSignature or KeySignature

Noeck
> My question: how can I get the StaffSymbol to continue through the 4/4 marking at the end of the first \score (and through the key change at the end of the second), as it does through the 2/4 at the end of the line above?

You could add an invisible spacer rest in both cases:
  \time 4/4 s
and
  \key b \major s }

Would that be a solution for you or just in the example?

Joram

Reply | Threaded
Open this post in threaded view
|

RE: StaffSymbol stops short of end-of-\score TimeSignature or KeySignature

Daniel Rosen
> -----Original Message-----
> From: Noeck [mailto:[hidden email]]
> Sent: Friday, March 20, 2020 6:33 PM
> To: [hidden email]
> Subject: Re: StaffSymbol stops short of end-of-\score TimeSignature or
> KeySignature
>
> You could add an invisible spacer rest in both cases:
>   \time 4/4 s
> and
>   \key b \major s }
>
> Would that be a solution for you or just in the example?

That does fix the issue with the StaffSymbol ending too far left. I've also been able to adjust the \tweak X-extent value manually to imitate the default spacing, so my issue is solved for now. However, for this solution to work X-extent value has to change depending on the width of the grob—so \tweak X-extent #'(0 . 2.1) works for 4/4, but not for 12/8, and certainly not for a five-sharp KeySignature. It'd be great if there were another way to do it that wasn't so kludgy.