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