]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/engraver-init.ly
(all-grob-descriptions): remove all
[lilypond.git] / ly / engraver-init.ly
index 2c1469b1f4f47cf6a4f6e763c84d80e5fd34d372..e897cc3d9239118901ff57791751f4c3a0fac910 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.29"
+\version "2.4.0"
 
 \context {
     \name Global
@@ -6,26 +6,18 @@
     \accepts Score
     \description "Hard coded entry point for LilyPond. Cannot be tuned."
     \grobdescriptions #all-grob-descriptions    
-
 }
 
-%
-% setup for Request->Element conversion. Guru-only
-%
-
 \context {
        \type "Engraver_group_engraver"
        \name Staff
-
        
        \consists "Output_property_engraver"    
-       
        \consists "Bar_engraver"
 % Bar_engraver must be first so default bars aren't overwritten
 % with empty ones.
        
        \consists "Font_size_engraver"
-
        \consists "Volta_engraver"
        \consists "Separating_line_group_engraver"      
        \consists "Dot_column_engraver"
@@ -35,6 +27,7 @@
        \consists "Clef_engraver"
        \consists "Key_engraver"
        \consists "Time_signature_engraver"
+       \consists "Ledger_line_engraver" 
        \consists "Staff_symbol_engraver"
        \consists "Collision_engraver"
        \consists "Rest_collision_engraver"
        \consists "Piano_pedal_engraver"
        \consists "Instrument_name_engraver"
        \consists "String_number_engraver"
-       \consistsend "Axis_group_engraver"
+       \consists "Axis_group_engraver"
 
-       minimumVerticalExtent = #'(-6 . 6)
+       minimumVerticalExtent = #'(-4 . 4)
        extraVerticalExtent = ##f
        verticalExtent = ##f 
        localKeySignature = #'()
-
+       createSpacing = ##t
+       
        % explicitly set instrument, so we don't get 
        % weird effects when doing instrument names for
        % piano staves
@@ -63,7 +57,7 @@
 }
 
 \context {
-    \StaffContext
+    \Staff
     \type "Engraver_group_engraver"
     \name DrumStaff
     \alias Staff
@@ -79,7 +73,7 @@
     \denies Voice
     \accepts DrumVoice
 
-    clefGlyph = #"clefs-percussion"
+    clefGlyph = #"clefs.percussion"
     clefPosition = #0
     \override Script #'staff-padding = #0.75 
 }
@@ -90,7 +84,6 @@
     \name InnerChoirStaff
     \consists "System_start_delimiter_engraver"
     systemStartDelimiter = #'SystemStartBracket
