LilyPond Contributor's Guide: 10.10.4 Listening to music events

### 10.10.4 Listening to music events

External interfaces to the engraver are implemented by protected macros including one or more of the following:

- `DECLARE_TRANSLATOR_LISTENER (event_name)`
- `IMPLEMENT_TRANSLATOR_LISTENER (Engraver_name, event_name)`

where event_name is the type of event required to provide the input the engraver needs and Engraver_name is the name of the engraver.

Following declaration of a listener, the method is implemented as follows:

>     IMPLEMENT_TRANSLATOR_LISTENER (Engraver_name, event_name)
>     void
>     Engraver_name::listen_event_name (Stream event *event)
>     {
>       ...body of listener method...
>     }

#### LilyPond — Contributor’s Guide