[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with Scheme engraver please
From: |
David Kastrup |
Subject: |
Re: Help with Scheme engraver please |
Date: |
Wed, 24 Aug 2016 08:48:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
"Trevor Daniels" <address@hidden> 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.
--
David Kastrup