I feel like I needed it ten years ago ;)

On Tue 27 Dec 2022, 23:25 Jean Abou Samra, <j...@abou-samra.fr> wrote:

> Le 26/12/2022 à 19:18, Gregory Evans a écrit :
> > Hi Jean,
> > I apologize for my delayed reply.
> >
> > I do not think I can use the VoiceFollower grob because I am not using
> > staff changes.
>
>
>
> You can. A VoiceFollower won't be created automatically without a staff
> change, but you can create it yourself in your Scheme engraver.
>
>
>
> > Attached is a pdf of what I am trying to do. It works successfully if
> > I input the y-position by hand but ideally it would be calculated
> > automatically. You see, they are completely unrelated voices. Also see
> > this image of hocket indications in Ben Johnston's 3rd string quartet
> > which I think would not be done with VoiceFollower:
> >
> >  I have also included the lilypond file for my interruptive polyphony
> > example if that is of any use to you even though it is quite large.
> > While it's true that certain aspects of the process could be
> > simplified (such as removing the use of 'meta as you suggest), there
> > is little reason to revise it if the callback cannot be delayed until
> > after the skyline calculation. Is there no way to simply trigger
> > callback at a later time?
>
>
> "Trigger callback at a later time" sounds like you are thinking
> too much in imperative programming terms of "get parameters, set
> stencil to what I want". That's not how most of LilyPond's backend
> works, with the exception of after-line-breaking and a few other
> properties. Instead, you build callbacks that compute the initial
> values of properties (instead of getting their values and changing
> them). See also this recent discussion:
>
> https://lists.gnu.org/archive/html/lilypond-user/2022-12/msg00001.html
>
> Thus, the question is not "how to trigger this callback at a later
> time, so it knows everything" but "how to ensure that nothing this
> callback depends on also depends on it, so there are no cyclic
> dependencies". The answer is the cross-staff property, as I explained
> previously, on a grob that supports it like VoiceFollower (but
> not NoteHead).
>
> See the attached file for an implementation of your graphical
> notation. I basically started from scratch because it was simpler,
> so its exact behavior might deviate from what you wanted (there
> were some oddities in your original code and I don't know which
> of them were intentional), but it outputs the same thing on the
> excerpt you give, and it should get you going.
>
> By the way, not sure if you or Piaras is the author of the PostScript
> code, but if you are, please read the documentation of \postscript
> <https://lilypond.org/doc/v2.24/Documentation/notation/graphic>
> on why you should only use embedded PostScript code if you absolutely
> need it, which is not the case here (make-path-stencil does the job).
>
> Best,
> Jean
>
>

Reply via email to