]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
5a73bbb9cd5132e1ab2863824681eef14e1e257a
[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.13.48"
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 "Multi_measure_rest_engraver"
217   \consists "Text_spanner_engraver"
218   \consists "Trill_spanner_engraver"
219   \consists "Grob_pq_engraver"
220   \consists "Forbid_line_break_engraver"
221   \consists "Laissez_vibrer_engraver"
222   \consists "Repeat_tie_engraver"
223   \consists "Note_head_line_engraver"
224   \consists "Glissando_engraver"
225   \consists "Ligature_bracket_engraver"
226   \consists "Breathing_sign_engraver"
227   \consists "Note_heads_engraver"
228   \consists "Dots_engraver"
229   \consists "Rest_engraver"
230   \consists "Tweak_engraver"
231   \consists "Footnote_engraver"
232
233   %% switch on to make stem directions interpolate for the
234   %% center line.
235   %  \consists "Melody_engraver"
236
237   \consists "Stem_engraver"
238   \consists "Beam_engraver"
239   \consists "Grace_beam_engraver"
240   \consists "Auto_beam_engraver"
241
242   %% must come before Script_column_engraver.
243   \consists "New_fingering_engraver"
244
245   \consists "Chord_tremolo_engraver"
246   \consists "Double_percent_repeat_engraver"
247   \consists "Percent_repeat_engraver"
248   \consists "Slash_repeat_engraver"
249   \consists "Part_combine_engraver"
250
251   \consists "Text_engraver"
252   \consists "New_dynamic_engraver"
253   \consists "Dynamic_align_engraver"
254 %  \consists "Dynamic_engraver"
255   \consists "Fingering_engraver"
256   \consists "Bend_engraver"
257
258   \consists "Script_engraver"
259   \consists "Script_column_engraver"
260   \consists "Rhythmic_column_engraver"
261   \consists "Note_spacing_engraver"
262   \consists "Spanner_break_forbid_engraver"
263   \consists "Phrasing_slur_engraver"
264   \consists "Cluster_spanner_engraver"
265   \consists "Slur_engraver"
266   \consists "Tie_engraver"
267   \consists "Tuplet_engraver"
268   \consists "Grace_engraver"
269   \consists "Instrument_switch_engraver"
270 }
271
272 \context{
273   \Voice
274
275   \name CueVoice
276   \alias Voice
277   fontSize = #-4
278   \override Stem #'length-fraction = #(magstep -4)
279   \override Beam #'length-fraction = #(magstep -4)
280   \override Beam #'beam-thickness = #0.35
281 }
282
283 \context {
284   \Voice
285   \name DrumVoice
286   \alias Voice
287
288   \description "A voice on a percussion staff."
289   \remove "Arpeggio_engraver"
290   \consists "Grob_pq_engraver"
291
292   \remove "Note_head_line_engraver"
293   \remove "Glissando_engraver"
294   \remove "Ligature_bracket_engraver"
295   \remove "Note_heads_engraver"
296   \consists "Drum_notes_engraver"
297   \remove "New_fingering_engraver"
298
299   \remove "Fingering_engraver"
300
301   \remove "Cluster_spanner_engraver"
302 }
303
304 \context{
305   \type "Engraver_group"
306   \name GrandStaff
307   localKeySignature = #'()
308
309   \description "A group of staves, with a brace on the left
310 side, grouping the staves together.  The bar lines of the
311 contained staves are connected vertically."
312
313   \consists "Instrument_name_engraver"
314   \consists "Span_bar_engraver"
315   \consists "Span_arpeggio_engraver"
316   \consists "System_start_delimiter_engraver"
317   \consists "Vertical_align_engraver"
318   systemStartDelimiter = #'SystemStartBrace
319   topLevelAlignment = ##f
320   %% explicitly set instrument, so it is not inherited from the parent
321   instrumentName = #'()
322   shortInstrumentName = #'()
323
324   \defaultchild "Staff"
325   \accepts "Staff"
326   \accepts "RhythmicStaff"
327   \accepts "DrumStaff"
328   \accepts "TabStaff"
329   \accepts "Lyrics"
330   \accepts "FiguredBass"
331   \accepts "Dynamics"
332   \accepts "ChordNames"
333 }
334
335 \context{
336   \GrandStaff
337   \name "PianoStaff"
338   \alias "GrandStaff"
339
340   \description "Just like @code{GrandStaff}, but the staves are only removed
341 together, never separately."
342
343   \consists "Vertical_align_engraver"
344   \consists "Keep_alive_together_engraver"
345   topLevelAlignment = ##f
346
347   instrumentName = #'()
348   shortInstrumentName = #'()
349 }
350
351 \context {
352   \type "Engraver_group"
353   \name "StaffGroup"
354
355   \consists "Vertical_align_engraver"
356   topLevelAlignment = ##f
357
358   \consists "Instrument_name_engraver"
359   \consists "Span_bar_engraver"
360   \consists "Span_arpeggio_engraver"
361   \consists "Output_property_engraver"
362   systemStartDelimiter = #'SystemStartBracket
363   %% explicitly set instrument, so it is not inherited from the parent
364   instrumentName = #'()
365   shortInstrumentName = #'()
366
367   \consists "System_start_delimiter_engraver"
368
369   \defaultchild "Staff"
370   \accepts "Staff"
371   \accepts "RhythmicStaff"
372   \accepts "DrumStaff"
373   \accepts "GrandStaff"
374   \accepts "PianoStaff"
375   \accepts "TabStaff"
376   \accepts "Lyrics"
377   \accepts "ChordNames"
378   \accepts "FiguredBass"
379   \accepts "ChoirStaff"
380   \accepts "StaffGroup"
381
382   \description "Groups staves while adding a bracket on the left
383 side, grouping the staves together.  The bar lines of the contained
384 staves are connected vertically.  @code{StaffGroup} only consists of
385 a collection of staves, with a bracket in front and spanning bar lines."
386 }
387
388 \context {
389   \type "Engraver_group"
390   \name Dynamics
391   \alias Voice
392   \consists "Output_property_engraver"
393   \consists "Bar_engraver"
394   \consists "Piano_pedal_engraver"
395   \consists "Script_engraver"
396   \consists "New_dynamic_engraver"
397   \consists "Dynamic_align_engraver"
398   \consists "Text_engraver"
399   \consists "Text_spanner_engraver"
400   \consists "Axis_group_engraver"
401   \consists "Tweak_engraver"
402
403   pedalSustainStrings = #'("Ped." "*Ped." "*")
404   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
405   \override VerticalAxisGroup #'staff-affinity = #CENTER
406   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
407     #'((basic-distance . 5)
408        (padding . 0.5))
409   \override TextScript #'font-shape = #'italic
410   \override DynamicLineSpanner #'Y-offset = #0
411
412   \description "Holds a single line of dynamics, which will be
413 centered between the staves surrounding this context."
414 }
415
416
417 \context{
418   \type "Engraver_group"
419
420   \description "Corresponds to a voice with lyrics.  Handles the
421 printing of a single line of lyrics."
422
423   \name "Lyrics"
424   instrumentName = #'()
425   shortInstrumentName = #'()
426
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   %% explicitly set instrument, so it is not inherited from the parent
435   instrumentName = #'()
436   shortInstrumentName = #'()
437
438   \override VerticalAxisGroup #'remove-first = ##t
439   \override VerticalAxisGroup #'remove-empty = ##t
440   \override VerticalAxisGroup #'staff-affinity = #UP
441   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
442     #'((basic-distance . 5.5)
443        (padding . 0.5)
444        (stretchability . 1))
445   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
446      #'((basic-distance . 0)
447         (minimum-distance . 2.8)
448         (padding . 0.2)
449         (stretchability . 0))
450   \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = #1.5
451   \override InstrumentName #'self-alignment-Y = ##f
452
453   %% sync with define-grobs.scm ;
454   \override InstrumentName #'font-size = #1.0
455
456   %% make sure that barlines aren't collapsed, when
457   %% Bar_engraver is there.
458   \override BarLine #'bar-extent = #'(-0.05 . 0.05)
459
460 }
461
462 \context {
463   \type "Engraver_group"
464   \name NoteNames
465   \description "A context for printing the names of notes."
466   \consists "Axis_group_engraver"
467
468   % FIXME: not sure what the default should be here.
469   \override VerticalAxisGroup #'staff-affinity = #DOWN
470
471   \consists "Tie_engraver"
472   \consists "Note_name_engraver"
473   \consists "Separating_line_group_engraver"
474 }
475
476 \context {
477   \type "Engraver_group"
478   \name ChordNames
479   \description "Typesets chord names."
480
481   \consists "Output_property_engraver"
482   \consists "Separating_line_group_engraver"
483   \consists "Chord_name_engraver"
484   \consists "Hara_kiri_engraver"
485 %  \consists "Note_spacing_engraver"
486   \override VerticalAxisGroup #'remove-first = ##t
487   \override VerticalAxisGroup #'remove-empty = ##t
488   \override VerticalAxisGroup #'staff-affinity = #DOWN
489   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
490   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
491 }
492
493
494 RemoveEmptyStaves = \with {
495   \remove "Axis_group_engraver"
496     % If RemoveEmptyStaves is called twice, two
497     % Hara_kiri_engravers would be added, which leads to a
498     % warning.
499     % This code makes sure that no previous Hara_kiri_engraver
500     % is left before adding a new one.
501   \remove "Hara_kiri_engraver"
502   \consists "Hara_kiri_engraver"
503   \override VerticalAxisGroup #'remove-empty = ##t
504 }
505
506
507 \context {
508   \type "Score_engraver"
509   \name "Score"
510
511   \description "This is the top level notation context.  No
512 other context can contain a @code{Score} context.  This context
513 handles the administration of time signatures.  It also makes sure
514 that items such as clefs, time signatures, and key-signatures are
515 aligned across staves.
516
517 You cannot explicitly instantiate a @code{Score} context (since it
518 is not contained in any other context).  It is instantiated
519 automatically when an output definition (a @code{\score} or
520 @code{\layout} block) is processed."
521
522   \consists "Paper_column_engraver"
523   \consists "Repeat_acknowledge_engraver"
524   \consists "Staff_collecting_engraver"
525
526   %% move the alias along with the engraver.
527
528   \consists "Timing_translator"
529   \consists "Default_bar_line_engraver"
530   \consists "Output_property_engraver"
531   \consists "System_start_delimiter_engraver"
532   \consists "Mark_engraver"
533   \consists "Volta_engraver"
534   \consists "Metronome_mark_engraver"
535   \consists "Break_align_engraver"
536   \consists "Spacing_engraver"
537   \consists "Grace_spacing_engraver"
538   \consists "Vertical_align_engraver"
539   \consists "Stanza_number_align_engraver"
540   \consists "Bar_number_engraver"
541   \consists "Parenthesis_engraver"
542
543   \defaultchild "Staff"
544
545   \accepts "FretBoards"
546   \accepts "Staff"
547   \accepts "RhythmicStaff"
548   \accepts "TabStaff"
549   \accepts "VaticanaStaff"
550   \accepts "GregorianTranscriptionStaff"
551   \accepts "MensuralStaff"
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   majorSevenSymbol = #whiteTriangleMarkup
651   chordNameLowercaseMinor = ##f
652   chordNameSeparator = #(make-simple-markup  "/")
653   chordNameExceptions = #ignatzekExceptions
654   chordNoteNamer = #'()
655   chordRootNamer = #note-name->markup
656   chordPrefixSpacer = #0
657   chordNameExceptionsFull = #fullJazzExceptions
658   chordNameExceptionsPartial = #partialJazzExceptions
659   noChordSymbol = #(make-simple-markup "N.C.")
660
661   bassStaffProperties = #'((assign clefGlyph "clefs.F")
662   (assign clefPosition 2)
663   (assign middleCPosition 6)
664   (assign middleCClefPosition 6))
665 %% tablature:
666   stringOneTopmost = ##t
667   highStringOne = ##t
668
669 %% One may change the string tunings as follows :
670 %% The length of the list must be equal to the number of strings
671   stringTunings = #guitar-tuning
672   tablatureFormat = #fret-number-tablature-format
673   tabStaffLineLayoutFunction = #tablature-position-on-lines
674
675 %%
676   figuredBassFormatter = #format-bass-figure
677   metronomeMarkFormatter = #format-metronome-markup
678
679
680   %% See also make-voice-props-set
681   graceSettings = #`(
682     (Voice Stem direction ,UP)
683     (Voice Stem font-size -3)
684     (Voice NoteHead font-size -3)
685     (Voice TabNoteHead font-size -4)
686     (Voice Dots font-size -3)
687     (Voice Stem length-fraction 0.8)
688     (Voice Stem no-stem-extend #t)
689     (Voice Beam beam-thickness 0.384)
690     (Voice Beam length-fraction 0.8)
691     (Voice Accidental font-size -4)
692     (Voice AccidentalCautionary font-size -4)
693     (Voice Slur direction ,DOWN)
694     (Voice Script font-size -3)
695     (Voice Fingering font-size -8)
696     (Voice StringNumber font-size -8)
697   )
698
699   keepAliveInterfaces = #'(
700     bass-figure-interface
701     chord-name-interface
702     cluster-beacon-interface
703     fret-diagram-interface
704     lyric-syllable-interface
705     note-head-interface
706     tab-note-head-interface
707     lyric-interface
708     percent-repeat-item-interface
709     percent-repeat-interface
710
711     ;; need this, as stanza numbers are items, and appear only once.
712     stanza-number-interface
713   )
714   % \quoteDuring is supposed to quote everything, cueDuring only the essentials
715   quotedEventTypes = #'(StreamEvent)
716   quotedCueEventTypes = #'(
717     note-event
718     rest-event
719     tie-event
720     beam-event
721     tuplet-span-event)
722   instrumentTransposition = #(ly:make-pitch 0 0 0)
723
724   topLevelAlignment = ##t
725
726   timing = ##t
727 }
728
729
730
731
732 \context {
733   \type "Engraver_group"
734   \name "FiguredBass"
735   \description "A context for printing a figured bass line."
736
737   \consists "Figured_bass_engraver"
738   \consists "Separating_line_group_engraver"
739   \consists "Hara_kiri_engraver"
740
741   \override VerticalAxisGroup #'remove-empty = ##t
742   \override VerticalAxisGroup #'remove-first = ##t
743   \override VerticalAxisGroup #'staff-affinity = #UP
744   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
745   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
746 }
747
748 \context {
749   \name "Devnull"
750   \type "Engraver_group"
751
752 %% don't want to route anything out of here:
753   \alias "Staff"
754   \alias "Voice"
755   \description "Silently discards all musical information given to this
756 context."
757 }
758
759 \context {
760   \Voice
761   \name "TabVoice"
762   \alias "Voice"
763   \consists "Tab_note_heads_engraver"
764   \consists "Tab_tie_follow_engraver"
765
766   \remove "Note_heads_engraver"
767   \remove "Fingering_engraver"
768   \remove "New_fingering_engraver"
769
770   \description "Context for drawing notes in a Tab staff."
771
772   %% TabStaff increase the staff-space, which in turn
773   %% increases beam thickness and spacing; beams are
774   %% too big. We have to adjust the beam settings:
775   \override Beam #'beam-thickness = #0.32
776   \override Beam #'length-fraction = #0.62
777   %% the same goes for tremolo beams
778   \override StemTremolo #'beam-thickness = #0.32
779   %% NOTE: in lily/stem-tremolo.cc, we have length-fraction = 1,
780   %% and the tablature staff space is scaled (1.5 by default),
781   %% so we use the inversion of the scale factor:
782   \override StemTremolo #'length-fraction = #(lambda (grob)
783                                                (/ 1 (ly:staff-symbol-staff-space grob)))
784   \override StemTremolo #'beam-width = #stem-tremolo::calc-tab-width
785
786   %% No accidental in tablature !
787   \remove "Accidental_engraver"
788   %% make the Stems as short as possible to minimize their influence
789   %% on the slur::calc-control-points routine
790   \override Stem #'length = #0
791   \override Stem #'no-stem-extend = ##t
792   \override Stem #'flag-style = #'no-flag
793   \override Stem #'details = #'((lengths 0 0 0 0 0 0)
794                                 (beamed-lengths 0 0 0)
795                                 (beamed-minimum-free-lengths 0 0 0)
796                                 (beamed-extreme-minimum-free-lengths 0 0)
797                                 (stem-shorten 0 0))
798   %% after all, the stubs of the stems may still be visible, so ...
799   \override Stem #'transparent = ##t
800   %% automatic beams should be suppressed for similar reasons ...
801   autoBeaming = ##f
802   %% remove beams, dots and rests ...
803   \override Beam #'stencil = ##f
804   \override StemTremolo #'stencil = ##f
805   \override Dots #'stencil = ##f
806   \override Rest #'stencil = ##f
807   \override MultiMeasureRest #'stencil = ##f
808   \override MultiMeasureRestNumber #'transparent = ##t
809   \override MultiMeasureRestText #'transparent = ##t
810   %% ... all kinds of ties/slurs
811   \override Tie  #'stencil = ##f
812   \override RepeatTie #'stencil = ##f
813   \override LaissezVibrerTie #'stencil = ##f
814   \override Slur #'stencil = #slur::draw-tab-slur
815   \override PhrasingSlur #'stencil = ##f
816   %% 'tied to' fret numbers become invisible or parenthesized, respectively)
817   \override Tie #'after-line-breaking = #tie::handle-tab-note-head
818   \override RepeatTie #'after-line-breaking = #repeat-tie::handle-tab-note-head
819   %% ... and all kinds of markups, spanners etc.
820   \override TupletBracket #'stencil = ##f
821   \override TupletNumber #'stencil = ##f
822   \override DynamicText #'transparent = ##t
823   \override DynamicTextSpanner #'stencil = ##f
824   \override TextSpanner #'stencil = ##f
825   \override Hairpin #'transparent = ##t
826   \override Script #'stencil = ##f
827   \override TextScript #'stencil = ##f
828   \override Glissando #'stencil = #glissando::draw-tab-glissando
829   %% the direction for glissando lines will be automatically corrected
830   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
831   \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
832                                                    (padding . 0.3))
833   \override Glissando #'bound-details #'left = #`((attach-dir . ,RIGHT)
834                                                    (padding . 0.3))
835   %% dead notes
836   \override TabNoteHead #'glyph-name = #tab-note-head::calc-glyph-name
837   \override TabNoteHead #'stencil = #tab-note-head::whiteout-if-style-set
838 }
839
840 \context {
841   \Staff
842   \alias "Staff"
843   \name "TabStaff"
844   \denies "Voice"
845   \consists "Tab_staff_symbol_engraver"
846
847   \description "Context for generating tablature. It accepts only @code{TabVoice}
848 contexts and handles the line spacing, the tablature clef etc. properly."
849
850   \accepts "TabVoice"
851   \defaultchild "TabVoice"
852
853   %% 6 strings, bigger spacing
854   \override StaffSymbol #'staff-space = #1.5
855
856   %% Don't draw stems over the tablature figures !
857   \override Stem #'avoid-note-head = ##t
858
859   %% No accidental in tablature !
860   \remove "Accidental_engraver"
861   \remove "Key_engraver"
862
863   \remove "Ottava_spanner_engraver"
864   %% the clef handler
865   \override Clef #'stencil = #clef::print-modern-tab-if-set
866   %% no time signature
867   \override TimeSignature #'stencil = ##f
868   %% no arpeggios
869   \override Arpeggio #'stencil = ##f
870   %% we ignore collision warnings that may occur due to
871   %% stem overlapping, because we have no stems ;-)
872   \override NoteColumn #'ignore-collision = ##t
873   %% Special "TAB" clef
874   clefGlyph = #"clefs.tab"
875   clefPosition = #0
876   %% Change string if note results in negative fret number
877   handleNegativeFrets = #'recalculate
878 }
879
880 \context {
881   \Voice
882   \name "VaticanaVoice"
883   \alias "Voice"
884   \description "Same as @code{Voice} context, except that it is
885 accommodated for typesetting Gregorian Chant in the notational style
886 of Editio Vaticana."
887
888   \remove "Slur_engraver"
889   \remove "Stem_engraver"
890   \remove "Ligature_bracket_engraver"
891   \consists "Vaticana_ligature_engraver"
892   \remove "Text_spanner_engraver"
893   \consists "Episema_engraver"
894
895   %% Set default head for notes outside of \[ \].
896   \override NoteHead #'style = #'vaticana.punctum
897
898   %% Put some space before and after divisiones.
899   %% FIXME: This does not seem to show any effect.
900   \override Script #'padding = #0.5
901
902   %% There are no beams in Gregorian Chant notation.
903   autoBeaming = ##f
904 }
905
906 \context {
907   \Staff
908   \name "VaticanaStaff"
909   \alias "Staff"
910   \denies "Voice"
911   \accepts "VaticanaVoice"
912   \defaultchild "VaticanaVoice"
913
914   \description "Same as @code{Staff} context, except that it is
915 accommodated for typesetting Gregorian Chant in the notational style
916 of Editio Vaticana."
917
918   \remove "Time_signature_engraver"
919   \consists "Custos_engraver"
920
921   %% We can not remove Bar_engraver; otherwise clefs and custodes will
922   %% not show up any more among other line breaking issues.
923   %% Instead, we make the grob transparent.
924   \override BarLine #'transparent = ##t
925
926   \override StaffSymbol #'line-count = #4
927   \override StaffSymbol #'thickness = #0.6
928
929   %% FIXME: unit on StaffSymbol's width should be \linewidth.
930   %% \override StaffSymbol #'width = #60.0
931
932   %% Choose vaticana do clef on 3rd line as default.
933   clefGlyph = #"clefs.vaticana.do"
934   middleCPosition = #1
935   middleCClefPosition = #1
936   clefPosition = #1
937   clefOctavation = #0
938
939   %% Select vaticana style font.
940   \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
941   \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
942   \override Custos #'style = #'vaticana
943   \override Custos #'neutral-position = #3
944   \override Custos #'neutral-direction = #DOWN
945   \override Dots #'style = #'vaticana
946 }
947
948 \context {
949   \Voice
950   \name "GregorianTranscriptionVoice"
951   \alias "Voice"
952   \consists "Episema_engraver"
953
954   %% Removing ligature bracket engraver without replacing it by some
955   %% other ligature engraver would cause a "Junking event: `LigatureEvent'"
956   %% warning for every "\[" and "\]".  Therefore, we make the grob
957   %% transparent instead.
958   \override LigatureBracket #'transparent = ##t
959
960   %% Put some space before and after divisiones.
961   %% FIXME: This does not seem to show any effect.
962   \override Script #'padding = #0.5
963
964   %% There are no beams in Gregorian Chant notation.
965   autoBeaming = ##f
966
967 }
968
969 \context {
970   \Staff
971   \name "GregorianTranscriptionStaff"
972   \alias "Staff"
973   \denies "Voice"
974   \accepts "GregorianTranscriptionVoice"
975   \defaultchild "GregorianTranscriptionVoice"
976
977   %% We can not remove Bar_engraver; otherwise clefs and custodes will
978   %% not show up any more among other line breaking issues.
979   %% Instead, we make the grob transparent.
980   \override BarLine #'transparent = ##t
981 }
982
983 \context {
984   \Voice
985   \name "MensuralVoice"
986   \alias "Voice"
987   \description "Same as @code{Voice} context, except that it is
988 accommodated for typesetting a piece in mensural style."
989
990   \remove "Slur_engraver"
991   \remove "Ligature_bracket_engraver"
992   \consists "Mensural_ligature_engraver"
993
994   %% Set default head for notes outside of \[ \].
995   \override NoteHead #'style = #'mensural
996   \override Rest #'style = #'mensural
997
998   %% There are no beams in mensural notation.
999   autoBeaming = ##f
1000 }
1001
1002 \context {
1003   \Staff
1004   \name "MensuralStaff"
1005   \alias "Staff"
1006   \denies "Voice"
1007   \defaultchild "MensuralVoice"
1008   \accepts "MensuralVoice"
1009   \description "Same as @code{Staff} context, except that it is
1010 accommodated for typesetting a piece in mensural style."
1011
1012   \consists "Custos_engraver"
1013
1014   %% We can not remove Bar_engraver; otherwise clefs and custodes will
1015   %% not show up any more among other line breaking issues.
1016   %% Instead, we make the grob transparent.
1017   \override BarLine #'transparent = ##t
1018
1019   \override StaffSymbol #'thickness = #0.6
1020
1021   %% FIXME: unit on StaffSymbol's width should be \linewidth.
1022   %% \override StaffSymbol #'width = #60.0
1023
1024   %% Choose mensural g clef on 2nd line as default.
1025   clefGlyph = #"clefs.mensural.g"
1026   middleCClefPosition = #-6
1027   middleCPosition = #-6
1028   clefPosition = #-2
1029   clefOctavation = #0
1030
1031   %% Select mensural style font.
1032   \override TimeSignature #'style = #'mensural
1033   \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1034   \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1035   \override Custos #'style = #'mensural
1036   \override Custos #'neutral-position = #3
1037   \override Custos #'neutral-direction = #DOWN
1038
1039   %% Accidentals are valid only once (same as
1040   %% #(set-accidental-style 'forget))
1041   extraNatural = ##f
1042   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
1043   autoCautionaries = #'()
1044   printKeyCancellation = ##f
1045 }
1046
1047
1048 %% Keep the old definitions in here for compatibility (they erase previous
1049 %% settings to the corresponding context!).
1050 %% For new scores, one should simply insert the \RemoveEmptyStaves settings
1051 %% into the desired context. That's just as easy, requires only one line more
1052 %% (the \*Staff), but preserves previous context mods.
1053 %% TODO: DEPRECATED_2.13.17, remove at some point in the future
1054 RemoveEmptyStaffContext = \context {
1055   \Staff
1056   \RemoveEmptyStaves
1057 }
1058
1059 AncientRemoveEmptyStaffContext = \context {
1060   \VaticanaStaff
1061   \RemoveEmptyStaves
1062 }
1063
1064 RemoveEmptyDrumStaffContext = \context {
1065   \DrumStaff
1066   \RemoveEmptyStaves
1067 }
1068
1069 RemoveEmptyRhythmicStaffContext = \context {
1070   \RhythmicStaff
1071   \RemoveEmptyStaves
1072 }
1073
1074 RemoveEmptyTabStaffContext = \context {
1075   \TabStaff
1076   \RemoveEmptyStaves
1077 }