]> git.donarmstrong.com Git - lilypond.git/blobdiff - ly/engraver-init.ly
Merge branch 'master' of carldsorensen@git.sv.gnu.org:/srv/git/lilypond
[lilypond.git] / ly / engraver-init.ly
index 063b9b44f9a708c0743031f2df59858c1d28a669..9aae417aa8bf04819ea86c02a72990bd4d3977ee 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.10.0"
+\version "2.12.0"
 
 \context {
   \name "Global"
@@ -6,7 +6,7 @@
   \accepts "Score"
 
   \defaultchild "Score"
-  \description "Hard coded entry point for LilyPond. Cannot be tuned."
+  \description "Hard coded entry point for LilyPond.  Cannot be tuned."
   \grobdescriptions #all-grob-descriptions
 }
 
   \type "Engraver_group"
   \name "FretBoards"
 
-  \consists "Output_property_engraver" 
 
-  \consists "Axis_group_engraver" 
   \consists "Fretboard_engraver"
+  \consists "Rest_swallow_translator" 
+  \consists "Output_property_engraver" 
+  \consists "Skip_event_swallow_translator"
+  \consists "Hara_kiri_engraver"
   \consists "Separating_line_group_engraver"
   \consists "Font_size_engraver"
   \consists "Instrument_name_engraver"
+
+  predefinedDiagramTable = #fretboard-table
 }
 
 \context {
@@ -34,9 +38,9 @@
   %% with empty ones.
   
   \consists "Font_size_engraver"
-  \consists "Volta_engraver"
   \consists "Separating_line_group_engraver"   
   \consists "Dot_column_engraver"
+  \consists "Staff_collecting_engraver"
 
  %% perhaps move to Voice context?
   \consists "Ottava_spanner_engraver"
@@ -46,6 +50,7 @@
   \consists "Ledger_line_engraver" 
   \consists "Staff_symbol_engraver"
   \consists "Collision_engraver"
+  \consists "Grob_pq_engraver"
   \consists "Rest_collision_engraver"
   \consists "Accidental_engraver"
   \consists "Piano_pedal_engraver"
   \consists "Figured_bass_position_engraver"
   \consists "Script_row_engraver"
 
-  \override VerticalAxisGroup #'minimum-Y-extent = #'(-3.5 . 3.5)
   localKeySignature = #'()
   createSpacing = ##t
   ignoreFiguredBassRest = ##t 
+  \override VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4)
   
   %% explicitly set instrument, so we don't get 
   %% weird effects when doing instrument names for
 
 \context {
   \type "Engraver_group"
-  \name "InnerChoirStaff"
+  \name "ChoirStaff"
   \consists "System_start_delimiter_engraver"
   systemStartDelimiter = #'SystemStartBracket
   vocalName = #'()
   \accepts "PianoStaff"
   \accepts "Lyrics"
   \accepts "ChordNames"
+  \accepts "ChoirStaff"
+  \accepts "StaffGroup"
   \defaultchild "Staff"
-}
-
-\context {
-  \InnerChoirStaff
-  \name ChoirStaff
-  
-  \defaultchild "Staff"
-  \accepts "InnerChoirStaff"
-  \accepts "InnerStaffGroup"
   \description "Identical to @code{StaffGroup} except that the
 contained staves are not connected vertically."
-
 }
 
 \context{
@@ -152,7 +149,6 @@ contained staves are not connected vertically."
   
   \consists "Output_property_engraver"
   \consists "Font_size_engraver"
-  \consists "Volta_engraver"
   \consists "Separating_line_group_engraver"   
   \consists "Dot_column_engraver"
   \consists "Bar_engraver"
@@ -167,10 +163,8 @@ contained staves are not connected vertically."
   \accepts "CueVoice"
   \defaultchild "Voice"
 
-  \description  "
-    A context like @code{Staff} but for printing rhythms.  Pitches are
-    ignored; the notes are printed on one line.  
-"
+  \description "A context like @code{Staff} but for printing rhythms.
+Pitches are ignored; the notes are printed on one line."
 }
 
 
@@ -178,13 +172,12 @@ contained staves are not connected vertically."
   \type "Engraver_group"
   \name "Voice"
 
-  \description "
-    Corresponds to a voice on a staff.  This context handles the
-    conversion of dynamic signs, stems, beams, super- and subscripts,
-    slurs, ties, and rests.
+  \description "Corresponds to a voice on a staff.  This context
+handles the conversion of dynamic signs, stems, beams, super- and
+subscripts, slurs, ties, and rests.
 
