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