]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
New engraver for braces.
[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.14.0"
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   %% Bar_engraver must be first so default bars aren't overwritten
58   %% with empty ones.
59
60   \consists "Font_size_engraver"
61   \consists "Separating_line_group_engraver"
62   \consists "Dot_column_engraver"
63   \consists "Staff_collecting_engraver"
64
65  %% perhaps move to Voice context?
66   \consists "Ottava_spanner_engraver"
67   \consists "Clef_engraver"
68   \consists "Key_engraver"
69   \consists "Time_signature_engraver"
70   \consists "Ledger_line_engraver"
71   \consists "Staff_symbol_engraver"
72   \consists "Collision_engraver"
73   \consists "Beam_collision_engraver"
74   \consists "Grob_pq_engraver"
75   \consists "Rest_collision_engraver"
76   \consists "Accidental_engraver"
77   \consists "Piano_pedal_engraver"
78   \consists "Piano_pedal_align_engraver"
79   \consists "Instrument_name_engraver"
80   \consists "Axis_group_engraver"
81   \consists "Figured_bass_engraver"
82   \consists "Figured_bass_position_engraver"
83   \consists "Script_row_engraver"
84   \consists "Cue_clef_engraver"
85
86   localKeySignature = #'()
87   createSpacing = ##t
88   ignoreFiguredBassRest = ##f
89
90   %% explicitly set instrument, so we don't get
91   %% weird effects when doing instrument names for
92   %% piano staves
93   instrumentName = #'()
94   shortInstrumentName = #'()
95
96   \defaultchild "Voice"
97   \accepts "Voice"
98   \accepts "CueVoice"
99
100   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
101 @code{Voice} contexts."
102
103 }
104
105 \context {
106   \Staff
107   \type "Engraver_group"
108   \name "DrumStaff"
109   \alias "Staff"
110
111   \remove "Accidental_engraver"
112   \remove "Ottava_spanner_engraver"
113   \remove "Key_engraver"
114   \remove "Piano_pedal_engraver"
115
116   \description "Handles typesetting for percussion."
117
118   \denies "Voice"
119   \accepts "DrumVoice"
120   \defaultchild "DrumVoice"
121
122   clefGlyph = #"clefs.percussion"
123   clefPosition = #0
124   \override Script #'staff-padding = #0.75
125 }
126
127
128 \context {
129   \type "Engraver_group"
130   \name "ChoirStaff"
131   \consists "Vertical_align_engraver"
132   topLevelAlignment = ##f
133
134   \consists "Instrument_name_engraver"
135   \consists "System_start_delimiter_engraver"
136   systemStartDelimiter = #'SystemStartBracket
137   %% explicitly set instrument, so it is not inherited from the parent
138   instrumentName = #'()
139   shortInstrumentName = #'()
140   vocalName = #'()
141   shortVocalName = #'()
142
143   \accepts "Staff"
144   \accepts "DrumStaff"
145   \accepts "RhythmicStaff"
146   \accepts "GrandStaff"
147   \accepts "PianoStaff"
148   \accepts "Lyrics"
149   \accepts "ChordNames"
150   \accepts "FiguredBass"
151   \accepts "ChoirStaff"
152   \accepts "StaffGroup"
153   \defaultchild "Staff"
154   \description "Identical to @code{StaffGroup} except that the
155 contained staves are not connected vertically."
156 }
157
158 \context{
159   \type "Engraver_group"
160
161   localKeySignature = #'()
162   createSpacing = ##t
163
164   squashedPosition = #0
165   \name RhythmicStaff
166   \alias "Staff"
167
168   \override BarLine #'bar-extent = #'(-2 . 2)
169   \override VoltaBracket #'staff-padding = #3
170   \override StaffSymbol #'line-count = #1
171
172   \override Stem  #'neutral-direction = #UP
173   \override Beam  #'neutral-direction = #UP
174
175   \consists "Output_property_engraver"
176   \consists "Font_size_engraver"
177   \consists "Separating_line_group_engraver"
178   \consists "Dot_column_engraver"
179   \consists "Bar_engraver"
180   \consists "Staff_symbol_engraver"
181   \consists "Pitch_squash_engraver"
182   \consists "Time_signature_engraver"
183   \consists "Instrument_name_engraver"
184   \consists "Axis_group_engraver"
185   \consists "Ledger_line_engraver"
186
187   %% explicitly set instrument, so it is not inherited from the parent
188   instrumentName = #'()
189   shortInstrumentName = #'()
190
191   \accepts "Voice"
192   \accepts "CueVoice"
193   \defaultchild "Voice"
194
195   \description "A context like @code{Staff} but for printing rhythms.
196 Pitches are ignored; the notes are printed on one line."
197 }
198
199
200 \context {
201   \type "Engraver_group"
202   \name "Voice"
203
204   \description "Corresponds to a voice on a staff.  This context
205 handles the conversion of dynamic signs, stems, beams, super- and
206 subscripts, slurs, ties, and rests.
207
208 You have to instantiate this explicitly if you want to have
209 multiple voices on the same staff."
210
211   \consists "Font_size_engraver"
212
213   \consists "Pitched_trill_engraver"
214   \consists "Output_property_engraver"
215   \consists "Arpeggio_engraver"
216   \consists "Brace_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   \remove "Brace_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_arpeggio_engraver"
318   \consists "Span_brace_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_arpeggio_engraver"
364   \consists "Span_brace_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
416   \description "Holds a single line of dynamics, which will be
417 centered between the staves surrounding this context."
418 }
419
420
421 \context{
422   \type "Engraver_group"
423
424   \description "Corresponds to a voice with lyrics.  Handles the
425 printing of a single line of lyrics."
426
427   \name "Lyrics"
428   \consists "Lyric_engraver"
429   \consists "Extender_engraver"
430   \consists "Hyphen_engraver"
431   \consists "Stanza_number_engraver"
432   \consists "Instrument_name_engraver"
433   \consists "Font_size_engraver"
434   \consists "Hara_kiri_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   \consists "Timing_translator"
527   \consists "Default_bar_line_engraver"
528   \consists "Output_property_engraver"
529   \consists "System_start_delimiter_engraver"
530   \consists "Mark_engraver"
531   \consists "Volta_engraver"
532   \consists "Metronome_mark_engraver"
533   \consists "Break_align_engraver"
534   \consists "Spacing_engraver"
535   \consists "Grace_spacing_engraver"
536   \consists "Vertical_align_engraver"
537   \consists "Stanza_number_align_engraver"
538   \consists "Bar_number_engraver"
539   \consists "Parenthesis_engraver"
540
541   \defaultchild "Staff"
542
543   \accepts "FretBoards"
544   \accepts "Staff"
545   \accepts "RhythmicStaff"
546   \accepts "TabStaff"
547   \accepts "VaticanaStaff"
548   \accepts "GregorianTranscriptionStaff"
549   \accepts "MensuralStaff"
550   \accepts "StaffGroup"
551   \accepts "DrumStaff"
552   \accepts "Lyrics"
553   \accepts "ChordNames"
554   \accepts "GrandStaff"
555   \accepts "ChoirStaff"
556   \accepts "PianoStaff"
557   \accepts "Devnull"
558   \accepts "NoteNames"
559   \accepts "FiguredBass"
560
561
562   noteToFretFunction = #determine-frets
563   predefinedDiagramTable = ##f
564   soloText = #"Solo"
565   soloIIText = #"Solo II"
566   aDueText = #"a2"
567   printPartCombineTexts = ##t
568   partCombineTextsOnNote = ##t
569   systemStartDelimiter =#'SystemStartBar
570
571   drumStyleTable = #drums-style
572
573   melismaBusyProperties = #default-melisma-properties
574   tieWaitForNote = ##f
575   clefGlyph = #"clefs.G"
576   clefPosition = #-2
577   middleCClefPosition = #-6
578   middleCPosition = #-6
579   firstClef = ##t
580
581   crescendoSpanner = #'hairpin
582   decrescendoSpanner = #'hairpin
583
584   defaultBarType = #"|"
585   doubleRepeatType = #":|:"
586   barNumberVisibility = #first-bar-number-invisible
587   automaticBars = ##t
588
589   explicitClefVisibility = #all-visible
590   explicitCueClefVisibility = #end-of-line-invisible
591   explicitKeySignatureVisibility = #all-visible
592   implicitTimeSignatureVisibility = #end-of-line-invisible
593
594   repeatCountVisibility = #all-repeat-counts-visible
595
596   timeSignatureSettings = #default-time-signature-settings
597   timeSignatureFraction = #'(4 . 4)
598
599 %% These defaults should be the same as the rules established in
600 %%   scm/time-signature-settings.scm for 4/4 time
601   measureLength = #(ly:make-moment 4 4)
602   baseMoment = #(ly:make-moment 1  4)
603   beatStructure = #'(1 1 1 1)
604   beamExceptions = #'((end . (((1 . 8) . (4 4))
605                               ((1 . 12) . (3 3 3 3)))))
606   autoBeaming = ##t
607   autoBeamCheck = #default-auto-beam-check
608
609   scriptDefinitions = #default-script-alist
610
611   pedalSustainStrings = #'("Ped." "*Ped." "*")
612   pedalSustainStyle = #'text
613   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
614   pedalUnaCordaStyle = #'text
615
616 %% These are in ordinary italic font, including the *,
617 %% but they are unlikely to be used,
618 %% as the default pedal-style for SostenutoPedal is 'mixed':
619 %% i.e.  Sost. Ped_____________________
620   pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
621   pedalSostenutoStyle = #'mixed
622
623   harmonicAccidentals = ##t
624   fingeringOrientations = #'(up down)
625   stringNumberOrientations = #'(up down)
626   strokeFingerOrientations = #'(right)
627
628   lyricMelismaAlignment = #LEFT
629   markFormatter = #format-mark-letters
630   rehearsalMark = #1
631   subdivideBeams = ##f
632   extraNatural = ##t
633   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0))
634   autoCautionaries = #'()
635
636   printKeyCancellation = ##t
637   keyAlterationOrder = #`(
638     (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
639     (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
640     (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
641     (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (1 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
642   )
643
644   barCheckSynchronize = ##f
645
646 %% chord names:
647   chordNameFunction = #ignatzek-chord-names
648   majorSevenSymbol = #whiteTriangleMarkup
649   chordNameLowercaseMinor = ##f
650   chordNameSeparator = #(make-simple-markup  "/")
651   chordNameExceptions = #ignatzekExceptions
652   chordNoteNamer = #'()
653   chordRootNamer = #note-name->markup
654   chordPrefixSpacer = #0
655   chordNameExceptionsFull = #fullJazzExceptions
656   chordNameExceptionsPartial = #partialJazzExceptions
657   noChordSymbol = #(make-simple-markup "N.C.")
658
659   bassStaffProperties = #'((assign clefGlyph "clefs.F")
660   (assign clefPosition 2)
661   (assign middleCPosition 6)
662   (assign middleCClefPosition 6))
663 %% tablature:
664   stringOneTopmost = ##t
665   highStringOne = ##t
666
667 %% One may change the string tunings as follows :
668 %% The length of the list must be equal to the number of strings
669   stringTunings = #guitar-tuning
670   tablatureFormat = #fret-number-tablature-format
671   tabStaffLineLayoutFunction = #tablature-position-on-lines
672
673 %%
674   figuredBassFormatter = #format-bass-figure
675   metronomeMarkFormatter = #format-metronome-markup
676
677
678   %% See also make-voice-props-set
679   graceSettings = #`(
680     (Voice Stem direction ,UP)
681     (Voice Stem font-size -3)
682     (Voice NoteHead font-size -3)
683     (Voice TabNoteHead font-size -4)
684     (Voice Dots font-size -3)
685     (Voice Stem length-fraction 0.8)
686     (Voice Stem no-stem-extend #t)
687     (Voice Beam beam-thickness 0.384)
688     (Voice Beam length-fraction 0.8)
689     (Voice Accidental font-size -4)
690     (Voice AccidentalCautionary font-size -4)
691     (Voice Slur direction ,DOWN)
692     (Voice Script font-size -3)
693     (Voice Fingering font-size -8)
694     (Voice StringNumber font-size -8)
695   )
696
697   keepAliveInterfaces = #'(
698     bass-figure-interface
699     chord-name-interface
700     cluster-beacon-interface
701     fret-diagram-interface
702     lyric-syllable-interface
703     note-head-interface
704     tab-note-head-interface
705     lyric-interface
706     percent-repeat-item-interface
707     percent-repeat-interface
708
709     ;; need this, as stanza numbers are items, and appear only once.
710     stanza-number-interface
711   )
712   % \quoteDuring is supposed to quote everything, cueDuring only the essentials
713   quotedEventTypes = #'(StreamEvent)
714   quotedCueEventTypes = #'(
715     note-event
716     rest-event
717     tie-event
718     beam-event
719     tuplet-span-event)
720   instrumentTransposition = #(ly:make-pitch 0 0 0)
721
722   topLevelAlignment = ##t
723
724   timing = ##t
725 }
726
727
728
729
730 \context {
731   \type "Engraver_group"
732   \name "FiguredBass"
733   \description "A context for printing a figured bass line."
734
735   \consists "Figured_bass_engraver"
736   \consists "Separating_line_group_engraver"
737   \consists "Hara_kiri_engraver"
738
739   \override VerticalAxisGroup #'remove-empty = ##t
740   \override VerticalAxisGroup #'remove-first = ##t
741   \override VerticalAxisGroup #'staff-affinity = #UP
742   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
743   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
744 }
745
746 \context {
747   \name "Devnull"
748   \type "Engraver_group"
749
750 %% don't want to route anything out of here:
751   \alias "Staff"
752   \alias "Voice"
753   \description "Silently discards all musical information given to this
754 context."
755 }
756
757 \context {
758   \Voice
759   \name "TabVoice"
760   \alias "Voice"
761   \consists "Tab_note_heads_engraver"
762   \consists "Tab_tie_follow_engraver"
763
764   \remove "Note_heads_engraver"
765   \remove "Fingering_engraver"
766   \remove "New_fingering_engraver"
767
768   \description "Context for drawing notes in a Tab staff."
769
770   %% TabStaff increase the staff-space, which in turn
771   %% increases beam thickness and spacing; beams are
772   %% too big. We have to adjust the beam settings:
773   \override Beam #'beam-thickness = #0.32
774   \override Beam #'length-fraction = #0.62
775   %% the same goes for tremolo beams
776   \override StemTremolo #'beam-thickness = #0.32
777   %% NOTE: in lily/stem-tremolo.cc, we have length-fraction = 1,
778   %% and the tablature staff space is scaled (1.5 by default),
779   %% so we use the inversion of the scale factor:
780   \override StemTremolo #'length-fraction = #(lambda (grob)
781                                                (/ 1 (ly:staff-symbol-staff-space grob)))
782   \override StemTremolo #'beam-width = #stem-tremolo::calc-tab-width
783
784   %% No accidental in tablature !
785   \remove "Accidental_engraver"
786   %% make the Stems as short as possible to minimize their influence
787   %% on the slur::calc-control-points routine
788   \override Stem #'length = #0
789   \override Stem #'no-stem-extend = ##t
790   \override Stem #'flag-style = #'no-flag
791   \override Stem #'details = #'((lengths 0 0 0 0 0 0)
792                                 (beamed-lengths 0 0 0)
793                                 (beamed-minimum-free-lengths 0 0 0)
794                                 (beamed-extreme-minimum-free-lengths 0 0)
795                                 (stem-shorten 0 0))
796   %% after all, the stubs of the stems may still be visible, so ...
797   \override Stem #'transparent = ##t
798   %% automatic beams should be suppressed for similar reasons ...
799   autoBeaming = ##f
800   %% remove beams, dots and rests ...
801   \override Beam #'stencil = ##f
802   \override StemTremolo #'stencil = ##f
803   \override Dots #'stencil = ##f
804   \override Rest #'stencil = ##f
805   \override MultiMeasureRest #'stencil = ##f
806   \override MultiMeasureRestNumber #'transparent = ##t
807   \override MultiMeasureRestText #'transparent = ##t
808   %% ... all kinds of ties/slurs
809   \override Tie  #'stencil = ##f
810   \override RepeatTie #'stencil = ##f
811   \override LaissezVibrerTie #'stencil = ##f
812   \override Slur #'stencil = #slur::draw-tab-slur
813   \override PhrasingSlur #'stencil = ##f
814   %% 'tied to' fret numbers become invisible or parenthesized, respectively)
815   \override Tie #'after-line-breaking = #tie::handle-tab-note-head
816   \override RepeatTie #'after-line-breaking = #repeat-tie::handle-tab-note-head
817   %% ... and all kinds of markups, spanners etc.
818   \override TupletBracket #'stencil = ##f
819   \override TupletNumber #'stencil = ##f
820   \override DynamicText #'transparent = ##t
821   \override DynamicTextSpanner #'stencil = ##f
822   \override TextSpanner #'stencil = ##f
823   \override Hairpin #'transparent = ##t
824   \override Script #'stencil = ##f
825   \override TextScript #'stencil = ##f
826   \override Glissando #'stencil = #glissando::draw-tab-glissando
827   %% the direction for glissando lines will be automatically corrected
828   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
829   \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
830                                                    (padding . 0.3))
831   \override Glissando #'bound-details #'left = #`((attach-dir . ,RIGHT)
832                                                    (padding . 0.3))
833   %% dead notes
834   \override TabNoteHead #'glyph-name = #tab-note-head::calc-glyph-name
835   \override TabNoteHead #'stencil = #tab-note-head::whiteout-if-style-set
836 }
837
838 \context {
839   \Staff
840   \alias "Staff"
841   \name "TabStaff"
842   \denies "Voice"
843   \consists "Tab_staff_symbol_engraver"
844
845   \description "Context for generating tablature. It accepts only @code{TabVoice}
846 contexts and handles the line spacing, the tablature clef etc. properly."
847
848   \accepts "TabVoice"
849   \defaultchild "TabVoice"
850
851   %% 6 strings, bigger spacing
852   \override StaffSymbol #'staff-space = #1.5
853
854   %% Don't draw stems over the tablature figures !
855   \override Stem #'avoid-note-head = ##t
856
857   %% No accidental in tablature !
858   \remove "Accidental_engraver"
859   \remove "Key_engraver"
860
861   \remove "Ottava_spanner_engraver"
862   %% the clef handler
863   \override Clef #'stencil = #clef::print-modern-tab-if-set
864   %% no time signature
865   \override TimeSignature #'stencil = ##f
866   %% no arpeggios
867   \override Arpeggio #'stencil = ##f
868   \override Brace #'stencil = ##f
869   %% we ignore collision warnings that may occur due to
870   %% stem overlapping, because we have no stems ;-)
871   \override NoteColumn #'ignore-collision = ##t
872   %% Special "TAB" clef
873   clefGlyph = #"clefs.tab"
874   clefPosition = #0
875   %% Change string if note results in negative fret number
876   handleNegativeFrets = #'recalculate
877 }
878
879 \context {
880   \Voice
881   \name "VaticanaVoice"
882   \alias "Voice"
883   \description "Same as @code{Voice} context, except that it is
884 accommodated for typesetting Gregorian Chant in the notational style
885 of Editio Vaticana."
886
887   \remove "Slur_engraver"
888   \remove "Stem_engraver"
889   \remove "Ligature_bracket_engraver"
890   \consists "Vaticana_ligature_engraver"
891   \remove "Text_spanner_engraver"
892   \consists "Episema_engraver"
893
894   %% Set default head for notes outside of \[ \].
895   \override NoteHead #'style = #'vaticana.punctum
896
897   %% Put some space before and after divisiones.
898   %% FIXME: This does not seem to show any effect.
899   \override Script #'padding = #0.5
900
901   %% There are no beams in Gregorian Chant notation.
902   autoBeaming = ##f
903 }
904
905 \context {
906   \Staff
907   \name "VaticanaStaff"
908   \alias "Staff"
909   \denies "Voice"
910   \accepts "VaticanaVoice"
911   \defaultchild "VaticanaVoice"
912
913   \description "Same as @code{Staff} context, except that it is
914 accommodated for typesetting Gregorian Chant in the notational style
915 of Editio Vaticana."
916
917   \remove "Time_signature_engraver"
918   \consists "Custos_engraver"
919
920   %% We can not remove Bar_engraver; otherwise clefs and custodes will
921   %% not show up any more among other line breaking issues.
922   %% Instead, we make the grob transparent.
923   \override BarLine #'transparent = ##t
924
925   \override StaffSymbol #'line-count = #4
926   \override StaffSymbol #'thickness = #0.6
927
928   %% FIXME: unit on StaffSymbol's width should be \linewidth.
929   %% \override StaffSymbol #'width = #60.0
930
931   %% Choose vaticana do clef on 3rd line as default.
932   clefGlyph = #"clefs.vaticana.do"
933   middleCPosition = #1
934   middleCClefPosition = #1
935   clefPosition = #1
936   clefOctavation = #0
937
938   %% Select vaticana style font.
939   \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
940   \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
941   \override Custos #'style = #'vaticana
942   \override Custos #'neutral-position = #3
943   \override Custos #'neutral-direction = #DOWN
944   \override Dots #'style = #'vaticana
945 }
946
947 \context {
948   \Voice
949   \name "GregorianTranscriptionVoice"
950   \alias "Voice"
951   \consists "Episema_engraver"
952
953   %% Removing ligature bracket engraver without replacing it by some
954   %% other ligature engraver would cause a "Junking event: `LigatureEvent'"
955   %% warning for every "\[" and "\]".  Therefore, we make the grob
956   %% transparent instead.
957   \override LigatureBracket #'transparent = ##t
958
959   %% Put some space before and after divisiones.
960   %% FIXME: This does not seem to show any effect.
961   \override Script #'padding = #0.5
962
963   %% There are no beams in Gregorian Chant notation.
964   autoBeaming = ##f
965
966 }
967
968 \context {
969   \Staff
970   \name "GregorianTranscriptionStaff"
971   \alias "Staff"
972   \denies "Voice"
973   \accepts "GregorianTranscriptionVoice"
974   \defaultchild "GregorianTranscriptionVoice"
975
976   %% We can not remove Bar_engraver; otherwise clefs and custodes will
977   %% not show up any more among other line breaking issues.
978   %% Instead, we make the grob transparent.
979   \override BarLine #'transparent = ##t
980 }
981
982 \context {
983   \Voice
984   \name "MensuralVoice"
985   \alias "Voice"
986   \description "Same as @code{Voice} context, except that it is
987 accommodated for typesetting a piece in mensural style."
988
989   \remove "Slur_engraver"
990   \remove "Ligature_bracket_engraver"
991   \consists "Mensural_ligature_engraver"
992
993   %% Set default head for notes outside of \[ \].
994   \override NoteHead #'style = #'mensural
995   \override Rest #'style = #'mensural
996
997   %% There are no beams in mensural notation.
998   autoBeaming = ##f
999 }
1000
1001 \context {
1002   \Staff
1003   \name "MensuralStaff"
1004   \alias "Staff"
1005   \denies "Voice"
1006   \defaultchild "MensuralVoice"
1007   \accepts "MensuralVoice"
1008   \description "Same as @code{Staff} context, except that it is
1009 accommodated for typesetting a piece in mensural style."
1010
1011   \consists "Custos_engraver"
1012
1013   %% We can not remove Bar_engraver; otherwise clefs and custodes will
1014   %% not show up any more among other line breaking issues.
1015   %% Instead, we make the grob transparent.
1016   \override BarLine #'transparent = ##t
1017
1018   \override StaffSymbol #'thickness = #0.6
1019
1020   %% FIXME: unit on StaffSymbol's width should be \linewidth.
1021   %% \override StaffSymbol #'width = #60.0
1022
1023   %% Choose mensural g clef on 2nd line as default.
1024   clefGlyph = #"clefs.mensural.g"
1025   middleCClefPosition = #-6
1026   middleCPosition = #-6
1027   clefPosition = #-2
1028   clefOctavation = #0
1029
1030   %% Select mensural style font.
1031   \override TimeSignature #'style = #'mensural
1032   \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1033   \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1034   \override Custos #'style = #'mensural
1035   \override Custos #'neutral-position = #3
1036   \override Custos #'neutral-direction = #DOWN
1037
1038   %% Accidentals are valid only once (same as
1039   %% #(set-accidental-style 'forget))
1040   extraNatural = ##f
1041   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
1042   autoCautionaries = #'()
1043   printKeyCancellation = ##f
1044 }
1045
1046 %% Keep the old definitions in here for compatibility (they erase previous
1047 %% settings to the corresponding context!).
1048 %% For new scores, one should simply insert the \RemoveEmptyStaves settings
1049 %% into the desired context. That's just as easy, requires only one line more
1050 %% (the \*Staff), but preserves previous context mods.
1051 %% TODO: DEPRECATED_2.13.17, remove at some point in the future
1052 RemoveEmptyStaffContext = \context {
1053   \Staff
1054   \RemoveEmptyStaves
1055 }
1056
1057 AncientRemoveEmptyStaffContext = \context {
1058   \VaticanaStaff
1059   \RemoveEmptyStaves
1060 }
1061
1062 RemoveEmptyDrumStaffContext = \context {
1063   \DrumStaff
1064   \RemoveEmptyStaves
1065 }
1066
1067 RemoveEmptyRhythmicStaffContext = \context {
1068   \RhythmicStaff
1069   \RemoveEmptyStaves
1070 }
1071
1072 RemoveEmptyTabStaffContext = \context {
1073   \TabStaff
1074   \RemoveEmptyStaves
1075 }