-    You have to instantiate this explicitly if you want to have
-    multiple voices on the same staff."
+You have to instantiate this explicitly if you want to have
+multiple voices on the same staff."
 
   localKeySignature = #'()
   \consists "Font_size_engraver"
@@ -206,7 +199,8 @@ contained staves are not connected vertically."
   \consists "Note_heads_engraver"
   \consists "Dots_engraver"
   \consists "Rest_engraver"
-
+  \consists "Tweak_engraver"
+  
   %% switch on to make stem directions interpolate for the
   %% center line.
   %  \consists "Melody_engraver"
@@ -225,14 +219,17 @@ contained staves are not connected vertically."
   \consists "Part_combine_engraver"
 
   \consists "Text_engraver"
-  \consists "Dynamic_engraver"
+  \consists "New_dynamic_engraver"
+  \consists "Dynamic_align_engraver"
+%  \consists "Dynamic_engraver"
   \consists "Fingering_engraver"
-  \consists "Bend_after_engraver"
+  \consists "Bend_engraver"
 
   \consists "Script_engraver"
   \consists "Script_column_engraver"
   \consists "Rhythmic_column_engraver"
   \consists "Note_spacing_engraver"
+  \consists "Spanner_break_forbid_engraver"
   \consists "Phrasing_slur_engraver"
   \consists "Cluster_spanner_engraver"
   \consists "Slur_engraver"
@@ -251,6 +248,7 @@ contained staves are not connected vertically."
   fontSize = #-4
   \override Stem #'length-fraction = #(magstep -4)
   \override Beam #'length-fraction = #(magstep -4)
+  \override Beam #'thickness = #0.35
 }
 
 \context {
@@ -260,8 +258,6 @@ contained staves are not connected vertically."
 
   \description "A voice on a percussion staff."
   \remove "Arpeggio_engraver"
-  \consists "Multi_measure_rest_engraver"
-  \consists "Text_spanner_engraver"
   \consists "Grob_pq_engraver"
 
   \remove "Note_head_line_engraver"
@@ -274,7 +270,6 @@ contained staves are not connected vertically."
   \remove "Fingering_engraver"
 
   \remove "Cluster_spanner_engraver"
-  \consists "Tuplet_engraver"
 
   \consists "Skip_event_swallow_translator"
 }
@@ -284,15 +279,16 @@ contained staves are not connected vertically."
   \name GrandStaff
   localKeySignature = #'()
   
-  \description " A group of staffs, with a brace on the left
-    side, grouping the staves together.  The bar lines of the
-    contained staves are connected vertically.  "
+  \description "A group of staves, with a brace on the left
+side, grouping the staves together.  The bar lines of the
+contained staves are connected vertically."
 
   \consists "Span_bar_engraver"
   \consists "Span_arpeggio_engraver"
   \consists "System_start_delimiter_engraver"
   systemStartDelimiter = #'SystemStartBrace
 
+  \defaultchild "Staff"
   \accepts "Staff"
   \accepts "FiguredBass"
 }
@@ -302,14 +298,9 @@ contained staves are not connected vertically."
   \name "PianoStaff"
   \alias "GrandStaff"
 
-  \description
-  "Just like @code{GrandStaff} but with a forced distance between
-    the staves, so cross staff beaming and slurring can be used."
-  
-  \override VerticalAlignment #'forced-distance = #12
-  \override VerticalAlignment #'self-alignment-Y = #0
+  \description "Just like @code{GrandStaff} but with support for
+instrument names at the start of each system."
 
-  \consists "Vertical_align_engraver"
   \consists "Instrument_name_engraver"
   
   instrumentName = #'()
@@ -318,7 +309,7 @@ contained staves are not connected vertically."
 
 \context {
   \type "Engraver_group"
-  \name InnerStaffGroup
+  \name "StaffGroup"
 
   \consists "Span_bar_engraver"
   \consists "Span_arpeggio_engraver"
@@ -336,34 +327,27 @@ contained staves are not connected vertically."
   \accepts "TabStaff"  
   \accepts "Lyrics"
   \accepts "ChordNames"
-}
-
-\context {
-  \InnerStaffGroup
-  \name StaffGroup
-  
-  \description
-
-  "Groups staffs while adding a bracket on the left side, grouping
-the staves together.  The bar lines of the contained staves are
-connected vertically.  StaffGroup only consists of a collection of
-staffs, with a bracket in front and spanning bar lines. "
-  
-  \accepts "InnerChoirStaff"
-  \accepts "ChoirStaff"
-  \accepts "InnerStaffGroup"
   \accepts "FiguredBass"
+  \accepts "ChoirStaff"
+  \accepts "StaffGroup"
+  
+  \description "Groups staves while adding a bracket on the left
+side, grouping the staves together.  The bar lines of the contained
+staves are connected vertically.  @code{StaffGroup} only consists of
+a collection of staves, with a bracket in front and spanning bar lines."
 }
 
