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