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