[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grob creation

From: Han-Wen Nienhuys
Subject: grob creation
Date: Thu, 4 Jul 2002 16:47:57 +0200

address@hidden writes:
> Still struggling with the accidental engraver.
> I still quite haven't understood the idea of the different functions in the 
> engravers.
> I tried moving all the code from "process_asknowledged_grobs" (or whatever 
> name 
> the function is changed to) to "stop_translation_timestep" - and (no 
> surprise) 
> it seems to be working.
> The question is: Is it "bad" to create the grobs not until "stop translation 
> timestep" - will this cause other sophisticated problems in other parts of 
> lily?
> Why is it that "process acked grobs" are called so many times instead of just 
> one time after the processing of all grobs (i am talking about the loop in 
> engraver_group_engraver)?

because the result of an acknowledged grob may be a new grob. That new
grob must be acked, and the result may be another grob. The cycle is
continued until no new grobs are created.  (example: Note head leads
to stem. Stem leads to beam.)  The accidental engraver is hard in the
sense that it must know about the absence of some grob types (eg.
tie), and there is no mechanism that will tell "there will be no Ties
created in this time-step.".

If you postpone announcing the grob, no engraver will notice it in the
same time step, and it will be noticed in the next (incorrect) time
step.  ATM, no engravers acknowledge accidental-interface, your
approach will work.

It would be technically more correct to make an accidental if there is
reason, and kill it off later when it is not needed, but that might
lead to excessive grob creation.  In any event, the special behavior
of the acc-engraver should be thoroughly documented, as it will always
be special.

Han-Wen Nienhuys   |   address@hidden    |

reply via email to

[Prev in Thread] Current Thread [Next in Thread]