-
 \context{
   \type "Engraver_group"
   \override VerticalAxisGroup #'minimum-Y-extent = #'(-0.75 . 2.0)
 
-  \description " Corresponds to a voice with lyrics.  Handles the
-printing of a single line of lyrics.  "
+  \description "Corresponds to a voice with lyrics.  Handles the
+printing of a single line of lyrics."
+  
+  \name "Lyrics"
+  instrumentName = #'()
+  shortInstrumentName = #'()
   
-  \name "Lyrics" 
   \consists "Lyric_engraver"
   \consists "Extender_engraver"
   \consists "Hyphen_engraver"
@@ -372,8 +356,10 @@ printing of a single line of lyrics.  "
   \consists "Skip_event_swallow_translator"
   \consists "Font_size_engraver"
   \consists "Hara_kiri_engraver"
+
   \override VerticalAxisGroup #'remove-first = ##t
   \override VerticalAxisGroup #'remove-empty = ##t
+  \override VerticalAxisGroup #'keep-fixed-while-stretching = ##t
   \override SeparationItem #'padding = #0.2
   \override InstrumentName #'self-alignment-Y = ##f
 
@@ -405,8 +391,6 @@ printing of a single line of lyrics.  "
   \type "Engraver_group"
   \name ChordNames
   \description "Typesets chord names."
-
-  \consists "Volta_engraver"
   
   \consists "Rest_swallow_translator" 
   \consists "Output_property_engraver" 
@@ -415,9 +399,7 @@ printing of a single line of lyrics.  "
   \consists "Skip_event_swallow_translator"
   \consists "Hara_kiri_engraver"
 %  \consists "Note_spacing_engraver"
-  voltaOnThisStaff = ##f
   \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 2)
-  \override SeparatingGroupSpanner #'padding = #0.8
   \override VerticalAxisGroup #'remove-first = ##t
   \override VerticalAxisGroup #'remove-empty = ##t
 }
@@ -445,16 +427,15 @@ AncientRemoveEmptyStaffContext = \context {
   \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
-    that items such as clefs, time signatures, and key-signatures are
-    aligned across staves.
-
-    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{\layout} block) is processed."
+other context can contain a @code{Score} context.  This context
+handles the administration of time signatures.  It also makes sure
+that items such as clefs, time signatures, and key-signatures are
+aligned across staves.
 
+You cannot explicitly instantiate a @code{Score} context (since it
+is not contained in any other context).  It is instantiated
+automatically when an output definition (a @code{\score} or
+@code{\layout} block) is processed."
 
   \consists "Paper_column_engraver"
   \consists "Vertically_spaced_contexts_engraver"
