Le 06/11/2021 à 14:47, Kieren MacMillan a écrit :
[...] Is there some gain to be had by considering the three related concepts — “context pushing”, cross-staff items, and part-combining — together, to see where a single mechanism might help all three? Put another (OOP-ish) way: Are cross-staffing and part-combining instances of a context-pushing class?
Almost, but not quite. Having separate contexts is inflexible because you cannot link them in other ways, e.g., you cannot have a slur crossing two Voices. While this is hampering the part combiner, I am not sure "pushing to contexts" will help in that case: the problem is really "merging" stuff (like making one note column for notes from the two or, let's hope, n parts). The vague idea I had in mind was the capability of stopping and starting engravers midway in the course of the lifetime of a context. An a due passage would be handled by stopping the Stem_engravers, etc. in Voice and starting one in a higher context encompassing the two or n Voices. That may in turn help for cross-staff, but that other problem also requires more thought with respect to the context hierarchy (contexts with several parents? what can we invent?).
That was my [totally naïve] instinct, too (cf. https://lists.gnu.org/archive/html/lilypond-user/2021-10/msg00436.html). I look forward to seeing where this discussion leads!
By all means help if you can, but don't hold your breathe for it. All of what I say here remains totally sketchy and handwaving for the time being, and may turn out to be entirely ill-advised or irrelevant. I'll be happy if people start experimenting. The energy that I can personally dedicate to LilyPond is currently absorbed by trying to understand purity and to refactor unpure/pure containers, so I won't be working on this domain anytime soon. Best, Jean