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