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: Aaron Hill
Subject: Re: SystemStart changes after stop/startStaff - how to get it back
Date: Sun, 12 Apr 2020 04:59:29 -0700
User-agent: Roundcube Webmail/1.4.2

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



reply via email to

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