Hi Trevor,
On 24.08.2016 11:51, Trevor Daniels wrote:
David Kastrup wrote Wednesday, August 24, 2016 7:48 AM
"Trevor Daniels"<t.dani...@treda.co.uk> writes:
Prompted by the recent discussion on lute tablature, I tried coding a
Scheme engraver to create the duration grobs but quickly ran into a
problem. I need to collect information from both a Listener and an
Acknowledger so the obvious place to build the grob is in
stop-translator-timestep,
No, no, no. stop-translator-timestep really is only for cleanup work.
Stuff is no longer in working order then. You want process-acknowledged
here I think.
There will always be a call to process-acknowledged whenever grobs have
been created, and_reading_ stuff from grobs should be delayed until
then since other acknowledgers might_write_ stuff into a grob even
after your personal acknowledger has been called. So the basic workflow
is to use the various acknowledgers to_record_ the grobs you are
interested in and_write_ stuff into them (or do read/write stuff that
more or less is accumulative and/or really unrelated to other
engravers), and then use the process-acknowledged hook for processing
(including_reading_) the grobs you had recorded.
You can create new grobs in process-acknowledged. That will lead to a
new cycle of acknowledger calls followed by process-acknowledged. Only
when all those cycles are over is stop-translator-timestep called, and
then creating grobs is no longer an option.
Thanks David. That's beautifully clear.
I just caught up with all the mailing lists, being back from holiday,
and I’d be interested in a working example for this solution. Would you
mind sharing it?
Best, Simon
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel