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