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