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