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