-\version "2.1.7"
+\version "2.7.32"
\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 { ragged-right = ##t }
-\include "engraver-example.lyinc"
+\include "engraver-example.ily"
%
% setup for Request->Element conversion. Guru-only
%
-MyStaffContext=\translator {
- \type "Engraver_group_engraver"
+MyStaff =\context {
+ \type "Engraver_group"
\name Staff
\description "Handles clefs, bar lines, keys, accidentals. It can contain
\consists "Volta_engraver"
\consists "Separating_line_group_engraver"
- SeparatingGroupSpanner \override #'spacing-procedure
- = #Separating_group_spanner::set_spacing_rods_and_seqs
\consists "Dot_column_engraver"
\consists "Ottava_spanner_engraver"
\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)
+ \override VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 6)
extraVerticalExtent = ##f
verticalExtent = ##f
localKeySignature = #'()
}
-MyVoiceContext = \translator {
- \type "Engraver_group_engraver"
+MyVoice = \context {
+ \type "Engraver_group"
\name Voice
\description "
\consists "Chord_tremolo_engraver"
\consists "Percent_repeat_engraver"
\consists "Slash_repeat_engraver"
- \consists "Melisma_engraver"
+ \consists "Melisma_translator"
%{
Must come before text_engraver, but after note_column engraver.
\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 }
}
}