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