Node:Defining new contexts, Previous:Engravers and performers, Up:Interpretation context



Defining new contexts

It is also possible to define new contexts from scratch. To do this, you must define give the new context a name. In the following example, a very simple Staff context is created: one that will put note heads on a staff symbol.

     \translator {
       \type "Engraver_group_engraver"
       \name "SimpleStaff"
       \alias "Staff"
       \consists "Staff_symbol_engraver"
       \consists "Note_head_engraver"
       \consistsend "Axis_group_engraver"
     }
     

The argument of \type is the name for a special engraver that handles cooperation between simple engravers such as Note_head_engraver and Staff_symbol_engraver. This should always be Engraver_group_engraver (unless you are defining a Score context from scratch, in which case Score_engraver must be used).

The complete list of context modifiers is the following:


This page is for LilyPond-2.0.0 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.