Issues: #1302
Issues: #2305
Issues: #24
Issues: #25
Issues: #256
Issues: #3139
Issues: #3391
Issues: #34
Issues: #3693
Issues: #385
Issues: #4144
Issues: #630
Issues: #70
Originally posted by: colingh...@gmail.com
A recent post to bug-lilypond by Štěpán Němec here:
entitled "Second staff beginning with an acciaccatura defeats "\override Staff.Timsignature" which showed the well-known problem of starting with a grace note:
That post led to very concise presentation of the standard workaround from Reinhold Kainhofer here:
Last edit: Simon Albrecht 2015-09-14
Originally posted by: dak@gnu.org
Ok, let me try another solution sketch here. Inside of sequential music, we have grace fixups that shorten any music of non-zero duration followed by an arbitrary number of music with zero duration followed by a music with a non-zero grace duration by the specified grace duration, so that all the music with zero duration (like overrides etc) after it are executed at a point of time _before_ their nominal point of time.
Basically, we need a grace fixup for simultaneous music as well that, in the presence of a graceful start time in the next event, sucks forward all zero-length music in parallel music to occur at the same graceful start time.
Now here is the rub: in sequential music, the order in the music _supports_ the contention that overrides etc occuring before a grace phrase should be executed _before_ the grace phrase, namely in sequence.
In simultaneous music, we have no such indication. As an extreme example, if we have
<<
\new Staff { \grace { e'8 } g'1 }
\new Staff { \once\override NoteHead.color #red c'1 }
>>
we don't want the \once\override to be over before it has had a chance to affect c'1. On the other hand, for
<< \new Staff { \grace { e'8 } g'1 }
\new Staff { \once\set Staff.instrumentName = "Fagott" c'1 }
>>
we don't want to have the instrumentName setting delayed until it can no longer affect the staff.
So \once has to become more complex, with the _onset_ obeying simultaneous grace fixups, but the revert coming on time.
The reversal of \once is an obvious candidate where we don't want a simultaneous grace fixup to occur. It can probably be dealt with with a variation on the finalization hook procedure being told the expected time of delivery, just requeueing when it is too early yet.
I consider it unlikely that this is the only problem though. Something like c1*0 is a zero-length event. Nobody complained so far about the output of, say,
{ c'1 g'8*0 \acciaccatura { e'8 f' } c''1 }
but I'm not sure everything else will be similarly good-natured.
For something like
<<
\new Staff { c'1 \time 3/4 \acciaccatura { e'8 f' } c''2. }
\new Staff { c'1 \time 3/4 c''2. }
>>
we probably want grace adjustment.
And even a separate timing track like
<<
\new Staff { c'1 \acciaccatura { e'8 f' } c''2. }
\new Staff { c'1 c''2. }
\new Devnull { s1 \time 3/4 s2. }
>>
would arguably benefit from grace adjustment. But will it be for every case?
There's a snippet in LSR
http://lsr.di.unimi.it/LSR/Item?id=978
trying to provide a woraround.
How do you think about it? Worth tagging docs or even point to it in NR?
Personally, I think it's too complicated to put in the documentation.