]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
Issue 1773: move Footnote_engraver to Score context
[lilypond.git] / ly / engraver-init.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 %%%%                          Jan Nieuwenhuizen <janneke@gnu.org>
5 %%%%
6 %%%% LilyPond is free software: you can redistribute it and/or modify
7 %%%% it under the terms of the GNU General Public License as published by
8 %%%% the Free Software Foundation, either version 3 of the License, or
9 %%%% (at your option) any later version.
10 %%%%
11 %%%% LilyPond is distributed in the hope that it will be useful,
12 %%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
13 %%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 %%%% GNU General Public License for more details.
15 %%%%
16 %%%% You should have received a copy of the GNU General Public License
17 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 \version "2.15.39"
20
21 \context {
22   \name "Global"
23
24   \accepts "Score"
25
26   \defaultchild "Score"
27   \description "Hard coded entry point for LilyPond.  Cannot be tuned."
28   \grobdescriptions #all-grob-descriptions
29   EventClasses = #all-event-classes
30 }
31
32 \context {
33   \type "Engraver_group"
34   \name "FretBoards"
35   \description "A context for displaying fret diagrams."
36
37   \consists "Fretboard_engraver"
38   \consists "Output_property_engraver"
39   \consists "Hara_kiri_engraver"
40   \consists "Separating_line_group_engraver"
41   \consists "Font_size_engraver"
42   \consists "Instrument_name_engraver"
43
44   %% explicitly set instrument, so it is not inherited from the parent
45   instrumentName = #'()
46   shortInstrumentName = #'()
47
48   predefinedDiagramTable = #default-fret-table
49   handleNegativeFrets = #'recalculate
50   restrainOpenStrings = ##f
51 }
52
53 \context {
54   \type "Engraver_group"
55   \name "Staff"
56
57   \consists "Output_property_engraver"
58   \consists "Bar_engraver"
59   \consists "Pure_from_neighbor_engraver"
60   %% Bar_engraver must be first so default bars aren't overwritten
61   %% with empty ones.
62
63   \consists "Font_size_engraver"
64   \consists "Separating_line_group_engraver"
65   \consists "Dot_column_engraver"
66   \consists "Staff_collecting_engraver"
67
68  %% perhaps move to Voice context?
69   \consists "Ottava_spanner_engraver"
70   \consists "Clef_engraver"
71   \consists "Key_engraver"
72   \consists "Time_signature_engraver"
73   \consists "Ledger_line_engraver"
74   \consists "Staff_symbol_engraver"
75   \consists "Collision_engraver"
76   \consists "Grob_pq_engraver"
77   \consists "Rest_collision_engraver"
78   \consists "Accidental_engraver"
79   \consists "Piano_pedal_engraver"
80   \consists "Piano_pedal_align_engraver"
81   \consists "Instrument_name_engraver"
82   \consists "Axis_group_engraver"
83   \consists "Figured_bass_engraver"
84   \consists "Figured_bass_position_engraver"
85   \consists "Script_row_engraver"
86   \consists "Cue_clef_engraver"
87
88   localKeySignature = #'()
89   createSpacing = ##t
90   ignoreFiguredBassRest = ##f
91
92   %% explicitly set instrument, so we don't get
93   %% weird effects when doing instrument names for
94   %% piano staves
95   instrumentName = #'()
96   shortInstrumentName = #'()
97
98   \defaultchild "Voice"
99   \accepts "Voice"
100   \accepts "CueVoice"
101
102   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
103 @code{Voice} contexts."
104
105 }
106
107 \context {
108   \Staff
109   \type "Engraver_group"
110   \name "DrumStaff"
111   \alias "Staff"
112
113   \remove "Accidental_engraver"
114   \remove "Ottava_spanner_engraver"
115   \remove "Key_engraver"
116   \remove "Piano_pedal_engraver"
117
118   \description "Handles typesetting for percussion."
119
120   \denies "Voice"
121   \accepts "DrumVoice"
122   \defaultchild "DrumVoice"
123
124   clefGlyph = #"clefs.percussion"
125   clefPosition = #0
126   \override Script #'staff-padding = #0.75
127 }
128
129
130 \context {
131   \type "Engraver_group"
132   \name "ChoirStaff"
133   \consists "Vertical_align_engraver"
134   topLevelAlignment = ##f
135
136   \consists "Instrument_name_engraver"
137   \consists "System_start_delimiter_engraver"
138   systemStartDelimiter = #'SystemStartBracket
139   %% explicitly set instrument, so it is not inherited from the parent
140   instrumentName = #'()
141   shortInstrumentName = #'()
142   vocalName = #'()
143   shortVocalName = #'()
144
145   \accepts "Staff"
146   \accepts "DrumStaff"
147   \accepts "RhythmicStaff"
148   \accepts "GrandStaff"
149   \accepts "PianoStaff"
150   \accepts "Lyrics"
151   \accepts "ChordNames"
152   \accepts "FiguredBass"
153   \accepts "ChoirStaff"
154   \accepts "StaffGroup"
155   \defaultchild "Staff"
156   \description "Identical to @code{StaffGroup} except that the
157 contained staves are not connected vertically."
158 }
159
160 \context{
161   \type "Engraver_group"
162
163   localKeySignature = #'()
164   createSpacing = ##t
165
166   squashedPosition = #0
167   \name RhythmicStaff
168   \alias "Staff"
169
170   \override BarLine #'bar-extent = #'(-2 . 2)
171   \override VoltaBracket #'staff-padding = #3
172   \override StaffSymbol #'line-count = #1
173
174   \override Stem  #'neutral-direction = #UP
175   \override Beam  #'neutral-direction = #UP
176
177   \consists "Output_property_engraver"
178   \consists "Font_size_engraver"
179   \consists "Separating_line_group_engraver"
180   \consists "Dot_column_engraver"
181   \consists "Bar_engraver"
182   \consists "Staff_symbol_engraver"
183   \consists "Pitch_squash_engraver"
184   \consists "Time_signature_engraver"
185   \consists "Instrument_name_engraver"
186   \consists "Axis_group_engraver"
187   \consists "Ledger_line_engraver"
188
189   %% explicitly set instrument, so it is not inherited from the parent
190   instrumentName = #'()
191   shortInstrumentName = #'()
192
193   \accepts "Voice"
194   \accepts "CueVoice"
195   \defaultchild "Voice"
196
197   \description "A context like @code{Staff} but for printing rhythms.
198 Pitches are ignored; the notes are printed on one line."
199 }
200
201
202 \context {
203   \type "Engraver_group"
204   \name "Voice"
205
206   \description "Corresponds to a voice on a staff.  This context
207 handles the conversion of dynamic signs, stems, beams, super- and
208 subscripts, slurs, ties, and rests.
209
210 You have to instantiate this explicitly if you want to have
211 multiple voices on the same staff."
212
213   \consists "Font_size_engraver"
214
215   \consists "Pitched_trill_engraver"
216   \consists "Output_property_engraver"
217   \consists "Arpeggio_engraver"
218   \consists "Multi_measure_rest_engraver"
219   \consists "Text_spanner_engraver"
220   \consists "Trill_spanner_engraver"
221   \consists "Grob_pq_engraver"
222   \consists "Forbid_line_break_engraver"
223   \consists "Laissez_vibrer_engraver"
224   \consists "Repeat_tie_engraver"
225   \consists "Note_head_line_engraver"
226   \consists "Glissando_engraver"
227   \consists "Ligature_bracket_engraver"
228   \consists "Breathing_sign_engraver"
229   \consists "Note_heads_engraver"
230   \consists "Dots_engraver"
231   \consists "Rest_engraver"
232   \consists "Tweak_engraver"
233
234   %% switch on to make stem directions interpolate for the
235   %% center line.
236   %  \consists "Melody_engraver"
237
238   \consists "Stem_engraver"
239   \consists "Beam_engraver"
240   \consists "Grace_beam_engraver"
241   \consists "Auto_beam_engraver"
242
243   %% must come before Script_column_engraver.
244   \consists "New_fingering_engraver"
245
246   \consists "Chord_tremolo_engraver"
247   \consists "Double_percent_repeat_engraver"
248   \consists "Percent_repeat_engraver"
249   \consists "Slash_repeat_engraver"
250   \consists "Part_combine_engraver"
251
252   \consists "Text_engraver"
253   \consists "New_dynamic_engraver"
254   \consists "Dynamic_align_engraver"
255 %  \consists "Dynamic_engraver"
256   \consists "Fingering_engraver"
257   \consists "Bend_engraver"
258
259   \consists "Script_engraver"
260   \consists "Script_column_engraver"
261   \consists "Rhythmic_column_engraver"
262   \consists "Note_spacing_engraver"
263   \consists "Spanner_break_forbid_engraver"
264   \consists "Phrasing_slur_engraver"
265   \consists "Cluster_spanner_engraver"
266   \consists "Slur_engraver"
267   \consists "Tie_engraver"
268   \consists "Tuplet_engraver"
269   \consists "Grace_engraver"
270   \consists "Instrument_switch_engraver"
271 }
272
273 \context{
274   \Voice
275
276   \name CueVoice
277   \alias Voice
278   fontSize = #-4
279   \override Stem #'length-fraction = #(magstep -4)
280   \override Beam #'length-fraction = #(magstep -4)
281   \override Beam #'beam-thickness = #0.35
282 }
283
284 \context {
285   \Voice
286   \name DrumVoice
287   \alias Voice
288
289   \description "A voice on a percussion staff."
290   \remove "Arpeggio_engraver"
291   \consists "Grob_pq_engraver"
292
293   \remove "Note_head_line_engraver"
294   \remove "Glissando_engraver"
295   \remove "Ligature_bracket_engraver"
296   \remove "Note_heads_engraver"
297   \consists "Drum_notes_engraver"
298   \remove "New_fingering_engraver"
299
300   \remove "Fingering_engraver"
301
302   \remove "Cluster_spanner_engraver"
303 }
304
305 \context{
306   \type "Engraver_group"
307   \name GrandStaff
308   localKeySignature = #'()
309
310   \description "A group of staves, with a brace on the left
311 side, grouping the staves together.  The bar lines of the
312 contained staves are connected vertically."
313
314   \consists "Instrument_name_engraver"
315   \consists "Span_bar_engraver"
316   \consists "Span_bar_stub_engraver"
317   \consists "Span_arpeggio_engraver"
318   \consists "System_start_delimiter_engraver"
319   \consists "Vertical_align_engraver"
320   systemStartDelimiter = #'SystemStartBrace
321   topLevelAlignment = ##f
322   %% explicitly set instrument, so it is not inherited from the parent
323   instrumentName = #'()
324   shortInstrumentName = #'()
325
326   \defaultchild "Staff"
327   \accepts "Staff"
328   \accepts "RhythmicStaff"
329   \accepts "DrumStaff"
330   \accepts "TabStaff"
331   \accepts "Lyrics"
332   \accepts "FiguredBass"
333   \accepts "Dynamics"
334   \accepts "ChordNames"
335 }
336
337 \context{
338   \GrandStaff
339   \name "PianoStaff"
340   \alias "GrandStaff"
341
342   \description "Just like @code{GrandStaff}, but the staves are only removed
343 together, never separately."
344
345   \consists "Vertical_align_engraver"
346   \consists "Keep_alive_together_engraver"
347   topLevelAlignment = ##f
348
349   instrumentName = #'()
350   shortInstrumentName = #'()
351 }
352
353 \context {
354   \type "Engraver_group"
355   \name "StaffGroup"
356
357   \consists "Vertical_align_engraver"
358   topLevelAlignment = ##f
359
360   \consists "Instrument_name_engraver"
361   \consists "Span_bar_engraver"
362   \consists "Span_bar_stub_engraver"
363   \consists "Span_arpeggio_engraver"
364   \consists "Output_property_engraver"
365   systemStartDelimiter = #'SystemStartBracket
366   %% explicitly set instrument, so it is not inherited from the parent
367   instrumentName = #'()
368   shortInstrumentName = #'()
369
370   \consists "System_start_delimiter_engraver"
371
372   \defaultchild "Staff"
373   \accepts "Staff"
374   \accepts "RhythmicStaff"
375   \accepts "DrumStaff"
376   \accepts "GrandStaff"
377   \accepts "PianoStaff"
378   \accepts "TabStaff"
379   \accepts "Lyrics"
380   \accepts "ChordNames"
381   \accepts "FiguredBass"
382   \accepts "ChoirStaff"
383   \accepts "StaffGroup"
384
385   \description "Groups staves while adding a bracket on the left
386 side, grouping the staves together.  The bar lines of the contained
387 staves are connected vertically.  @code{StaffGroup} only consists of
388 a collection of staves, with a bracket in front and spanning bar lines."
389 }
390
391 \context {
392   \type "Engraver_group"
393   \name Dynamics
394   \alias Voice
395   \consists "Output_property_engraver"
396   \consists "Bar_engraver"
397   \consists "Piano_pedal_engraver"
398   \consists "Script_engraver"
399   \consists "New_dynamic_engraver"
400   \consists "Dynamic_align_engraver"
401   \consists "Text_engraver"
402   \consists "Text_spanner_engraver"
403   \consists "Axis_group_engraver"
404   \consists "Tweak_engraver"
405
406   pedalSustainStrings = #'("Ped." "*Ped." "*")
407   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
408   \override VerticalAxisGroup #'staff-affinity = #CENTER
409   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
410     #'((basic-distance . 5)
411        (padding . 0.5))
412   \override TextScript #'font-shape = #'italic
413   \override DynamicLineSpanner #'Y-offset = #0
414   \override DynamicText #'X-offset =
415   #(ly:make-simple-closure
416     `(,+
417       ,(ly:make-simple-closure
418          (list ly:self-alignment-interface::centered-on-note-columns))
419       ,(ly:make-simple-closure
420         (list ly:self-alignment-interface::x-aligned-on-self))))
421
422   \description "Holds a single line of dynamics, which will be
423 centered between the staves surrounding this context."
424 }
425
426
427 \context{
428   \type "Engraver_group"
429
430   \description "Corresponds to a voice with lyrics.  Handles the
431 printing of a single line of lyrics."
432
433   \name "Lyrics"
434   \consists "Lyric_engraver"
435   \consists "Extender_engraver"
436   \consists "Hyphen_engraver"
437   \consists "Tweak_engraver"
438   \consists "Stanza_number_engraver"
439   \consists "Instrument_name_engraver"
440   \consists "Font_size_engraver"
441   \consists "Hara_kiri_engraver"
442   \consists "Pure_from_neighbor_engraver"
443   searchForVoice = ##f
444   %% explicitly set instrument, so it is not inherited from the parent
445   instrumentName = #'()
446   shortInstrumentName = #'()
447
448   \override VerticalAxisGroup #'remove-first = ##t
449   \override VerticalAxisGroup #'remove-empty = ##t
450   \override VerticalAxisGroup #'staff-affinity = #UP
451   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
452     #'((basic-distance . 5.5)
453        (padding . 0.5)
454        (stretchability . 1))
455   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
456      #'((basic-distance . 0)
457         (minimum-distance . 2.8)
458         (padding . 0.2)
459         (stretchability . 0))
460   \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = #1.5
461   \override InstrumentName #'self-alignment-Y = ##f
462
463   %% sync with define-grobs.scm ;
464   \override InstrumentName #'font-size = #1.0
465
466   %% make sure that barlines aren't collapsed, when
467   %% Bar_engraver is there.
468   \override BarLine #'bar-extent = #'(-0.05 . 0.05)
469
470 }
471
472 \context {
473   \type "Engraver_group"
474   \name NoteNames
475   \description "A context for printing the names of notes."
476   \consists "Axis_group_engraver"
477
478   \override VerticalAxisGroup #'staff-affinity = #UP
479   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
480     #'((basic-distance . 0)
481        (minimum-distance . 2.8)
482        (padding . 0.2)
483        (stretchability . 0))
484   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
485     #'((basic-distance . 5.5)
486        (padding . 0.5)
487        (stretchability . 1))
488   \override VerticalAxisGroup
489     #'nonstaff-unrelatedstaff-spacing #'padding = 1.5
490
491   \consists "Tie_engraver"
492   \consists "Note_name_engraver"
493   \consists "Separating_line_group_engraver"
494 }
495
496 \context {
497   \type "Engraver_group"
498   \name ChordNames
499   \description "Typesets chord names."
500
501   \consists "Output_property_engraver"
502   \consists "Separating_line_group_engraver"
503   \consists "Chord_name_engraver"
504   \consists "Hara_kiri_engraver"
505 %  \consists "Note_spacing_engraver"
506   \override VerticalAxisGroup #'remove-first = ##t
507   \override VerticalAxisGroup #'remove-empty = ##t
508   \override VerticalAxisGroup #'staff-affinity = #DOWN
509   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
510   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
511 }
512
513 \context {
514   \type "Score_engraver"
515   \name "Score"
516
517   \description "This is the top level notation context.  No
518 other context can contain a @code{Score} context.  This context
519 handles the administration of time signatures.  It also makes sure
520 that items such as clefs, time signatures, and key-signatures are
521 aligned across staves.
522
523 You cannot explicitly instantiate a @code{Score} context (since it
524 is not contained in any other context).  It is instantiated
525 automatically when an output definition (a @code{\score} or
526 @code{\layout} block) is processed."
527
528   \consists "Paper_column_engraver"
529   \consists "Repeat_acknowledge_engraver"
530   \consists "Staff_collecting_engraver"
531
532   \alias "Timing"
533
534   %% An alias for Timing is established by the Timing_translator in
535   %% whatever context it is initialized, and the timing variables are
536   %% then copied from wherever Timing had been previously established.
537   %% The alias at Score level provides a target for initializing
538   %% Timing variables in layout definitions before any
539   %% Timing_translator has been run.
540
541   % timing translator must come BEFORE bar number engraver
542   \consists "Timing_translator"
543   \consists "Default_bar_line_engraver"
544   \consists "Output_property_engraver"
545   \consists "System_start_delimiter_engraver"
546   \consists "Mark_engraver"
547   \consists "Volta_engraver"
548   \consists "Metronome_mark_engraver"
549   \consists "Break_align_engraver"
550   \consists "Spacing_engraver"
551   \consists "Grace_spacing_engraver"
552   \consists "Vertical_align_engraver"
553   \consists "Stanza_number_align_engraver"
554   \consists "Bar_number_engraver"
555   \consists "Parenthesis_engraver"
556   \consists "Concurrent_hairpin_engraver"
557   \consists "Beam_collision_engraver"
558   \consists "Footnote_engraver"
559
560   \defaultchild "Staff"
561
562   \accepts "FretBoards"
563   \accepts "Staff"
564   \accepts "RhythmicStaff"
565   \accepts "TabStaff"
566   \accepts "VaticanaStaff"
567   \accepts "GregorianTranscriptionStaff"
568   \accepts "MensuralStaff"
569   \accepts "PetrucciStaff"
570   \accepts "StaffGroup"
571   \accepts "DrumStaff"
572   \accepts "KievanStaff"
573   \accepts "Lyrics"
574   \accepts "ChordNames"
575   \accepts "GrandStaff"
576   \accepts "ChoirStaff"
577   \accepts "PianoStaff"
578   \accepts "Devnull"
579   \accepts "NoteNames"
580   \accepts "FiguredBass"
581
582   noteToFretFunction = #determine-frets
583   predefinedDiagramTable = ##f
584   soloText = #"Solo"
585   soloIIText = #"Solo II"
586   aDueText = #"a2"
587   printPartCombineTexts = ##t
588   partCombineTextsOnNote = ##t
589   systemStartDelimiter =#'SystemStartBar
590
591   drumStyleTable = #drums-style
592
593   melismaBusyProperties = #default-melisma-properties
594   tieWaitForNote = ##f
595   clefGlyph = #"clefs.G"
596   clefPosition = #-2
597   middleCClefPosition = #-6
598   middleCPosition = #-6
599   firstClef = ##t
600
601   crescendoSpanner = #'hairpin
602   decrescendoSpanner = #'hairpin
603
604   defaultBarType = #"|"
605   doubleRepeatType = #":|:"
606   startRepeatType = #"|:"
607   endRepeatType = #":|"
608   barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
609   barNumberFormatter = #robust-bar-number-function
610   automaticBars = ##t
611
612   explicitClefVisibility = #all-visible
613   explicitCueClefVisibility = #end-of-line-invisible
614   explicitKeySignatureVisibility = #all-visible
615   implicitTimeSignatureVisibility = #end-of-line-invisible
616
617   repeatCountVisibility = #all-repeat-counts-visible
618
619   timeSignatureSettings = #default-time-signature-settings
620   timeSignatureFraction = 4/4
621
622 %% These defaults should be the same as the rules established in
623 %%   scm/time-signature-settings.scm for 4/4 time
624   measureLength = #(ly:make-moment 4 4)
625   baseMoment = #(ly:make-moment 1  4)
626   beatStructure = #'(1 1 1 1)
627   beamExceptions = #'((end . (((1 . 8) . (4 4))
628                               ((1 . 12) . (3 3 3 3)))))
629   beamWholeMeasure = ##t
630   beamHalfMeasure = ##f
631
632   autoBeaming = ##t
633   autoBeamCheck = #default-auto-beam-check
634
635   scriptDefinitions = #default-script-alist
636
637   pedalSustainStrings = #'("Ped." "*Ped." "*")
638   pedalSustainStyle = #'text
639   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
640   pedalUnaCordaStyle = #'text
641
642 %% These are in ordinary italic font, including the *,
643 %% but they are unlikely to be used,
644 %% as the default pedal-style for SostenutoPedal is 'mixed':
645 %% i.e.  Sost. Ped_____________________
646   pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
647   pedalSostenutoStyle = #'mixed
648
649   harmonicAccidentals = ##t
650   fingeringOrientations = #'(up down)
651   stringNumberOrientations = #'(up down)
652   strokeFingerOrientations = #'(right)
653
654   lyricMelismaAlignment = #LEFT
655   markFormatter = #format-mark-letters
656   rehearsalMark = #1
657   subdivideBeams = ##f
658   extraNatural = ##t
659   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0))
660   autoCautionaries = #'()
661
662   printKeyCancellation = ##t
663   keyAlterationOrder = #`(
664     (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
665     (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
666     (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
667     (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (1 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
668   )
669
670   barCheckSynchronize = ##f
671
672 %% chord names:
673   chordNameFunction = #ignatzek-chord-names
674   minorChordModifier = #(make-simple-markup "m")
675   additionalPitchPrefix = #"" % was "add"
676   majorSevenSymbol = #whiteTriangleMarkup
677   chordNameLowercaseMinor = ##f
678   chordNameSeparator = #(make-hspace-markup 0.5)
679   slashChordSeparator = #(make-simple-markup "/")
680   chordNameExceptions = #ignatzekExceptions
681   chordNoteNamer = #'()
682   chordRootNamer = #note-name->markup
683   chordPrefixSpacer = #0
684   chordNameExceptionsFull = #fullJazzExceptions
685   chordNameExceptionsPartial = #partialJazzExceptions
686   noChordSymbol = #(make-simple-markup "N.C.")
687
688   bassStaffProperties = #'((assign clefGlyph "clefs.F")
689   (assign clefPosition 2)
690   (assign middleCPosition 6)
691   (assign middleCClefPosition 6))
692 %% tablature:
693   stringOneTopmost = ##t
694   highStringOne = ##t
695
696 %% One may change the string tunings as follows :
697 %% The length of the list must be equal to the number of strings
698   stringTunings = #guitar-tuning
699   tablatureFormat = #fret-number-tablature-format
700   tabStaffLineLayoutFunction = #tablature-position-on-lines
701
702 %%
703   figuredBassFormatter = #format-bass-figure
704   metronomeMarkFormatter = #format-metronome-markup
705
706
707   %% See also make-voice-props-set
708   graceSettings = #`(
709     (Voice Stem direction ,UP)
710     (Voice Stem font-size -3)
711     (Voice Flag font-size -3)
712     (Voice NoteHead font-size -3)
713     (Voice TabNoteHead font-size -4)
714     (Voice Dots font-size -3)
715     (Voice Stem length-fraction 0.8)
716     (Voice Stem no-stem-extend #t)
717     (Voice Beam beam-thickness 0.384)
718     (Voice Beam length-fraction 0.8)
719     (Voice Accidental font-size -4)
720     (Voice AccidentalCautionary font-size -4)
721     (Voice Slur direction ,DOWN)
722     (Voice Script font-size -3)
723     (Voice Fingering font-size -8)
724     (Voice StringNumber font-size -8)
725   )
726
727   keepAliveInterfaces = #'(
728     bass-figure-interface
729     chord-name-interface
730     cluster-beacon-interface
731     fret-diagram-interface
732     lyric-syllable-interface
733     note-head-interface
734     tab-note-head-interface
735     lyric-interface
736     percent-repeat-item-interface
737     percent-repeat-interface
738
739     ;; need this, as stanza numbers are items, and appear only once.
740     stanza-number-interface
741   )
742   % \quoteDuring is supposed to quote everything, cueDuring only the essentials
743   quotedEventTypes = #'(StreamEvent)
744   quotedCueEventTypes = #'(
745     note-event
746     rest-event
747     tie-event
748     beam-event
749     tuplet-span-event)
750   instrumentTransposition = #(ly:make-pitch 0 0 0)
751
752   topLevelAlignment = ##t
753
754   timing = ##t
755 }
756
757
758
759
760 \context {
761   \type "Engraver_group"
762   \name "FiguredBass"
763   \description "A context for printing a figured bass line."
764
765   \consists "Figured_bass_engraver"
766   \consists "Separating_line_group_engraver"
767   \consists "Hara_kiri_engraver"
768
769   \override VerticalAxisGroup #'remove-empty = ##t
770   \override VerticalAxisGroup #'remove-first = ##t
771   \override VerticalAxisGroup #'staff-affinity = #UP
772   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
773   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
774 }
775
776 \context {
777   \name "Devnull"
778   \type "Engraver_group"
779
780 %% don't want to route anything out of here:
781   \alias "Staff"
782   \alias "Voice"
783   \description "Silently discards all musical information given to this
784 context."
785 }
786
787 \context {
788   \Voice
789   \name "TabVoice"
790   \alias "Voice"
791   \consists "Tab_note_heads_engraver"
792   \consists "Tab_tie_follow_engraver"
793
794   \remove "Note_heads_engraver"
795   \remove "Fingering_engraver"
796   \remove "New_fingering_engraver"
797   \remove "Pitched_trill_engraver"
798
799   \description "Context for drawing notes in a Tab staff."
800
801   %% TabStaff increase the staff-space, which in turn
802   %% increases beam thickness and spacing; beams are
803   %% too big. We have to adjust the beam settings:
804   \override Beam #'beam-thickness = #0.32
805   \override Beam #'length-fraction = #0.62
806   %% the same goes for tremolo beams
807   \override StemTremolo #'beam-thickness = #0.32
808   %% NOTE: in lily/stem-tremolo.cc, we have length-fraction = 1,
809   %% and the tablature staff space is scaled (1.5 by default),
810   %% so we use the inversion of the scale factor:
811   \override StemTremolo #'length-fraction = #(lambda (grob)
812                                                (/ 1 (ly:staff-symbol-staff-space grob)))
813   \override StemTremolo #'beam-width = #stem-tremolo::calc-tab-width
814
815   %% No accidental in tablature !
816   \remove "Accidental_engraver"
817   %% make the Stems as short as possible to minimize their influence
818   %% on the slur::calc-control-points routine
819   \override Stem #'no-stem-extend = ##t
820   \override Flag #'style = #'no-flag
821   \override Stem #'details = #'((lengths 0 0 0 0 0 0)
822                                 (beamed-lengths 0 0 0)
823                                 (beamed-minimum-free-lengths 0 0 0)
824                                 (beamed-extreme-minimum-free-lengths 0 0)
825                                 (stem-shorten 0 0))
826   %% after all, the stubs of the stems may still be visible, so ...
827   \override Stem #'stencil = ##f
828   \override Flag #'stencil = ##f
829   %% automatic beams should be suppressed for similar reasons ...
830   autoBeaming = ##f
831   %% remove beams, dots and rests ...
832   \override Beam #'stencil = ##f
833   \override StemTremolo #'stencil = ##f
834   \override Dots #'stencil = ##f
835   \override Rest #'stencil = ##f
836   \override MultiMeasureRest #'stencil = ##f
837   \override MultiMeasureRestNumber #'stencil = ##f
838   \override MultiMeasureRestText #'stencil = ##f
839   %% ... all kinds of ties/slurs
840   \override Tie  #'stencil = ##f
841   \override RepeatTie #'stencil = ##f
842   \override LaissezVibrerTie #'stencil = ##f
843   \override Slur #'stencil = #slur::draw-tab-slur
844   \override PhrasingSlur #'stencil = ##f
845   %% 'tied to' fret numbers become invisible or parenthesized, respectively)
846   \override Tie #'after-line-breaking = #tie::handle-tab-note-head
847   \override RepeatTie #'after-line-breaking = #repeat-tie::handle-tab-note-head
848   %% ... and all kinds of markups, spanners etc.
849   \override TupletBracket #'stencil = ##f
850   \override TupletNumber #'stencil = ##f
851   \override DynamicText #'stencil = ##f
852   \override DynamicTextSpanner #'stencil = ##f
853   \override TextSpanner #'stencil = ##f
854   \override Hairpin #'stencil = ##f
855   \override Script #'stencil = ##f
856   \override TextScript #'stencil = ##f
857   \override Glissando #'stencil = #glissando::draw-tab-glissando
858   %% the direction for glissando lines will be automatically corrected
859   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
860   \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
861                                                    (padding . 0.3))
862   \override Glissando #'bound-details #'left = #`((attach-dir . ,RIGHT)
863                                                    (padding . 0.3))
864   %% dead notes
865   \override TabNoteHead #'glyph-name = #tab-note-head::calc-glyph-name
866   \override TabNoteHead #'stencil = #tab-note-head::whiteout-if-style-set
867 }
868
869 \context {
870   \Staff
871   \alias "Staff"
872   \name "TabStaff"
873   \denies "Voice"
874   \consists "Tab_staff_symbol_engraver"
875
876   \description "Context for generating tablature. It accepts only @code{TabVoice}
877 contexts and handles the line spacing, the tablature clef etc. properly."
878
879   \accepts "TabVoice"
880   \defaultchild "TabVoice"
881
882   %% 6 strings, bigger spacing
883   \override StaffSymbol #'staff-space = #1.5
884
885   %% Don't draw stems over the tablature figures !
886   \override Stem #'avoid-note-head = ##t
887
888   %% No accidental in tablature !
889   \remove "Accidental_engraver"
890   \remove "Key_engraver"
891
892   \remove "Ottava_spanner_engraver"
893   %% the clef handler
894   \override Clef #'stencil = #clef::print-modern-tab-if-set
895   %% no time signature
896   \override TimeSignature #'stencil = ##f
897   %% no arpeggios
898   \override Arpeggio #'stencil = ##f
899   %% we ignore collision warnings that may occur due to
900   %% stem overlapping, because we have no stems ;-)
901   \override NoteColumn #'ignore-collision = ##t
902   %% Special "TAB" clef
903   clefGlyph = #"clefs.tab"
904   clefPosition = #0
905   %% Change string if note results in negative fret number
906   handleNegativeFrets = #'recalculate
907   %% Allow open strings even if minimumFret is set
908   restrainOpenStrings = ##f
909 }
910
911 \context {
912   \Voice
913   \name "VaticanaVoice"
914   \alias "Voice"
915   \description "Same as @code{Voice} context, except that it is
916 accommodated for typesetting Gregorian Chant in the notational style
917 of Editio Vaticana."
918
919   \remove "Slur_engraver"
920   \remove "Stem_engraver"
921   \remove "Ligature_bracket_engraver"
922   \consists "Vaticana_ligature_engraver"
923   \remove "Text_spanner_engraver"
924   \consists "Episema_engraver"
925
926   %% Set default head for notes outside of \[ \].
927   \override NoteHead #'style = #'vaticana.punctum
928
929   %% Put some space before and after divisiones.
930   %% FIXME: This does not seem to show any effect.
931   \override Script #'padding = #0.5
932
933   %% There are no beams in Gregorian Chant notation.
934   autoBeaming = ##f
935 }
936
937 \context {
938   \Staff
939   \name "VaticanaStaff"
940   \alias "Staff"
941   \denies "Voice"
942   \accepts "VaticanaVoice"
943   \defaultchild "VaticanaVoice"
944
945   \description "Same as @code{Staff} context, except that it is
946 accommodated for typesetting Gregorian Chant in the notational style
947 of Editio Vaticana."
948
949   \remove "Time_signature_engraver"
950   \consists "Custos_engraver"
951
952   %% We can not remove Bar_engraver; otherwise clefs and custodes will
953   %% not show up any more among other line breaking issues.
954   %% Instead, we make the grob transparent.
955   \override BarLine #'transparent = ##t
956
957   \override StaffSymbol #'line-count = #4
958   \override StaffSymbol #'thickness = #0.6
959
960   %% FIXME: unit on StaffSymbol's width should be \linewidth.
961   %% \override StaffSymbol #'width = #60.0
962
963   %% Choose vaticana do clef on 3rd line as default.
964   clefGlyph = #"clefs.vaticana.do"
965   middleCPosition = #1
966   middleCClefPosition = #1
967   clefPosition = #1
968   clefOctavation = #0
969
970   %% Select vaticana style font.
971   \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
972   \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
973   \override Custos #'style = #'vaticana
974   \override Custos #'neutral-position = #3
975   \override Custos #'neutral-direction = #DOWN
976   \override Dots #'style = #'vaticana
977 }
978
979 \context {
980   \Voice
981   \name "GregorianTranscriptionVoice"
982   \alias "Voice"
983   \consists "Episema_engraver"
984
985   %% Removing ligature bracket engraver without replacing it by some
986   %% other ligature engraver would cause a "Junking event: `LigatureEvent'"
987   %% warning for every "\[" and "\]".  Therefore, we make the grob
988   %% transparent instead.
989   \override LigatureBracket #'transparent = ##t
990
991   %% Put some space before and after divisiones.
992   %% FIXME: This does not seem to show any effect.
993   \override Script #'padding = #0.5
994
995   %% There are no beams in Gregorian Chant notation.
996   autoBeaming = ##f
997
998 }
999
1000 \context {
1001   \Staff
1002   \name "GregorianTranscriptionStaff"
1003   \alias "Staff"
1004   \denies "Voice"
1005   \accepts "GregorianTranscriptionVoice"
1006   \defaultchild "GregorianTranscriptionVoice"
1007
1008   %% We can not remove Bar_engraver; otherwise clefs and custodes will
1009   %% not show up any more among other line breaking issues.
1010   %% Instead, we make the grob transparent.
1011   \override BarLine #'transparent = ##t
1012 }
1013
1014 \context {
1015   \Voice
1016   \name "MensuralVoice"
1017   \alias "Voice"
1018   \description "Same as @code{Voice} context, except that it is
1019 accommodated for typesetting a piece in mensural style."
1020
1021   \remove "Slur_engraver"
1022   \remove "Ligature_bracket_engraver"
1023   \consists "Mensural_ligature_engraver"
1024
1025   %% Set default head for notes outside of \[ \].
1026   \override NoteHead #'style = #'mensural
1027   \override Rest #'style = #'mensural
1028   \override Flag #'style = #'mensural
1029
1030   %% There are no beams in mensural notation.
1031   autoBeaming = ##f
1032 }
1033
1034 \context {
1035   \Staff
1036   \name "MensuralStaff"
1037   \alias "Staff"
1038   \denies "Voice"
1039   \defaultchild "MensuralVoice"
1040   \accepts "MensuralVoice"
1041   \description "Same as @code{Staff} context, except that it is
1042 accommodated for typesetting a piece in mensural style."
1043
1044   \consists "Custos_engraver"
1045
1046   %% We can not remove Bar_engraver; otherwise clefs and custodes will
1047   %% not show up any more among other line breaking issues.
1048   %% Instead, we make the grob transparent.
1049   \override BarLine #'transparent = ##t
1050
1051   \override StaffSymbol #'thickness = #0.6
1052
1053   %% FIXME: unit on StaffSymbol's width should be \linewidth.
1054   %% \override StaffSymbol #'width = #60.0
1055
1056   %% Choose mensural g clef on 2nd line as default.
1057   clefGlyph = #"clefs.mensural.g"
1058   middleCClefPosition = #-6
1059   middleCPosition = #-6
1060   clefPosition = #-2
1061   clefOctavation = #0
1062
1063   %% Select mensural style font.
1064   \override TimeSignature #'style = #'mensural
1065   \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1066   \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1067   \override Custos #'style = #'mensural
1068   \override Custos #'neutral-position = #3
1069   \override Custos #'neutral-direction = #DOWN
1070
1071   %% Accidentals are valid only once (same as
1072   %% \accidentalStyle "forget")
1073   extraNatural = ##f
1074   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
1075   autoCautionaries = #'()
1076   printKeyCancellation = ##f
1077 }
1078
1079 \context {
1080   \Voice
1081   \name "PetrucciVoice"
1082   \alias "Voice"
1083   \description "Same as @code{Voice} context, except that it is
1084 accommodated for typesetting a piece in Petrucci style."
1085
1086   \remove "Ligature_bracket_engraver"
1087   \consists "Mensural_ligature_engraver"
1088
1089   %% Set glyph styles.
1090   \override NoteHead #'style = #'petrucci
1091   \override Rest #'style = #'mensural
1092
1093   % Thickens and shortens stems.
1094   \override Stem #'thickness = #1.7
1095   \override Stem #'length = #5
1096
1097   %% There are no beams in Petrucci notation.
1098   autoBeaming = ##f
1099 }
1100
1101 \context {
1102   \Staff
1103   \name "PetrucciStaff"
1104   \alias "Staff"
1105   \denies "Voice"
1106   \defaultchild "PetrucciVoice"
1107   \accepts "PetrucciVoice"
1108   \description "Same as @code{Staff} context, except that it is
1109 accommodated for typesetting a piece in Petrucci style."
1110
1111   \consists "Custos_engraver"
1112
1113   \override StaffSymbol #'thickness = #1.3
1114
1115   %% Choose Petrucci g clef on 2nd line as default.
1116   clefGlyph = #"clefs.petrucci.g"
1117   middleCClefPosition = #-6
1118   middleCPosition = #-6
1119   clefPosition = #-2
1120   clefOctavation = #0
1121
1122   \override Custos #'style = #'mensural
1123   \override Custos #'neutral-position = #3
1124   \override Custos #'neutral-direction = #DOWN
1125
1126   %% Accidentals are valid only once (if the following note is different)
1127   extraNatural = ##f
1128   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0)
1129                              ,neo-modern-accidental-rule)
1130   autoCautionaries = #'()
1131   printKeyCancellation = ##f
1132 }
1133
1134 \context {
1135  \Voice
1136  \name "KievanVoice"
1137  \alias "Voice"
1138  \description "Same as @code{Voice} context, except that it is
1139 accommodated for typesetting a piece in Kievan style."
1140
1141  %% Set glyph styles.
1142  \override NoteHead #'style = #'kievan
1143  \override Rest #'style = #'mensural
1144  \override Accidental #'glyph-name-alist = #alteration-kievan-glyph-name-alist
1145  \override Dots #'style = #'kievan
1146  \override Slur #'stencil = ##f
1147
1148  %% There are beams in Kievan notation, but they are invoked manually
1149  autoBeaming = ##f
1150  \override Beam #'beam-thickness = #0.32
1151  \override Beam #'length-fraction = #0.62
1152 }
1153
1154 \context {
1155  \Staff
1156  \name "KievanStaff"
1157  \alias "Staff"
1158  \denies "Voice"
1159  \defaultchild "KievanVoice"
1160  \accepts "KievanVoice"
1161  \description "Same as @code{Staff} context, except that it is
1162 accommodated for typesetting a piece in Kievan style."
1163
1164  \remove "Time_signature_engraver"
1165
1166  %% Choose Kievan tsefaut clef
1167  clefGlyph = #"clefs.kievan.do"
1168  middleCClefPosition = #0
1169  middleCPosition = #0
1170  clefPosition = #0
1171  clefOctavation = #0
1172
1173  %% Accidentals are valid only once (if the following note is different)
1174  extraNatural = ##f
1175  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0)
1176                             ,neo-modern-accidental-rule)
1177  autoCautionaries = #'()
1178  printKeyCancellation = ##f
1179
1180 }
1181
1182 %% Keep the old definitions in here for compatibility (they erase previous
1183 %% settings to the corresponding context!).
1184 %% For new scores, one should simply insert the \RemoveEmptyStaves settings
1185 %% into the desired context. That's just as easy, requires only one line more
1186 %% (the \*Staff), but preserves previous context mods.
1187 %% TODO: DEPRECATED_2.13.17, remove at some point in the future
1188 RemoveEmptyStaffContext = \context {
1189   \Staff
1190   \RemoveEmptyStaves
1191 }
1192
1193 AncientRemoveEmptyStaffContext = \context {
1194   \VaticanaStaff
1195   \RemoveEmptyStaves
1196 }
1197
1198 RemoveEmptyDrumStaffContext = \context {
1199   \DrumStaff
1200   \RemoveEmptyStaves
1201 }
1202
1203 RemoveEmptyRhythmicStaffContext = \context {
1204   \RhythmicStaff
1205   \RemoveEmptyStaves
1206 }
1207
1208 RemoveEmptyTabStaffContext = \context {
1209   \TabStaff
1210   \RemoveEmptyStaves
1211 }