-    localKeySignature = #'()
 
     \accepts "Staff"
     \accepts "DrumStaff"
 }
 
 \context {
-       \InnerChoirStaffContext
+       \InnerChoirStaff
        \name ChoirStaff
        
        \accepts "InnerChoirStaff"
     \consists "Bar_engraver"
     \consists "Time_signature_engraver"
     \consists "Staff_symbol_engraver"
+    \consists "Ledger_line_engraver" 
     \consists "Instrument_name_engraver"
-    \consistsend "Axis_group_engraver"
+    \consists "Axis_group_engraver"
     \accepts "Voice"
     \description  "
     A context like @code{Staff} but for printing rhythms.  Pitches are
     \consists "Arpeggio_engraver"
     \consists "Multi_measure_rest_engraver"
     \consists "Text_spanner_engraver"
+    \consists "Trill_spanner_engraver"
     \consists "Grob_pq_engraver"
     \consists "Forbid_line_break_engraver"
 
     \consists "Melisma_translator"
     \consists "Part_combine_engraver"
 
-%{
-    Must come before text_engraver, but after note_column engraver.
-
-%}
     \consists "Text_engraver"
     \consists "Dynamic_engraver"
     \consists "Fingering_engraver"
     \consists "Slur_engraver"
     \consists "Tie_engraver"
     \consists "Tuplet_engraver"
+    \consists "Grace_engraver"
 
     \consists "Skip_event_swallow_translator"
 }
 
 \context {
-    \VoiceContext
+    \Voice
     \name DrumVoice
     \alias Voice
 
 }
 
 \context{
-    \GrandStaffContext
+    \GrandStaff
     \name "PianoStaff"
     \alias "GrandStaff"
 
 \context {
     \type "Engraver_group_engraver"
     \name InnerStaffGroup
-    localKeySignature = #'()
 
     \consists "Span_bar_engraver"
     \consists "Span_arpeggio_engraver"
 }
 
 \context {
-    \InnerStaffGroupContext
+    \InnerStaffGroup
     \name StaffGroup
     
     \description
@@ -317,7 +308,6 @@ connected vertically.  "
 
 \context{
     \type "Engraver_group_engraver"
-    \consistsend "Hara_kiri_engraver"
     minimumVerticalExtent = #'(-1.2 . 2.4)
     extraVerticalExtent = ##f
     verticalExtent = ##f
@@ -334,13 +324,14 @@ printing of a single line of lyrics.  "
     \consists "Vocal_name_engraver"
     \consists "Skip_event_swallow_translator"
     \consists "Font_size_engraver"
+    \consists "Hara_kiri_engraver"
     \override SeparationItem #'padding = #0.2
 }
 
 \context {
     \type "Engraver_group_engraver"
     \name NoteNames
-    \consistsend "Axis_group_engraver"
+    \consists "Axis_group_engraver"
 
     minimumVerticalExtent = ##f
     extraVerticalExtent = ##f
@@ -358,14 +349,17 @@ printing of a single line of lyrics.  "
     \type "Engraver_group_engraver"
     \name ChordNames
     \description "Typesets chord names."
+
+    \consists "Volta_engraver"
     
     \consists "Rest_swallow_translator" 
     \consists "Output_property_engraver"       
     \consists "Separating_line_group_engraver"
     \consists "Chord_name_engraver"
     \consists "Skip_event_swallow_translator"
-    \consistsend "Hara_kiri_engraver"
+    \consists "Hara_kiri_engraver"
     
+    voltaOnThisStaff = ##f
     minimumVerticalExtent = #'(0 . 2.5)
     extraVerticalExtent = ##f
     \override SeparatingGroupSpanner #'padding = #0.8
@@ -374,9 +368,9 @@ printing of a single line of lyrics.  "
 
 
 RemoveEmptyStaffContext= \context {
-    \StaffContext
+    \Staff
     \remove "Axis_group_engraver"
-    \consistsend "Hara_kiri_engraver"
+    \consists "Hara_kiri_engraver"
     \override Beam #'auto-knee-gap = #'()
 }
 
@@ -386,12 +380,12 @@ AncientRemoveEmptyStaffContext = \context {
     \RemoveEmptyStaffContext
     \accepts "VaticanaVoice"
     \accepts "GregorianTranscriptionVoice"
+    \accepts "MensuralVoice"
 }
 
 \context {
     \type Score_engraver
     \name Score
-    localKeySignature = #'()
 
     \description "This is the top level notation context.  No
     other context can contain a @code{Score} context.  This context
@@ -402,16 +396,14 @@ AncientRemoveEmptyStaffContext = \context {
     You cannot explicitly instantiate a Score context (since it is
     not contained in any other context).  It is instantiated
     automatically when an output definition (a @code{\score} or
-    @code{\paper} block) is processed."
+    @code{\layout} block) is processed."
     
     \consists "Repeat_acknowledge_engraver"
     \consists "Staff_collecting_engraver"
 
                                % move the alias along with the engraver.
 
-    %% TODO? add this alias from Timing_engraver::initialize() ? 
     \consists "Timing_engraver"
-    \alias "Timing"
     
     \consists "Output_property_engraver"
     \consists "System_start_delimiter_engraver"
@@ -428,6 +420,7 @@ AncientRemoveEmptyStaffContext = \context {
     \accepts "TabStaff"
     \accepts "VaticanaStaff"
     \accepts "GregorianTranscriptionStaff"
+    \accepts "MensuralStaff"
     \accepts "StaffGroup"
     \accepts "RhythmicStaff"
     \accepts "DrumStaff"
@@ -443,16 +436,16 @@ AncientRemoveEmptyStaffContext = \context {
     soloText = #"Solo"
     soloIIText = #"Solo II"
     aDueText = #"a2"
-    soloADue = ##t
+    printPartCombineTexts = ##t
     systemStartDelimiter =#'SystemStartBar
 
     drumStyleTable = #drums-style
     
     melismaBusyProperties = #default-melisma-properties
     
-    clefGlyph = #"clefs-G"
+    clefGlyph = #"clefs.G"
     clefPosition = #-2
-    centralCPosition = #-6
+    middleCPosition = #-6
     
     defaultBarType = #"|"
     barNumberVisibility = #default-bar-number-visibility
@@ -478,6 +471,8 @@ AncientRemoveEmptyStaffContext = \context {
     pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
     pedalSostenutoStyle = #'mixed
 
+
+    harmonicAccidentals = ##t 
     fingeringOrientations = #'(up down)
     tupletNumberFormatFunction = #denominator-tuplet-formatter
     markFormatter = #format-mark-letters
@@ -488,24 +483,26 @@ AncientRemoveEmptyStaffContext = \context {
     autoAccidentals = #'(Staff (same-octave . 0))
     autoCautionaries = #'()  
 
+    printKeyCancellation = ##t
     keyAccidentalOrder = #`(
        (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
        (3  . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
        (6 . ,DOUBLE-FLAT) (2  . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1  . ,DOUBLE-FLAT) (4  . ,DOUBLE-FLAT) (0  . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
        (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
     )
-    breakAlignOrder = #'(
-    instrument-name
-    left-edge
-    ambitus
-    breathing-sign
-    clef
-    rehearsal-mark
-    staff-bar
-    key-signature
-    time-signature
-    custos
-    )
+
+    %{
+
+    this order is more complex, see wansek p254 and further.
+
+    for instance, order of clef and :|: depends on function of the clef
+
+    (clef of start-repeat) :|: (change-clef)
+
+    is the proper order.
+    
+    %}
+    
     barCheckSynchronize = ##f
     
     %% chord names:
@@ -518,31 +515,34 @@ AncientRemoveEmptyStaffContext = \context {
     chordNameExceptionsFull = #fullJazzExceptions
     chordNameExceptionsPartial = #partialJazzExceptions
     
+
+    bassStaffProperties = #'((assign clefGlyph "clefs.F")
+      (assign clefPosition 2)
+      (assign middleCPosition 6))
     %% tablature:
     stringOneTopmost = ##t
     highStringOne = ##t
 
     %% One may change the strings tuning as following :
     %% The lenght of the list must be equal to the number of string
-    stringTunings = #guitar-tunings
+    stringTunings = #guitar-tuning
     tablatureFormat = #fret-number-tablature-format
 
     %%
-    bassFigureFormatFunction = #make-bass-figure-markup
+    bassFigureFormatFunction = #format-bass-figure
     metronomeMarkFormatter = #format-metronome-markup
-    graceSettings = #`#(
+    graceSettings = #`(
        (Voice Stem direction 1)
-
        ;; TODO: should take from existing definition.
        ;; c&p from define-grobs.scm
        
        (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
-       (Voice Stem stem-shorten (0.4 0))
+       (Voice Stem stem-shorten (0.4 0.4))
        (Voice Stem  font-size -3)
        (Voice NoteHead  font-size -3)
        (Voice Dots  font-size -3)
        (Voice Stem beamed-lengths  
-        ,(map (lambda (x) (* 0.8 x)) '(3.26)))
+        ,(map (lambda (x) (* 0.8 x)) '(3.3 3.3 4.0)))
        (Voice Stem beamed-minimum-free-lengths  
         ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
        (Voice Stem beamed-extreme-minimum-free-lengths  
@@ -553,21 +553,18 @@ AncientRemoveEmptyStaffContext = \context {
        (Voice Beam space-function ,(lambda (beam mult)
                                     (* 0.8 (Beam::space_function
                                             beam mult))))
-       (Voice Beam position-callbacks (,Beam::least_squares
-                                       ,Beam::check_concave
-                                       ,Beam::slope_damping))
        (Voice Accidental font-size -4)
        (Voice Slur direction -1)
     )
-    
-}
 
-OrchestralScoreContext = \context {
-       \ScoreContext
+    quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event)
+    instrumentTransposition = #(ly:make-pitch 0 0 0)
+
+    verticallySpacedContexts = #'(Staff)
 }
 
-EasyNotation = \context {
-       \ScoreContext
+EasyNotation = \context {      % TODO: why \context override? 
+       \Score
        \override NoteHead #'print-function = #Note_head::brew_ez_stencil
        \override NoteHead #'Y-extent-callback = #'()
        \override NoteHead #'X-extent-callback = #'()
@@ -584,7 +581,7 @@ EasyNotation = \context {
        \consists "Skip_event_swallow_translator"
        \consists "Separating_line_group_engraver"
        
-       \consistsend "Hara_kiri_engraver"
+       \consists "Hara_kiri_engraver"
 }
 
 \context {
@@ -593,14 +590,13 @@ EasyNotation = \context {
 
     %% don't want to route anything out of here: 
     \alias "Staff"
-    \alias "Timing"
     \alias "Voice"
     \consists "Swallow_engraver"
     \description "Silently discards all musical information given to this context. "
     }
 
 \context {
-      \VoiceContext
+      \Voice
       \name "TabVoice"
       \consists "Tab_note_heads_engraver"
       \remove "Note_heads_engraver"
@@ -617,12 +613,19 @@ EasyNotation = \context {
       %\override Beam #'damping = #100000
       %\override Stem #'up-to-staff = ##t
 
+      % TabStaff increase the staff-space, which in turn
+      % increases beam thickness and spacing; beams are
+      % too big. We have to adjust the beam settings:
+      \override Beam #'thickness = #0.32
+      \override Beam #'space-function =
+          #(lambda (beam mult) (* 0.62 (Beam::space_function beam mult)))
+
       % No accidental in tablature !
       \remove Accidental_engraver
 }
 
 \context {
-      \StaffContext
+      \Staff
       \alias "Staff"
       \name "TabStaff"
       \denies "Voice"
@@ -644,7 +647,7 @@ EasyNotation = \context {
       \remove "Key_engraver"
       \remove "String_number_engraver"
       % Special "TAB" clef
-      clefGlyph = #"clefs-tab"
+      clefGlyph = #"clefs.tab"
       clefPosition = #0
 }
 
@@ -652,14 +655,14 @@ EasyNotation = \context {
 % but this does not work (is this a bug or intended behaviour?):
 %
 % If I try to do so, I get "error: unknown escaped string:
-% `\VaticanaStaffContext'" in params-init.ly.  If I also move
+% `\VaticanaStaff'" in params-init.ly.  If I also move
 % "\context { \Vaticana*Context }" from params-init.ly to the end
 % of gregorian-init.ly, then I get "error: parse error, unexpected
-% TRANSLATOR: \context { \VaticanaStaffContext }" in
+% TRANSLATOR: \context { \VaticanaStaff }" in
 % gregorian-init.ly. --jr
 
 \context {
-  \VoiceContext
+  \Voice
   \name "VaticanaVoice"
   \alias "Voice"
   \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
@@ -670,25 +673,34 @@ EasyNotation = \context {
   \consists "Vaticana_ligature_engraver"
 
   % Set default head for notes outside of \[ \].
-  \override NoteHead #'style = #'vaticana_punctum
+  \override NoteHead #'style = #'vaticana-punctum
 
   % Put some space before and after divisiones.
   % FIXME: This does not seem to show any effect.
   \override Script #'padding = #0.5
 
   % There are no beams in Gregorian Chant notation.
-  autobeaming = ##f
+  autoBeaming = ##f
 
   % Prepare TextSpanner for \episem{Initium|Finis} use.
+  %
+  % N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will
+  % always produce dashed lines, regardless of the style property.
+  %
+  % FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is
+  % required to force the articulation signs being placed vertically
+  % tightly to the correpsonding note heads.
+  %
+  \override TextSpanner #'dash-fraction = #'()
   \override TextSpanner #'style = #'line
   \override TextSpanner #'edge-height = #'(0 . 0)
-  \override TextSpanner #'padding = #0.5
+  \override TextSpanner #'padding = #-0.1
   \override TextSpanner #'enclose-bounds = #1
   \override TextSpanner #'edge-text = #'("" . "")
 }
 
 \context {
-  \StaffContext
+  \Staff
   \name "VaticanaStaff"
   \alias "Staff"
   \denies "Voice"
@@ -710,8 +722,8 @@ EasyNotation = \context {
   % \override StaffSymbol #'width = #60.0
 
   % Choose vaticana do clef on 3rd line as default.
-  clefGlyph = #"clefs-vaticana_do"
-  centralCPosition = #1
+  clefGlyph = #"clefs.vaticana.do"
+  middleCPosition = #1
   clefPosition = #1
   clefOctavation = #0
 
@@ -721,14 +733,13 @@ EasyNotation = \context {
   \override Custos #'style = #'vaticana
   \override Custos #'neutral-position = #3
   \override Custos #'neutral-direction = #-1
-  \override Custos #'adjust-if-on-staffline = ##t
 
   % Score.timing = ##f
   % Score.barAlways = ##t
 }
 
 \context {
-  \VoiceContext
+  \Voice
   \name "GregorianTranscriptionVoice"
   \alias "Voice"
 
@@ -743,17 +754,26 @@ EasyNotation = \context {
   \override Script #'padding = #0.5
 
   % There are no beams in Gregorian Chant notation.
-  autobeaming = ##f
+  autoBeaming = ##f
 
   % Prepare TextSpanner for \episem{Initium|Finis} use.
+  %
+  % N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will
+  % always produce dashed lines, regardless of the style property.
+  %
+  % FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is
+  % required to force the articulation signs being placed vertically
+  % tightly to the correpsonding note heads.
+  %
+  \override TextSpanner #'dash-fraction = #'()
   \override TextSpanner #'style = #'line
   \override TextSpanner #'edge-height = #'(0 . 0)
-  \override TextSpanner #'padding = #0.5
+  \override TextSpanner #'padding = #-0.1
   \override TextSpanner #'enclose-bounds = #1
   \override TextSpanner #'edge-text = #'("" . "")
 }
  \context {
-  \StaffContext
+  \Staff
   \name "GregorianTranscriptionStaff"
   \alias "Staff"
   \denies "Voice"
@@ -764,3 +784,58 @@ EasyNotation = \context {
   % Instead, we make the grob transparent.
   \override BarLine #'transparent = ##t
 }
+
+\context {
+  \Voice
+  \name "MensuralVoice"
+  \alias "Voice"
+  \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting a piece in mensural style."
+
+  \remove "Slur_engraver"
+  \remove "Ligature_bracket_engraver"
+  \consists "Mensural_ligature_engraver"
+
+  % Set default head for notes outside of \[ \].
+  \override NoteHead #'style = #'mensural
+
+  % There are no beams in mensural notation.
+  autoBeaming = ##f
+}
+
+\context {
+  \Staff
+  \name "MensuralStaff"
+  \alias "Staff"
+  \denies "Voice"
+  \accepts "MensuralVoice"
+  \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting a piece in mensural style."
+
+  \consists "Custos_engraver"
+
+  % We can not remove Bar_engraver; otherwise clefs and custodes will
+  % not show up any more among other line breaking issues.
+  % Instead, we make the grob transparent.
+  \override BarLine #'transparent = ##t
+
+  \override StaffSymbol #'thickness = #0.6
+
+  % FIXME: unit on StaffSymbol's width should be \linewidth.
+  % \override StaffSymbol #'width = #60.0
+
+  % Choose petrucci g clef on 2nd line as default.
+  clefGlyph = #"clefs.petrucci.g"
+  middleCPosition = #-6
+  clefPosition = #-2
+  clefOctavation = #0
+
+  % Select mensural style font.
+  \override TimeSignature #'style = #'mensural
+  \override KeySignature #'style = #'mensural
+  \override Accidental #'style = #'mensural
+  \override Custos #'style = #'mensural
+  \override Custos #'neutral-position = #3
+  \override Custos #'neutral-direction = #-1
+
+  % Score.timing = ##f
+  % Score.barAlways = ##t
+}