|
|
Node:Defining new contexts,
Previous:Changing context definitions,
Up:Interpretation context
Defining new contexts
If you want to build a context from scratch, you must also supply the
following extra information:
- A name, specified by
\name contextname.
- A cooperation module. This is specified by
\type
typename.
This is an example:
\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
. Alternatives
for this engraver are the following:
Engraver_group_engraver
- The standard cooperation engraver.
Score_engraver
-
This is cooperation module that should be in the top level context,
and only the top level context.
Grace_engraver_group
This is a special
- cooperation module (resembling Score_engraver
) that is
used to create an embedded `miniscore'.
Other modifiers are
In the \paper block, it is also possible to define translator
identifiers. Like other block identifiers, the identifier can only
be used as the very first item of a translator. In order to define
such an identifier outside of \score, you must do
\paper {
foo = \translator { ... }
}
\score {
\notes {
...
}
\paper {
\translator { \foo ... }
}
}
|
|
Go back to index of LilyPond.
Please send GNU LilyPond questions and comments to
lilypond-user@gnu.org.
Please send comments on these web pages to
lilypond@packages.debian.org
Copyright (c) 1997--2001 Han-Wen Nienhuys and Jan Nieuwenhuizen.
Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.
|