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