-\version "2.1.23"
+\version "2.3.22"
\header {
-texidoc = "The notation problem, @emph{what} symbols to create,
+texidoc = "The notation problem, creating a certain symbol,
is handled by plugins. Each plugin is called Engraver. In this example,
- we switch on engravers one by one, in the following order
+engravers are switched on one by one, in the following order:
@itemize
-@item Note heads
-@item Staff symbol
-@item Clef
-@item Stem
-@item Beams, slurs, accents
-@item Accidentals, bar lines, time signature, and key signature.
+@item note heads,
+@item staff symbol,
+@item clef,
+@item stem,
+@item beams, slurs, accents,
+@item accidentals, bar lines, time signature, and key signature.
@end itemize
Engravers are grouped. For example, note heads, slurs, beams etc. form
-a Voice context. Engravers for key, accidental, bar, etc. form the
+a Voice context. Engravers for key, accidental, bar, etc. form a
Staff context.
"
}
-\paper { raggedright = ##t }
+\layout { raggedright = ##t }
-\include "engraver-example.lyinc"
+\include "engraver-example.ily"
%
% setup for Request->Element conversion. Guru-only
%
-MyStaffContext=\translator {
+MyStaff =\context {
\type "Engraver_group_engraver"
\name Staff
\consists "Instrument_name_engraver"
\consists "Grob_pq_engraver"
\consists "Forbid_line_break_engraver"
- \consistsend "Axis_group_engraver"
+ \consists "Axis_group_engraver"
\consists "Pitch_squash_engraver"
minimumVerticalExtent = #'(-6 . 6)
}
-MyVoiceContext = \translator {
+MyVoice = \context {
\type "Engraver_group_engraver"
\name Voice
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyStaffContext = \translator {
- \MyStaffContext
+MyStaff = \context {
+ \MyStaff
\consists "Staff_symbol_engraver"
}
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyStaffContext = \translator {
- \MyStaffContext
+MyStaff = \context {
+ \MyStaff
\consists "Clef_engraver"
\remove "Pitch_squash_engraver"
}
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyVoiceContext = \translator {
- \MyVoiceContext
+MyVoice = \context {
+ \MyVoice
\consists "Stem_engraver"
}
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyVoiceContext = \translator {
- \MyVoiceContext
+MyVoice = \context {
+ \MyVoice
\consists "Beam_engraver"
}
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyVoiceContext= \translator {
- \MyVoiceContext
+MyVoice= \context {
+ \MyVoice
\consists "Phrasing_slur_engraver"
\consists "Slur_engraver"
\consists "Script_engraver"
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyStaffContext = \translator {
- \MyStaffContext
+MyStaff = \context {
+ \MyStaff
\consists "Bar_engraver"
\consists "Time_signature_engraver"
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}
-MyStaffContext = \translator
- { \MyStaffContext
- \consists "Accidental_engraver"
- \consists "Key_engraver"
+MyStaff = \context {
+ \MyStaff
+ \consists "Accidental_engraver"
+ \consists "Key_engraver"
}
\score {
\topVoice
- \paper {
- \translator { \MyStaffContext }
- \translator { \MyVoiceContext }
+ \layout {
+ \context { \MyStaff }
+ \context { \MyVoice }
}
}