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