Basic grace echo purger: Difference between revisions

Revise; also make it work for metronome marks at the very beginning
mNo edit summary
 
Line 1: Line 1:
One subtype of the infamous [https://gitlab.com/lilypond/lilypond/-/issues/34 grace synchronisation issue #34] is the ‘grace echo’: if a score-wide collected event comes from at least one voice ‘in time’, while from one or more other voices it comes ‘after the grace notes, which do not exist in this/these voice(s)’, the resulting grob gets created multiple times.
One subtype of the infamous {{Issue|34|grace synchronisation Issue}} is the ‘grace echo’: if a score-wide collected event comes from at least one voice ‘in time’, while from one or more other voices it comes ‘after the grace notes, which do not exist in this/these voice(s)’, the resulting grob gets created multiple times.


For metronome marks, bar lines, and time signatures a very simple workaround is to delete these echoed grobs, which the engraver in this snippet does.  Bar lines and time signatures are checked also for equality and only removed by this engraver if they are identical.  Additionally, by setting the grob property <code>keep-grace-echo</code> to <code>#t</code>, you can inhibit this grob removal to obtain special output.
For metronome marks, bar lines, and time signatures a very simple workaround is to delete these echoed grobs, which the engraver in this snippet does.  Bar lines and time signatures are checked also for equality and only removed by this engraver if they are identical.  Additionally, by setting the grob property <code>keep-grace-echo</code> to <code>#t</code>, you can inhibit this grob removal to obtain special output.