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