lilypond-user
[Top][All Lists]
Advanced

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

Re: Part of staff does not obey alignAboveContext


From: David Kastrup
Subject: Re: Part of staff does not obey alignAboveContext
Date: Sat, 09 Jul 2022 13:08:31 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Davide Liessi <davide.liessi@gmail.com> writes:

> Dear all,
>
> in the second example below, the second part of the ossia staff jumps
> below the main staff.
> Am I doing something wrong or is it a bug in LilyPond?
>
> Best wishes.
> Davide
>
> %%%%%
>
> \version "2.23.4"
>
> \score {
>   \new Staff = "main" <<
>     \new Voice {
>       <<
>         { a'8 }
>         \new Staff = "ossia"
>         \with { alignAboveContext = "main" }
>         { a'8 \stopStaff }
>       >>
>       a'8 a'8 a'8 a'2
>       <<
>         { a'1 }
>         \context Staff = "ossia"
>         { \startStaff a'1 }
>       >>
>     }
>   >>
> }
>
> \score {
>   \new Staff = "main" <<
>     \new Voice {
>       <<
>         { a'8 a'8 }
>         \new Staff = "ossia"
>         \with { alignAboveContext = "main" }
>         { a'4 \stopStaff }
>       >>
>       a'8 a'8 a'2
>       <<
>         { a'1 }
>         \context Staff = "ossia"
>         { \startStaff a'1 }
>       >>
>     }
>   >>
> }

There is no "second part of the ossia staff" in the second example:
there is a second, independent ossia staff.  The $1000 question actually
is how your first score manages to have the ossia staff survive long
enough to have the second invocation find it still existent.

And the answer appears to be that the Auto_beam_engraver keeps it alive
for some reason: if you write { a'8\noBeam \stopStaff } instead of
{ a'8 \stopStaff } as the body of the first ossia Staff, it gets
detached from the second ossia staff just like in your second example.

Whether this constitutes a bug, I am not really sure.  It definitely
constitutes a curiosity.

-- 
David Kastrup



reply via email to

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