@@ -467,7 +448,8 @@ AncientRemoveEmptyStaffContext = \context {
   \consists "Default_bar_line_engraver"
   \consists "Output_property_engraver"
   \consists "System_start_delimiter_engraver"
-  \consists "Mark_engraver"    
+  \consists "Mark_engraver"
+  \consists "Volta_engraver"
   \consists "Metronome_mark_engraver"  
   \consists "Break_align_engraver"
   \consists "Spacing_engraver"
@@ -475,7 +457,6 @@ AncientRemoveEmptyStaffContext = \context {
   \consists "Vertical_align_engraver"
   \consists "Stanza_number_align_engraver"
   \consists "Bar_number_engraver"
-  \consists "Tweak_engraver"
   \consists "Parenthesis_engraver"
   
   \defaultchild "Staff"
@@ -512,15 +493,24 @@ AncientRemoveEmptyStaffContext = \context {
   tieWaitForNote = ##f
   clefGlyph = #"clefs.G"
   clefPosition = #-2
+  middleCClefPosition = #-6
   middleCPosition = #-6
   firstClef = ##t
+
+  crescendoSpanner = #'hairpin
+  decrescendoSpanner = #'hairpin
   
   defaultBarType = #"|"
+  doubleRepeatType = #":|:"
   barNumberVisibility = #first-bar-number-invisible
   automaticBars = ##t
   
   explicitClefVisibility = #all-visible
   explicitKeySignatureVisibility = #all-visible
+  implicitTimeSignatureVisibility = #end-of-line-invisible
+  
+  repeatCountVisibility = #all-repeat-counts-visible
+  
   autoBeamSettings = #default-auto-beam-settings
   autoBeaming = ##t
   autoBeamCheck = #default-auto-beam-check
@@ -543,12 +533,12 @@ AncientRemoveEmptyStaffContext = \context {
   stringNumberOrientations = #'(up down)
   strokeFingerOrientations = #'(right)
   
+  lyricMelismaAlignment = #LEFT
   markFormatter = #format-mark-letters
   rehearsalMark = #1
   subdivideBeams = ##f
-  allowBeamBreak = ##f
   extraNatural = ##t
-  autoAccidentals = #'(Staff (same-octave . 0))
+  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0))
   autoCautionaries = #'()  
 
   printKeyCancellation = ##t
@@ -575,7 +565,8 @@ AncientRemoveEmptyStaffContext = \context {
 
   bassStaffProperties = #'((assign clefGlyph "clefs.F")
   (assign clefPosition 2)
-  (assign middleCPosition 6))
+  (assign middleCPosition 6)
+  (assign middleCClefPosition 6))
 %% tablature:
   stringOneTopmost = ##t
   highStringOne = ##t
@@ -588,6 +579,9 @@ AncientRemoveEmptyStaffContext = \context {
 %%
   figuredBassFormatter = #format-bass-figure
   metronomeMarkFormatter = #format-metronome-markup
+
+
+  %% See also make-voice-props-set
   graceSettings = #`(
     (Voice Stem direction ,UP)
     (Voice Stem font-size -3)
@@ -598,13 +592,22 @@ AncientRemoveEmptyStaffContext = \context {
     (Voice Beam thickness 0.384)
     (Voice Beam length-fraction 0.8)
     (Voice Accidental font-size -4)
+    (Voice AccidentalCautionary font-size -4)
     (Voice Slur direction ,DOWN)
+    (Voice Script font-size -3)
+    (Voice Fingering font-size -8)
+    (Voice StringNumber font-size -8)
   )
 
   keepAliveInterfaces = #'(
     rhythmic-grob-interface
     lyric-interface
-    percent-repeat-interface)
+    percent-repeat-item-interface
+    percent-repeat-interface
+
+    ;; need this, as stanza numbers are items, and appear only once. 
+    stanza-number-interface
+  )
   quotedEventTypes = #'(
     note-event
     rest-event
@@ -614,8 +617,6 @@ AncientRemoveEmptyStaffContext = \context {
   instrumentTransposition = #(ly:make-pitch 0 0 0)
 
   verticallySpacedContexts = #'(Staff)
-
-  hairpinToBarline = ##t 
   
   timing = ##t
 }
