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