]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/engraver-init.ly
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / ly / engraver-init.ly
index 358400bc4baea375a8d25a84f6915fe8d7e717d1..654f5dd8df3e2f05c9824e9ef25d4300fe743fd4 100644 (file)
@@ -1,18 +1,18 @@
-\version "2.5.18"
+\version "2.7.39"
 
 \context {
-  \name Global
+  \name "Global"
 
-  \accepts Score
+  \accepts "Score"
 
-  \defaultchild Score
+  \defaultchild "Score"
   \description "Hard coded entry point for LilyPond. Cannot be tuned."
   \grobdescriptions #all-grob-descriptions
 }
 
 \context {
-  \type "Engraver_group_engraver"
-  \name Staff
+  \type "Engraver_group"
+  \name "Staff"
   
   \consists "Output_property_engraver" 
   \consists "Bar_engraver"
   \consists "Instrument_name_engraver"
   \consists "String_number_engraver"
   \consists "Axis_group_engraver"
+  \consists "Figured_bass_engraver"
+  \consists "Figured_bass_position_engraver"
 
-  minimumVerticalExtent = #'(-4 . 4)
+  \override VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4)
   extraVerticalExtent = ##f
   verticalExtent = ##f 
   localKeySignature = #'()
 
 \context {
   \Staff
-  \type "Engraver_group_engraver"
-  \name DrumStaff
-  \alias Staff
+  \type "Engraver_group"
+  \name "DrumStaff"
+  \alias "Staff"
+  
   \remove "Accidental_engraver"
   \remove "Ottava_spanner_engraver"
   \remove "Key_engraver" 
@@ -74,9 +77,9 @@
   
   \description "Handles typesetting for percussion."
 
-  \denies Voice
-  \accepts DrumVoice
-  \defaultchild DrumVoice
+  \denies "Voice"
+  \accepts "DrumVoice"
+  \defaultchild "DrumVoice"
 
   clefGlyph = #"clefs.percussion"
   clefPosition = #0
 
 
 \context {
-  \type "Engraver_group_engraver"
-  \name InnerChoirStaff
+  \type "Engraver_group"
+  \name "InnerChoirStaff"
   \consists "System_start_delimiter_engraver"
   systemStartDelimiter = #'SystemStartBracket
+  vocalName = #'()
+  vocNam = #'()
 
   \accepts "Staff"
   \accepts "DrumStaff"
   \accepts "InnerStaffGroup"
   \description "Identical to @code{StaffGroup} except that the
 contained staves are not connected vertically."
-  
-}
 
+}
 
 \context{
-  \type "Engraver_group_engraver"
+  \type "Engraver_group"
   
-  \consists "Output_property_engraver" 
-
-  minimumVerticalExtent = ##f
+  \override VerticalAxisGroup #'minimum-Y-extent = ##f
   extraVerticalExtent = ##f
   verticalExtent = ##f 
   localKeySignature = #'()
+  createSpacing = ##t
 
-  \consists "Pitch_squash_engraver"
   squashedPosition = #0
-  \consists "Separating_line_group_engraver"   
   \name RhythmicStaff
   \alias "Staff"
   
   \override BarLine #'bar-size = #4
-  \override VoltaBracket #'minimum-space = #15
-  \override VoltaBracket #'padding = #5
+  \override VoltaBracket #'staff-padding = #3
   \override StaffSymbol #'line-count = #1      
 
-  \override Stem  #'neutral-direction = #1
-  \override Beam  #'neutral-direction = #1     
-  %%   \consists "Repeat_engraver"
-  \consists "Dot_column_engraver"
+  \override Stem  #'neutral-direction = #UP
+  \override Beam  #'neutral-direction = #UP
+  
+  \consists "Output_property_engraver"
+  \consists "Font_size_engraver"
   \consists "Volta_engraver"
+  \consists "Separating_line_group_engraver"   
+  \consists "Dot_column_engraver"
   \consists "Bar_engraver"
-  \consists "Time_signature_engraver"
   \consists "Staff_symbol_engraver"
-  \consists "Ledger_line_engraver" 
+  \consists "Pitch_squash_engraver"
+  \consists "Time_signature_engraver"
   \consists "Instrument_name_engraver"
   \consists "Axis_group_engraver"
+  
   \accepts "Voice"
   \accepts "CueVoice"
   \defaultchild "Voice"
+
   \description  "
     A context like @code{Staff} but for printing rhythms.  Pitches are
     ignored; the notes are printed on one line.  
@@ -156,8 +161,8 @@ contained staves are not connected vertically."
 
 
 \context {
-  \type "Engraver_group_engraver"
-  \name Voice
+  \type "Engraver_group"
+  \name "Voice"
 
   \description "
     Corresponds to a voice on a staff.  This context handles the
@@ -178,15 +183,19 @@ contained staves are not connected vertically."
   \consists "Trill_spanner_engraver"
   \consists "Grob_pq_engraver"
   \consists "Forbid_line_break_engraver"
-
+  \consists "Laissez_vibrer_engraver"
+  \consists "Repeat_tie_engraver"
   \consists "Note_head_line_engraver"
   \consists "Glissando_engraver"
   \consists "Ligature_bracket_engraver"
   \consists "Breathing_sign_engraver"
-  %% \consists "Rest_engraver"
   \consists "Note_heads_engraver"
   \consists "Rest_engraver"
 
+  %% switch on to make stem directions interpolate for the
+  %% center line.
+  %  \consists "Melody_engraver"
+
   \consists "Stem_engraver"
   \consists "Beam_engraver"
   \consists "Grace_beam_engraver"
@@ -221,7 +230,8 @@ contained staves are not connected vertically."
   \name CueVoice
   \alias Voice
   fontSize = #-4
-  \override Stem #'lengths = #'(2.5 2.5 3.0 3.0)
+  \override Stem #'length-fraction = #(magstep -4)
+  \override Beam #'length-fraction = #(magstep -4)
 }
 
 \context {
@@ -239,7 +249,6 @@ contained staves are not connected vertically."
   \remove "Glissando_engraver"
   \remove "Ligature_bracket_engraver"
   \remove "Note_heads_engraver"
-  \consists "Rest_engraver"
   \consists "Drum_notes_engraver"
   \remove "New_fingering_engraver"
 
@@ -252,7 +261,7 @@ contained staves are not connected vertically."
 }
 
 \context{
-  \type "Engraver_group_engraver"
+  \type "Engraver_group"
   \name GrandStaff
   localKeySignature = #'()
   
@@ -277,7 +286,6 @@ contained staves are not connected vertically."
   "Just like @code{GrandStaff} but with a forced distance between
     the staves, so cross staff beaming and slurring can be used."
   
-  verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
   \override VerticalAlignment #'forced-distance = #12
   \override VerticalAlignment #'self-alignment-Y = #0
 
@@ -289,7 +297,7 @@ contained staves are not connected vertically."
 }
 
 \context {
-  \type "Engraver_group_engraver"
+  \type "Engraver_group"
   \name InnerStaffGroup
 
   \consists "Span_bar_engraver"
@@ -318,7 +326,8 @@ contained staves are not connected vertically."
 
   "Groups staffs while adding a bracket on the left side, grouping
 the staves together.  The bar lines of the contained staves are
-connected vertically.  "
+connected vertically.  StaffGroup only consists of a collection of
+staffs, with a bracket in front and spanning bar lines. "
   
   \accepts "InnerChoirStaff"
   \accepts "ChoirStaff"
@@ -328,8 +337,8 @@ connected vertically.  "
 
 
 \context{
-  \type "Engraver_group_engraver"
-  minimumVerticalExtent = #'(-1.2 . 2.4)
+  \type "Engraver_group"
+  \override VerticalAxisGroup #'minimum-Y-extent = #'(-1.2 . 2.4)
   extraVerticalExtent = ##f
   verticalExtent = ##f
 
@@ -337,25 +346,34 @@ connected vertically.  "
 printing of a single line of lyrics.  "
   
   \name Lyrics 
-  \consists "Separating_line_group_engraver"
   \consists "Lyric_engraver"
   \consists "Extender_engraver"
   \consists "Hyphen_engraver"
   \consists "Stanza_number_engraver"
-  \consists "Vocal_name_engraver"
+  \consists "Instrument_name_engraver"
   \consists "Skip_event_swallow_translator"
   \consists "Font_size_engraver"
   \consists "Hara_kiri_engraver"
-  \override RemoveEmptyVerticalGroup #'remove-first = ##t
+  \override VerticalAxisGroup #'remove-first = ##t
+  \override VerticalAxisGroup #'remove-empty = ##t
   \override SeparationItem #'padding = #0.2
+  \override InstrumentName #'self-alignment-Y = ##f
+
+  %% sync with define-grobs.scm ;
+  \override InstrumentName #'font-size = #1.0
+
+  %% make sure that barlines aren't collapsed, when
+  %% Bar_engraver is there.
+  \override BarLine #'bar-size = #0.1 
+  
 }
 
 \context {
-  \type "Engraver_group_engraver"
+  \type "Engraver_group"
   \name NoteNames
   \consists "Axis_group_engraver"
 
-  minimumVerticalExtent = ##f
+  \override VerticalAxisGroup #'minimum-Y-extent = ##f
   extraVerticalExtent = ##f
   verticalExtent = ##f 
 
@@ -368,7 +386,7 @@ printing of a single line of lyrics.  "
 }
 
 \context {
-  \type "Engraver_group_engraver"
+  \type "Engraver_group"
   \name ChordNames
   \description "Typesets chord names."
 
@@ -382,10 +400,11 @@ printing of a single line of lyrics.  "
   \consists "Hara_kiri_engraver"
   
   voltaOnThisStaff = ##f
-  minimumVerticalExtent = #'(0 . 2.5)
+  \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 2.5)
   extraVerticalExtent = ##f
   \override SeparatingGroupSpanner #'padding = #0.8
-  \override RemoveEmptyVerticalGroup #'remove-first = ##t
+  \override VerticalAxisGroup #'remove-first = ##t
+  \override VerticalAxisGroup #'remove-empty = ##t
   verticalExtent = ##f 
 }
 
@@ -395,6 +414,7 @@ RemoveEmptyStaffContext= \context {
   \remove "Axis_group_engraver"
   \consists "Hara_kiri_engraver"
   \override Beam #'auto-knee-gap = #'()
+  \override VerticalAxisGroup #'remove-empty = ##t
 }
 
 AncientRemoveEmptyStaffContext = \context {
@@ -407,9 +427,9 @@ AncientRemoveEmptyStaffContext = \context {
 }
 
 \context {
-  \type Score_engraver
+  \type "Score_engraver"
   \name "Score"
-
+  
   \description "This is the top level notation context.  No
     other context can contain a @code{Score} context.  This context
     handles the administration of time signatures.  It also makes sure
@@ -440,9 +460,11 @@ AncientRemoveEmptyStaffContext = \context {
   \consists "Vertical_align_engraver"
   \consists "Stanza_number_align_engraver"
   \consists "Bar_number_engraver"
-  \consists "Span_arpeggio_engraver"
-
+  \consists "Tweak_engraver"
+  \consists "Parenthesis_engraver"
+  
   \defaultchild "Staff"
+
   \accepts "Staff"
   \accepts "RhythmicStaff"
   \accepts "TabStaff"
@@ -459,7 +481,7 @@ AncientRemoveEmptyStaffContext = \context {
   \accepts "Devnull"
   \accepts "NoteNames"
   \accepts "FiguredBass"
-
+  
   soloText = #"Solo"
   soloIIText = #"Solo II"
   aDueText = #"a2"
@@ -476,7 +498,7 @@ AncientRemoveEmptyStaffContext = \context {
   firstClef = ##t
   
   defaultBarType = #"|"
-  barNumberVisibility = #default-bar-number-visibility
+  barNumberVisibility = #first-bar-number-invisible
   automaticBars = ##t
   
   explicitClefVisibility = #all-visible
@@ -486,8 +508,6 @@ AncientRemoveEmptyStaffContext = \context {
   autoBeamCheck = #default-auto-beam-check
   scriptDefinitions = #default-script-alist
 
-  verticalAlignmentChildCallback = #Align_interface::alignment_callback
-
   pedalSustainStrings = #'("Ped." "*Ped." "*")
   pedalSustainStyle = #'text
   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
@@ -500,13 +520,12 @@ AncientRemoveEmptyStaffContext = \context {
   pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
   pedalSostenutoStyle = #'mixed
 
-
   harmonicAccidentals = ##t 
   fingeringOrientations = #'(up down)
   stringNumberOrientations = #'(up down)
   tupletNumberFormatFunction = #denominator-tuplet-formatter
   markFormatter = #format-mark-letters
-  rehearsalMark = #1 
+  rehearsalMark = #1
   subdivideBeams = ##f
   allowBeamBreak = ##f
   extraNatural = ##t
@@ -514,7 +533,7 @@ AncientRemoveEmptyStaffContext = \context {
   autoCautionaries = #'()  
 
   printKeyCancellation = ##t
-  keyAccidentalOrder = #`(
+  keyAlterationOrder = #`(
     (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)
@@ -548,60 +567,53 @@ AncientRemoveEmptyStaffContext = \context {
   tablatureFormat = #fret-number-tablature-format
 
 %%
-  bassFigureFormatFunction = #format-bass-figure
+  figuredBassFormatter = #format-bass-figure
   metronomeMarkFormatter = #format-metronome-markup
   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.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.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  
-     ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
-
+    (Voice Stem direction ,UP)
+    (Voice Stem font-size -3)
+    (Voice NoteHead font-size -3)
+    (Voice Dots font-size -3)
+    (Voice Stem length-fraction 0.8)
     (Voice Stem no-stem-extend #t)
     (Voice Beam thickness 0.384)
-    (Voice Beam space-function ,(lambda (beam mult)
-                                (* 0.8 (Beam::space_function
-                                        beam mult))))
+    (Voice Beam length-fraction 0.8)
     (Voice Accidental font-size -4)
-    (Voice Slur direction -1)
+    (Voice Slur direction ,DOWN)
   )
 
   keepAliveInterfaces = #'(rhythmic-grob-interface lyric-interface percent-repeat-interface)
-  quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event)
+  quotedEventTypes = #'(note-event rest-event time-scaled-music tie-event beam-event)
   instrumentTransposition = #(ly:make-pitch 0 0 0)
 
   verticallySpacedContexts = #'(Staff)
+
+  hairpinToBarline = ##t 
+  
+  timing = ##t
 }
 
 
 
 
 \context {
-  \type "Engraver_group_engraver"
-  \name FiguredBass 
+  \type "Engraver_group"
+  \name "FiguredBass"
 
   \consists "Figured_bass_engraver"
-  \consists "Rest_swallow_translator"
   \consists "Note_swallow_translator"
   \consists "Skip_event_swallow_translator"
   \consists "Separating_line_group_engraver"
   \consists "Hara_kiri_engraver"
-  \override RemoveEmptyVerticalGroup #'remove-first = ##t
+
+  \override VerticalAxisGroup #'remove-empty = ##t
+  \override VerticalAxisGroup #'remove-first = ##t
+  \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.5 . 2.5)
 }
 
 \context {
   \name "Devnull"
-  \type "Engraver_group_engraver"
+  \type "Engraver_group"
 
 %% don't want to route anything out of here: 
   \alias "Staff"
@@ -613,6 +625,7 @@ AncientRemoveEmptyStaffContext = \context {
 \context {
   \Voice
   \name "TabVoice"
+  \alias "Voice"
   \consists "Tab_note_heads_engraver"
   \remove "Note_heads_engraver"
   \remove "Fingering_engraver"
@@ -620,17 +633,11 @@ AncientRemoveEmptyStaffContext = \context {
 
   \description "Context for drawing notes in a Tab staff. "
 
-  %% Draws all stems/beams out of the staff (and not in the middle of the staff !)
-  %% This feature is now disabled because most of the tab does not use it.
-  %%\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)))
+  \override Beam #'length-fraction = #0.62
 
   %% No accidental in tablature !
   \remove Accidental_engraver
@@ -751,10 +758,7 @@ AncientRemoveEmptyStaffContext = \context {
   \override Accidental #'style = #'vaticana
   \override Custos #'style = #'vaticana
   \override Custos #'neutral-position = #3
-  \override Custos #'neutral-direction = #-1
-
-  %% Score.timing = ##f
-  %% Score.barAlways = ##t
+  \override Custos #'neutral-direction = #DOWN
 }
 
 \context {
@@ -856,15 +860,13 @@ AncientRemoveEmptyStaffContext = \context {
   \override Accidental #'style = #'mensural
   \override Custos #'style = #'mensural
   \override Custos #'neutral-position = #3
-  \override Custos #'neutral-direction = #-1
-
-  %% Score.timing = ##f
-  %% Score.barAlways = ##t
+  \override Custos #'neutral-direction = #DOWN
 }
 
 
 RemoveEmptyRhythmicStaffContext= \context {
   \RhythmicStaff
   \remove "Axis_group_engraver"
+  \override VerticalAxisGroup #'remove-empty = ##t
   \consists "Hara_kiri_engraver"
 }