bug-lilypond
[Top][All Lists]
Advanced

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

Re: Temporary staff too long when grace notes are in the permanent staff


From: David Kastrup
Subject: Re: Temporary staff too long when grace notes are in the permanent staff
Date: Tue, 05 Apr 2022 01:04:47 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Knute Snortum <ksnortum@gmail.com> writes:

> If I have a temporary staff, like an ossia, and if the next notes in
> the permanent staff after a \stopStaff are grace notes, the temporary
> staff extends too long, over the grace notes.  Here is a MWE and
> picture attached:
>
> %%%
> \version "2.23.7"
>
> rightHand = \relative {
>   d''4 d8 b \grace { c,8[ d f] } b4 r |
> }
>
> ossia = \relative {
>   \stopStaff s4 \startStaff d''16 c b8 \stopStaff s2 |
> }
>
> <<
>   \new Staff \with {
>     \remove "Time_signature_engraver"
>     \hide Clef
>     \hide KeySignature
>     \magnifyStaff #2/3
>   } {
>     \ossia
>   }
>   \new Staff \rightHand
>>>
> %%%
>
> Seems like a bug, or at least an "ugly."

I see absolutely nothing that would suggest that LilyPond doesn't
exactly engrave what you are asking for here.  No bug, no ugly.

> Is there any work-around?

Not a workaround but correct input: you want to stop the staff 3 eighths
of grace notes before the next beat, so your ossia needs to stop _then_:

%%%
\version "2.23.7"

rightHand = \relative {
  d''4 d8 b \grace { c,8[ d f] } b4 r |
}

ossia = \relative {
  \stopStaff s4 \startStaff d''16 c b8 \stopStaff \grace s4. s2 |
}

<<
  \new Staff \with {
    \remove "Time_signature_engraver"
    \hide Clef
    \hide KeySignature
    \magnifyStaff #2/3
  } {
    \ossia
  }
  \new Staff \rightHand
>>
%%%
Now that \stopStaff is placed at the time where you actually want to
have the staff end, that's exactly where the staff _does_ end.

And what you see now in terms of stems deserves the title "bug, or at
least ugly".

But at least the staff length is what you want, and you tell LilyPond
properly about it.  So you get to complain about the real bug instead...

-- 
David Kastrup

reply via email to

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