@@ -646,7 +647,8 @@ AncientRemoveEmptyStaffContext = \context {
   \alias "Staff"
   \alias "Voice"
   \consists "Swallow_engraver"
-  \description "Silently discards all musical information given to this context. "
+  \description "Silently discards all musical information given to this
+context."
 }
 
 \context {
@@ -660,7 +662,7 @@ AncientRemoveEmptyStaffContext = \context {
   \remove "Fingering_engraver"
   \remove "New_fingering_engraver"
 
-  \description "Context for drawing notes in a Tab staff. "
+  \description "Context for drawing notes in a Tab staff."
 
   %% TabStaff increase the staff-space, which in turn
   %% increases beam thickness and spacing; beams are
@@ -669,10 +671,13 @@ AncientRemoveEmptyStaffContext = \context {
   \override Beam #'length-fraction = #0.62
 
   %% No accidental in tablature !
-  \remove Accidental_engraver
+  \remove "Accidental_engraver"
 
   \override Glissando #'extra-dy = #0.75
-  \override Glissando #'gap = #0.2
+  \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
+                                                  (padding . 0.3))
+  \override Glissando #'bound-details #'left = #`((attach-dir . ,RIGHT)
+                                                  (padding . 0.3))
 }
 
 \context {
@@ -702,21 +707,23 @@ AncientRemoveEmptyStaffContext = \context {
   clefPosition = #0
 }
 
-%% TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
+%% TODO: Gregorian Chant contexts should be moved to gregorian.ly,
 %% but this does not work (is this a bug or intended behaviour?):
 %%
 %% If I try to do so, I get "error: unknown escaped string:
 %% `\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
+%% of gregorian.ly, then I get "error: parse error, unexpected
 %% TRANSLATOR: \context { \VaticanaStaff }" in
-%% gregorian-init.ly. --jr
+%% gregorian.ly. --jr
 
 \context {
   \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."
+  \description "Same as @code{Voice} context, except that it is
+accommodated for typesetting Gregorian Chant in the notational style
+of Editio Vaticana."
 
   \remove "Slur_engraver"
   \remove "Stem_engraver"
@@ -735,19 +742,12 @@ AncientRemoveEmptyStaffContext = \context {
 
   %% 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.1
-  \override TextSpanner #'enclose-bounds = #1
-  \override TextSpanner #'edge-text = #'("" . "")
 }
 
 \context {
@@ -758,7 +758,9 @@ AncientRemoveEmptyStaffContext = \context {
   \accepts "VaticanaVoice"
   \defaultchild "VaticanaVoice"
 
-  \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
+  \description "Same as @code{Staff} context, except that it is
+accommodated for typesetting Gregorian Chant in the notational style
+of Editio Vaticana."
 
   \remove "Time_signature_engraver"
   \consists "Custos_engraver"
@@ -777,11 +779,12 @@ AncientRemoveEmptyStaffContext = \context {
   %% Choose vaticana do clef on 3rd line as default.
   clefGlyph = #"clefs.vaticana.do"
   middleCPosition = #1
+  middleCClefPosition = #1
   clefPosition = #1
   clefOctavation = #0
 
   %% Select vaticana style font.
-  \override KeySignature #'style = #'vaticana
+  \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
   \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
   \override Custos #'style = #'vaticana
   \override Custos #'neutral-position = #3
@@ -793,7 +796,7 @@ AncientRemoveEmptyStaffContext = \context {
   \Voice
   \name "GregorianTranscriptionVoice"
   \alias "Voice"
-  
+
   %% Removing ligature bracket engraver without replacing it by some
   %% other ligature engraver would cause a "Junking event: `LigatureEvent'"
   %% warning for every "\[" and "\]".  Therefore, we make the grob
@@ -818,10 +821,7 @@ AncientRemoveEmptyStaffContext = \context {
   %%
   \override TextSpanner #'dash-fraction = #'()
   \override TextSpanner #'style = #'line
-  \override TextSpanner #'edge-height = #'(0 . 0)
   \override TextSpanner #'padding = #-0.1
-  \override TextSpanner #'enclose-bounds = #1
-  \override TextSpanner #'edge-text = #'("" . "")
 }
 
 \context {
@@ -842,14 +842,16 @@ AncientRemoveEmptyStaffContext = \context {
   \Voice
   \name "MensuralVoice"
   \alias "Voice"
-  \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting a piece in mensural style."
+  \description "Same as @code{Voice} context, except that it is
+accommodated for typesetting 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 = #'petrucci
+  \override NoteHead #'style = #'mensural
+  \override Rest #'style = #'mensural
 
   %% There are no beams in mensural notation.
   autoBeaming = ##f
@@ -862,7 +864,8 @@ AncientRemoveEmptyStaffContext = \context {
   \denies "Voice"
   \defaultchild "MensuralVoice"
   \accepts "MensuralVoice"
-  \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting a piece in mensural style."
+  \description "Same as @code{Staff} context, except that it is
+accommodated for typesetting a piece in mensural style."
 
   \consists "Custos_engraver"
 
@@ -876,15 +879,16 @@ AncientRemoveEmptyStaffContext = \context {
   %% 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"
+  %% Choose mensural g clef on 2nd line as default.
+  clefGlyph = #"clefs.mensural.g"
+  middleCClefPosition = #-6
   middleCPosition = #-6
   clefPosition = #-2
   clefOctavation = #0
 
   %% Select mensural style font.
   \override TimeSignature #'style = #'mensural
-  \override KeySignature #'style = #'mensural
+  \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
   \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
   \override Custos #'style = #'mensural
   \override Custos #'neutral-position = #3
@@ -893,8 +897,8 @@ AncientRemoveEmptyStaffContext = \context {
   %% Accidentals are valid only once (same as
   %% #(set-accidental-style 'forget))
   extraNatural = ##f
-  autoAccidentals = #'(Staff (same-octave . -1))
-  autoCautionaries = #'()  
+  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
+  autoCautionaries = #'()
   printKeyCancellation = ##f
 }