Re: can a Scheme engraver "solve" Issue #34 (grace note bug)? [cross-posted]

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

Re: can a Scheme engraver "solve" Issue #34 (grace note bug)? [cross-posted]

David Kastrup
Kieren MacMillan <[hidden email]> writes:

> Hi all,
> Here’s the brainstorm I’ve currently got going:
> Issue #34, a.k.a. the grace note bug, is one of Lilypond’s
> longest-standing and most newbie-unfriendly issues. It doesn’t appear
> in single-staff scores, obviously — only in multi-staff scores where
> one staff has a grace note [in the note code] and one or more other
> staves don’t.
> So…
> Can Someone™ write a Scheme engraver that listens for grace events and
> automagically adds grace skips of equal duration at the same moment in
> all other staves of a given score? *Intuitively*, \consist-ing that
> engraver into a score sounds to me like the perfect (Band-Aid™?)
> solution, modulo what is apparently a very difficult and/or
> time-consuming recoding of some deep fundamentals in Lilypond’s timing
> codebase.
> Let me know if I’m just talking nonsense.
> If not, let me know how I can help make this "fix" a reality.

Well, the problem is that there is no "grace event" but a grace iterator.
Now this this characterization is not entirely true any more since

commit 99a85ca39f3a7a6f717ba06a48ef0ba70f842177
Author: David Kastrup <[hidden email]>
Date:   Wed Oct 1 19:39:08 2014 +0200

    Issue 630/4: Let Grace_engraver react mostly to GraceChange events
    When GraceChange events are not available, this reverts to grace processing
    at initialization or at the engraver's process_music call.

which is used for the fine-grained synchronisation required for having

\override ... \grace { \override ...

decide in which order to execute overrides that have different
consequences in the \grace construct in spite of being executed at the
same "musical time" as the overrides outside.  However, those
GraceChange events are not likely amenable for fixing issue 34, in
particular since the case alluded to in the commit message where they
are not yet operative is _exactly_ the issue 34 case.

Basically what I think is needed is the Sequential_iterator having a
means of conveying information about its grace_fixup structures to the
Simultaneous_iterator.  The various approaches I have experimented with
occasionally over the years have not worked for that, sometimes without
me able to understand why.

David Kastrup

Reply | Threaded
Open this post in threaded view

Re: can a Scheme engraver "solve" Issue #34 (grace note bug)? [cross-posted]

Kieren MacMillan
Hi David,

> my own take on what that means would not have been to abolish
> grace time: it's still useful for identifying things.  But rather to
> reduce NoteColumn/MusicalColumn sharing/alignment during grace time to
> being just per-Staff, or possibly as option per-Voice.  That would
> allow, for special cases, to still blow it up back to being per Score.

I agree that would be optimal.


Kieren MacMillan, composer (he/him/his)
‣ website:
‣ email: [hidden email]