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