10.12.1 Useful methods for information processing

An engraver inherits the following public methods from the Translator base class, which can be used to process listened events and acknowledged grobs:

These methods are listed in order of translation time, with initialize () and finalize () bookending the whole process. initialize () can be used for one-time initialization of context properties before translation starts, whereas finalize () is often used to tie up loose ends at the end of translation: for example, an unterminated spanner might be completed automatically or reported with a warning message.

In addition, there is a derived_mark method that should be used to protect Scheme members from garbage collection. See Garbage collection for dummies.

LilyPond Contributor’s Guide v2.25.21 (development-branch).