lilypond-user
[Top][All Lists]
Advanced

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

Re: \stopStaff \startStaff bug


From: Jean Abou Samra
Subject: Re: \stopStaff \startStaff bug
Date: Sat, 7 Jan 2023 14:27:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

Le 06/01/2023 à 00:37, Lukas-Fabian Moser a écrit :
The Staff_symbol_engraver is not really equipped to deal with multiple \startStaff / \stopStaff events at the same point of time.



I would not call the current Staff_symbol_engraver behavior a bug,
but a feature.

You will see that your engraver prevents this from working:

{
  c'1
  \stopStaff
  \once \override Staff.StaffSymbol.color = "red"
  \startStaff
  c'1
}

Ok, this one could be handled by restarting the current staff symbol,
if any, when "\startStaff count = \stopStaff count", instead of keeping
the current one. Now, what about

redStaff = {
  \stopStaff
  \once \override Staff.StaffSymbol.color = "red"
  \startStaff
}

{
  c'1
  \redStaff
  c'
  \stopStaff
  c'1
  \redStaff
  c'1
}


The current, debatable but sometimes useful behavior is that the
\redStaff is enough to start a new staff symbol while there is none.
With your engraver, an extra \startStaff is needed at that point.

There is no simple silver bullet for conflicting events at the
same moment.

It sometimes makes me wonder if we need a concept of "infinitesimal
time", to allow disambiguating

<<
  %% Stop the current one and start a new one, or start a new one
  %% and end it immediately?
  { ... \startStaff ... }
  { ... \stopStaff  ... }
>>

by writing something like

<<
  { ... \startStaff \dt             ... }
  { ...             \dt \stopStaff  ... }
>>

or

<<
  { ...            \dt \startStaff  ... }
  { ... \stopStaff \dt              ... }
>>

but this is very handwaving and how to make it usable
and map it to sane internals is pretty unclear to me.

Best,
Jean

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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