bug-lilypond
[Top][All Lists]
Advanced

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

Re: SystemStart changes after stop/startStaff - how to get it back


From: Thomas Morley
Subject: Re: SystemStart changes after stop/startStaff - how to get it back
Date: Sun, 12 Apr 2020 16:34:23 +0200

Am So., 12. Apr. 2020 um 15:39 Uhr schrieb Thomas Morley
<address@hidden>:
>
> Am So., 12. Apr. 2020 um 14:00 Uhr schrieb Aaron Hill
> <address@hidden>:
> >
> > On 2020-04-12 3:50 am, Thomas Morley wrote:
> > > Hi,
> > >
> > > consider the following code:
> > >
> > >
> > > mus = \new Staff { R1 \break R \stopStaff s \startStaff R \break R
> > > \break R }
> > >
> > > \new StaffGroup
> > >   \with {
> > >       systemStartDelimiterHierarchy =
> > >         #'(SystemStartBracket (SystemStartBrace a b c))
> > >   }
> > >   << \mus \mus \mus >>
> > >
> > >
> > > The SystemStartBrace vanishes after stop/startStaff.
> > > I'm at a loss here, it does not work out of the box for every version
> > > from 2.12.3 up to master.
> > >
> > > Any chance to get the additional SystemStartBrace back?
> >
> > Yes, but it might have side-effects:
> >
> > %%%%
> > systemStartDelimiterHierarchy =
> >    #'(SystemStartBracket
> >        (SystemStartBrace a b c)
> >        (SystemStartBrace a b c))
> > %%%%
> >
> > Since \stopStaff and \startStaff create new StaffSymbols, it appears the
> > System_start_delimiter_engraver thinks that these are extra staves in
> > parallel, so your hierarchy says to do this:
> >
> >     ( / =====
> >     < | =====
> >     ( | =====
> >       | =====
> >       | =====
> >       \ =====
> >
> > Of course, the StaffSymbols never appear at the same time, because they
> > are meant to be replacements.  But the SystemStartBrace only spans the
> > first three staves, so it does not apply in the latter part of the
> > score.
> >
> > Knowing that a duplicate set of staves will appear at some point, you
> > can lie about the hierarchy as my hack above does.  This allows the
> > second set of StaffSymbols to be grouped as desired.
> >
> > Ultimately, System_start_delimiter_engraver needs to be watching for
> > \stopStaff and \startStaff events so it can clean up and rebuild its
> > StaffSymbol collection rather than just append to the existing one.
> >
> >
> > -- Aaron Hill
>
> Hi Valentin, Aaron,
>
> many thanks for your insights and hints.
> I'll play around with it. Ofcourse my actual usecase is far more
> complex than the minimal above...
>
> Any thoughts for
> http://lilypond.1069038.n5.nabble.com/Setting-SystemStartBracket-style-to-brace-failing-td231524.html
> as well?
> This is another showstopper...
>
>
> Best,
>   Harm

I've found
        systemStartDelimiterHierarchy =
          #`(SystemStartBracket (SystemStartSquare ,@(iota 100)))
working as well and better serving my needs. 100 may be excessive, though ...

Some background:
It is not possible in LilyPond to interrupt a container-context like
StaffGroup, ChoirStaff etc and have them continued in the same line,
with fresh SystemStart-grobs (SystemStartBar/Bracket/Brace/Square).

Alas, it's frequently used in printed editions.
Thus several workarounds are available, but all I know need some
manual try and error moving of grobs.
Over the last decades I tried again and again to find a better
workaround, with less manual work.
One of them Pierre wants me to put in LSR.
http://lilypond.1069038.n5.nabble.com/Coda-split-staff-td231462.html
Though, I still find it far too hackish and there's still the need for
manual adjustments.
Thus I gave it another try in the past days.

I now come up with the attached.
To get the gaps in container-contexts one would need to drop the
relevant commands. No manual figuring out any values (apart from the
width of the gap).
It compiles with all version from 2.12.3 (therefore the ancient
syntax) up to current master.
Alas,
http://lilypond.1069038.n5.nabble.com/Setting-SystemStartBracket-style-to-brace-failing-td231524.html
is the current show-stopper. (Currently I switch to bracket for newer versions.)
This bug is introduced somewhere in early 2.13.x
I'll continue research after some break ;)

Cheers,
  Harm

Attachment: mid-staff-gap.ly
Description: Text Data

Attachment: mid-staff-gap-2-12-3.pdf
Description: Adobe PDF document

Attachment: mid-staff-gap-2-20-0.pdf
Description: Adobe PDF document


reply via email to

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