]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/engraver-one-by-one.ly
* input/mutopia/W.A.Mozart/mozart-hrn-3.ly: Mozart died in 1791
[lilypond.git] / input / test / engraver-one-by-one.ly
index be5a7b1e39d5153fa2bfe6968eedfea8447c492a..f80c2ff47030ef7355e8c63aacc7448e788e485e 100644 (file)
@@ -1,28 +1,29 @@
 
-\version "1.9.6"
+\version "2.1.30"
 \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 is 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 }
+
 \include "engraver-example.lyinc"
 
 
@@ -30,7 +31,7 @@ Staff context.
 % setup for Request->Element conversion. Guru-only
 %
 
-MyStaffContext=\translator {
+MyStaffContext=\context {
        \type "Engraver_group_engraver"
        \name Staff
 
@@ -44,8 +45,6 @@ MyStaffContext=\translator {
 
        \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"
@@ -73,7 +72,7 @@ MyStaffContext=\translator {
 }
 
 
-MyVoiceContext = \translator {
+MyVoiceContext = \context {
        \type "Engraver_group_engraver"
        \name Voice
 
@@ -89,7 +88,6 @@ MyVoiceContext = \translator {
        \consists "Font_size_engraver"
        
        % must come before all
-       \consists "Voice_devnull_engraver"
        \consists "Output_property_engraver"    
        \consists "Arpeggio_engraver"
        \consists "Multi_measure_rest_engraver"
@@ -105,7 +103,7 @@ MyVoiceContext = \translator {
        \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.
@@ -121,45 +119,23 @@ MyVoiceContext = \translator {
        \consists "Tie_engraver"
        \consists "Tie_engraver"
        \consists "Tuplet_engraver"
-       \consists "A2_engraver"
-
-       \consists "Skip_event_swallow_translator"
-       \accepts Thread % bug if you leave out this!
-}
-
-MyThreadContext = \translator{
-       \type Engraver_group_engraver
-       \name Thread
-       localKeySignature = #'()
-\description "
-    Handles note heads, and is contained in the Voice context.  You
-    have to instantiate this explicitly if you want to adjust the
-    style of individual note heads.
-"
-       \consists "Font_size_engraver"  
-       \consists "Thread_devnull_engraver"
        \consists "Note_heads_engraver"
        \consists "Rest_engraver"
 
-       % why here ? 
-       \consists "Output_property_engraver"    
-
+       \consists "Skip_event_swallow_translator"
 }
 
 
-
-
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
       }
 }
 
 
-MyStaffContext = \translator {
+MyStaffContext = \context {
     \MyStaffContext
     \consists "Staff_symbol_engraver"
 }
@@ -167,13 +143,12 @@ MyStaffContext = \translator {
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }
 
-MyStaffContext = \translator {
+MyStaffContext = \context {
     \MyStaffContext
       \consists "Clef_engraver"
     \remove "Pitch_squash_engraver"
@@ -182,13 +157,12 @@ MyStaffContext = \translator {
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }
 
-MyVoiceContext = \translator {
+MyVoiceContext = \context {
     \MyVoiceContext
     \consists "Stem_engraver"
     }
@@ -196,13 +170,12 @@ MyVoiceContext = \translator {
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }
 
-MyVoiceContext = \translator {
+MyVoiceContext = \context {
     \MyVoiceContext
        \consists "Beam_engraver"
 }
@@ -210,13 +183,12 @@ MyVoiceContext = \translator {
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }
 
-MyVoiceContext= \translator {
+MyVoiceContext= \context {
     \MyVoiceContext
     \consists "Phrasing_slur_engraver"
     \consists "Slur_engraver"
@@ -227,13 +199,12 @@ MyVoiceContext= \translator {
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }
 
-MyStaffContext = \translator {
+MyStaffContext = \context {
     \MyStaffContext
  \consists "Bar_engraver"
     \consists "Time_signature_engraver"
@@ -243,13 +214,12 @@ MyStaffContext = \translator {
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }
 
-MyStaffContext = \translator
+MyStaffContext = \context
  { \MyStaffContext
  \consists "Accidental_engraver"    
      \consists "Key_engraver"
@@ -257,8 +227,7 @@ MyStaffContext = \translator
 \score {
   \topVoice
   \paper {
-      \translator { \MyStaffContext }
-      \translator { \MyVoiceContext }
-      \translator { \MyThreadContext }
-      }
+      \context { \MyStaffContext }
+      \context { \MyVoiceContext }
+            }
 }