]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
Fix centered dynamics with alignment-distance.
[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   \override DynamicLineSpanner #'Y-offset = #0
388
389   \description "Holds a single line of dynamics, which will be
390 centered between the staves surrounding this context."
391 }
392
393
394 \context{
395   \type "Engraver_group"
396
397   \description "Corresponds to a voice with lyrics.  Handles the
398 printing of a single line of lyrics."
399
400   \name "Lyrics"
401   instrumentName = #'()
402   shortInstrumentName = #'()
403
404   \consists "Lyric_engraver"
405   \consists "Extender_engraver"
406   \consists "Hyphen_engraver"
407   \consists "Stanza_number_engraver"
408   \consists "Instrument_name_engraver"
409   \consists "Skip_event_swallow_translator"
410   \consists "Font_size_engraver"
411   \consists "Hara_kiri_engraver"
412
413   \override VerticalAxisGroup #'remove-first = ##t
414   \override VerticalAxisGroup #'remove-empty = ##t
415   \override VerticalAxisGroup #'staff-affinity = #UP
416   \override VerticalAxisGroup #'inter-staff-spacing = #'((space . 5.5) (stretchability . 1) (padding . 0.5))
417   \override VerticalAxisGroup #'inter-loose-line-spacing = #'((space . 0) (stretchability . 0) (padding . 0.2))
418   \override VerticalAxisGroup #'non-affinity-spacing #'padding = #1.0
419   \override SeparationItem #'padding = #0.2
420   \override InstrumentName #'self-alignment-Y = ##f
421
422   %% sync with define-grobs.scm ;
423   \override InstrumentName #'font-size = #1.0
424
425   %% make sure that barlines aren't collapsed, when
426   %% Bar_engraver is there.
427   \override BarLine #'bar-size = #0.1
428
429 }
430
431 \context {
432   \type "Engraver_group"
433   \name NoteNames
434   \description "A context for printing the names of notes."
435   \consists "Axis_group_engraver"
436
437   % FIXME: not sure what the default should be here.
438   \override VerticalAxisGroup #'staff-affinity = #DOWN
439
440
441   \consists "Rest_swallow_translator"
442   \consists "Skip_event_swallow_translator"
443   \consists "Tie_engraver"
444   \consists "Note_name_engraver"
445   \consists "Separating_line_group_engraver"
446 }
447
448 \context {
449   \type "Engraver_group"
450   \name ChordNames
451   \description "Typesets chord names."
452
453   \consists "Rest_swallow_translator"
454   \consists "Output_property_engraver"
455   \consists "Separating_line_group_engraver"
456   \consists "Chord_name_engraver"
457   \consists "Skip_event_swallow_translator"
458   \consists "Hara_kiri_engraver"
459 %  \consists "Note_spacing_engraver"
460   \override VerticalAxisGroup #'remove-first = ##t
461   \override VerticalAxisGroup #'remove-empty = ##t
462   \override VerticalAxisGroup #'staff-affinity = #DOWN
463   \override VerticalAxisGroup #'inter-staff-spacing #'padding = #0.5
464   \override VerticalAxisGroup #'inter-loose-line-spacing #'padding = #0.5
465 }
466
467
468 RemoveEmptyStaffContext= \context {
469   \Staff
470   \remove "Axis_group_engraver"
471   \consists "Hara_kiri_engraver"
472   \override Beam #'auto-knee-gap = #'()
473   \override VerticalAxisGroup #'remove-empty = ##t
474 }
475
476 AncientRemoveEmptyStaffContext = \context {
477 %% why not add by default?
478
479   \RemoveEmptyStaffContext
480   \accepts "VaticanaVoice"
481   \accepts "GregorianTranscriptionVoice"
482   \accepts "MensuralVoice"
483 }
484
485 \context {
486   \type "Score_engraver"
487   \name "Score"
488
489   \description "This is the top level notation context.  No
490 other context can contain a @code{Score} context.  This context
491 handles the administration of time signatures.  It also makes sure
492 that items such as clefs, time signatures, and key-signatures are
493 aligned across staves.
494
495 You cannot explicitly instantiate a @code{Score} context (since it
496 is not contained in any other context).  It is instantiated
497 automatically when an output definition (a @code{\score} or
498 @code{\layout} block) is processed."
499
500   \consists "Paper_column_engraver"
501   \consists "Vertically_spaced_contexts_engraver"
502   \consists "Repeat_acknowledge_engraver"
503   \consists "Staff_collecting_engraver"
504
505   %% move the alias along with the engraver.
506
507   \consists "Timing_translator"
508   \consists "Default_bar_line_engraver"
509   \consists "Output_property_engraver"
510   \consists "System_start_delimiter_engraver"
511   \consists "Mark_engraver"
512   \consists "Volta_engraver"
513   \consists "Metronome_mark_engraver"
514   \consists "Break_align_engraver"
515   \consists "Spacing_engraver"
516   \consists "Grace_spacing_engraver"
517   \consists "Vertical_align_engraver"
518   \consists "Stanza_number_align_engraver"
519   \consists "Bar_number_engraver"
520   \consists "Parenthesis_engraver"
521
522   \defaultchild "Staff"
523
524   \accepts "FretBoards"
525   \accepts "Staff"
526   \accepts "RhythmicStaff"
527   \accepts "TabStaff"
528   \accepts "VaticanaStaff"
529   \accepts "GregorianTranscriptionStaff"
530   \accepts "MensuralStaff"
531   \accepts "StaffGroup"
532   \accepts "DrumStaff"
533   \accepts "Lyrics"
534   \accepts "ChordNames"
535   \accepts "GrandStaff"
536   \accepts "ChoirStaff"
537   \accepts "PianoStaff"
538   \accepts "Devnull"
539   \accepts "NoteNames"
540   \accepts "FiguredBass"
541
542
543   noteToFretFunction = #determine-frets
544   soloText = #"Solo"
545   soloIIText = #"Solo II"
546   aDueText = #"a2"
547   printPartCombineTexts = ##t
548   systemStartDelimiter =#'SystemStartBar
549
550   drumStyleTable = #drums-style
551
552   melismaBusyProperties = #default-melisma-properties
553   tieWaitForNote = ##f
554   clefGlyph = #"clefs.G"
555   clefPosition = #-2
556   middleCClefPosition = #-6
557   middleCPosition = #-6
558   firstClef = ##t
559
560   crescendoSpanner = #'hairpin
561   decrescendoSpanner = #'hairpin
562
563   defaultBarType = #"|"
564   doubleRepeatType = #":|:"
565   barNumberVisibility = #first-bar-number-invisible
566   automaticBars = ##t
567
568   explicitClefVisibility = #all-visible
569   explicitKeySignatureVisibility = #all-visible
570   implicitTimeSignatureVisibility = #end-of-line-invisible
571
572   repeatCountVisibility = #all-repeat-counts-visible
573
574   beamSettings = #default-beam-settings
575   autoBeaming = ##t
576   autoBeamCheck = #default-auto-beam-check
577   scriptDefinitions = #default-script-alist
578
579   pedalSustainStrings = #'("Ped." "*Ped." "*")
580   pedalSustainStyle = #'text
581   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
582   pedalUnaCordaStyle = #'text
583
584 %% These are in ordinary italic font, including the *,
585 %% but they are unlikely to be used,
586 %% as the default pedal-style for SostenutoPedal is 'mixed':
587 %% i.e.  Sost. Ped_____________________
588   pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
589   pedalSostenutoStyle = #'mixed
590
591   harmonicAccidentals = ##t
592   fingeringOrientations = #'(up down)
593   stringNumberOrientations = #'(up down)
594   strokeFingerOrientations = #'(right)
595
596   lyricMelismaAlignment = #LEFT
597   markFormatter = #format-mark-letters
598   rehearsalMark = #1
599   subdivideBeams = ##f
600   extraNatural = ##t
601   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0))
602   autoCautionaries = #'()
603
604   printKeyCancellation = ##t
605   keyAlterationOrder = #`(
606     (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
607     (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
608     (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
609     (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
610   )
611
612   barCheckSynchronize = ##f
613
614 %% chord names:
615   chordNameFunction = #ignatzek-chord-names
616   majorSevenSymbol = #whiteTriangleMarkup
617   chordNameSeparator = #(make-simple-markup  "/")
618   chordNameExceptions = #ignatzekExceptions
619   chordNoteNamer = #'()
620   chordRootNamer = #note-name->markup
621   chordPrefixSpacer = #0
622   chordNameExceptionsFull = #fullJazzExceptions
623   chordNameExceptionsPartial = #partialJazzExceptions
624   noChordSymbol = #(make-simple-markup "N.C.")
625
626   bassStaffProperties = #'((assign clefGlyph "clefs.F")
627   (assign clefPosition 2)
628   (assign middleCPosition 6)
629   (assign middleCClefPosition 6))
630 %% tablature:
631   stringOneTopmost = ##t
632   highStringOne = ##t
633
634 %% One may change the strings tuning as following :
635 %% The lenght of the list must be equal to the number of string
636   stringTunings = #guitar-tuning
637   tablatureFormat = #fret-number-tablature-format
638
639 %%
640   figuredBassFormatter = #format-bass-figure
641   metronomeMarkFormatter = #format-metronome-markup
642
643
644   %% See also make-voice-props-set
645   graceSettings = #`(
646     (Voice Stem direction ,UP)
647     (Voice Stem font-size -3)
648     (Voice NoteHead font-size -3)
649     (Voice TabNoteHead font-size -4)
650     (Voice Dots font-size -3)
651     (Voice Stem length-fraction 0.8)
652     (Voice Stem no-stem-extend #t)
653     (Voice Beam beam-thickness 0.384)
654     (Voice Beam length-fraction 0.8)
655     (Voice Accidental font-size -4)
656     (Voice AccidentalCautionary font-size -4)
657     (Voice Slur direction ,DOWN)
658     (Voice Script font-size -3)
659     (Voice Fingering font-size -8)
660     (Voice StringNumber font-size -8)
661   )
662
663   keepAliveInterfaces = #'(
664     rhythmic-grob-interface
665     lyric-interface
666     percent-repeat-item-interface
667     percent-repeat-interface
668
669     ;; need this, as stanza numbers are items, and appear only once.
670     stanza-number-interface
671   )
672   quotedEventTypes = #'(
673     note-event
674     rest-event
675     tie-event
676     beam-event
677     tuplet-span-event)
678   instrumentTransposition = #(ly:make-pitch 0 0 0)
679
680   verticallySpacedContexts = #'(Staff)
681   topLevelAlignment = ##t
682
683   timing = ##t
684 }
685
686
687
688
689 \context {
690   \type "Engraver_group"
691   \name "FiguredBass"
692   \description "A context for printing a figured bass line."
693
694   \consists "Figured_bass_engraver"
695   \consists "Note_swallow_translator"
696   \consists "Skip_event_swallow_translator"
697   \consists "Separating_line_group_engraver"
698   \consists "Hara_kiri_engraver"
699
700   \override VerticalAxisGroup #'remove-empty = ##t
701   \override VerticalAxisGroup #'remove-first = ##t
702   \override VerticalAxisGroup #'staff-affinity = #UP
703   \override VerticalAxisGroup #'inter-staff-spacing #'padding = #0.5
704   \override VerticalAxisGroup #'inter-loose-line-spacing #'padding = #0.5
705 }
706
707 \context {
708   \name "Devnull"
709   \type "Engraver_group"
710
711 %% don't want to route anything out of here:
712   \alias "Staff"
713   \alias "Voice"
714   \consists "Swallow_engraver"
715   \description "Silently discards all musical information given to this
716 context."
717 }
718
719 \context {
720   \Voice
721   \name "TabVoice"
722   \alias "Voice"
723   \consists "Tab_note_heads_engraver"
724   \consists "Tab_harmonic_engraver"
725
726   \remove "Note_heads_engraver"
727   \remove "Fingering_engraver"
728   \remove "New_fingering_engraver"
729
730   \description "Context for drawing notes in a Tab staff."
731
732   %% TabStaff increase the staff-space, which in turn
733   %% increases beam thickness and spacing; beams are
734   %% too big. We have to adjust the beam settings:
735   \override Beam #'beam-thickness = #0.32
736   \override Beam #'length-fraction = #0.62
737
738   %% No accidental in tablature !
739   \remove "Accidental_engraver"
740   %% make the Stems as short as possible to minimize their influence
741   %% on the slur::calc-control-points routine
742   \override Stem #'length = #0
743   \override Stem #'no-stem-extend = ##t
744   \override Stem #'flag-style = #'no-flag
745   \override Stem #'details = #'((lengths 0 0 0 0 0 0)
746                                 (beamed-lengths 0 0 0)
747                                 (beamed-minimum-free-lengths 0 0 0)
748                                 (beamed-extreme-minimum-free-lengths 0 0)
749                                 (stem-shorten 0 0))
750   %% after all, the stubs of the stems may still be visible, so ...
751   \override Stem #'transparent = ##t
752   %% automatic beams should be suppressed for similar reasons ...
753   autoBeaming = ##f
754   %% remove beams, dots and rests ...
755   \override Beam #'stencil = ##f
756   \override Dots #'stencil = ##f
757   \override Rest #'stencil = ##f
758   \override MultiMeasureRest #'stencil = ##f
759   \override MultiMeasureRestNumber #'transparent = ##t
760   %% ... all kinds of ties/slurs
761   \override Tie  #'stencil = ##f
762   \override RepeatTie #'stencil = ##f
763   \override LaissezVibrerTie #'stencil = ##f
764   \override Slur #'stencil = #slur::draw-tab-slur
765   \override PhrasingSlur #'stencil = ##f
766   %% 'tied to' fret numbers become invisible or parenthesized, respectively)
767   \override Tie #'after-line-breaking = #tie::handle-tab-note-head
768   \override RepeatTie #'after-line-breaking = #repeat-tie::handle-tab-note-head
769   %% ... and all kinds of markups, spanners etc.
770   \override TupletBracket #'stencil = ##f
771   \override TupletNumber #'stencil = ##f
772   \override DynamicText #'transparent = ##t
773   \override DynamicTextSpanner #'stencil = ##f
774   \override TextSpanner #'stencil = ##f
775   \override Hairpin #'transparent = ##t
776   \override Script #'stencil = ##f
777   \override TextScript #'stencil = ##f
778   %% the direction for glissando lines will be automatically corrected
779   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
780   \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
781                                                    (padding . 0.3))
782   \override Glissando #'bound-details #'left = #`((attach-dir . ,RIGHT)
783                                                    (padding . 0.3))
784   %% dead notes
785   \override TabNoteHead #'glyph-name = #tab-note-head::calc-glyph-name
786   \override TabNoteHead #'stencil = #tab-note-head::whiteout-if-style-set
787 }
788
789 \context {
790   \Staff
791   \alias "Staff"
792   \name "TabStaff"
793   \denies "Voice"
794   \consists "Tab_staff_symbol_engraver"
795
796   \description "Context for generating tablature. It accepts only @code{TabVoice}
797 contexts and handles the line spacing, the tablature clef etc. properly."
798
799   \accepts "TabVoice"
800   \defaultchild "TabVoice"
801
802   %% 6 strings, bigger spacing
803   \override StaffSymbol #'staff-space = #1.5
804
805   %% Don't draw stems over the tablature figures !
806   \override Stem #'avoid-note-head = ##t
807
808   %% No accidental in tablature !
809   \remove "Accidental_engraver"
810   \remove "Key_engraver"
811
812   \remove "String_number_engraver"
813   \remove "Ottava_spanner_engraver"
814   %% the clef handler
815   \override Clef #'stencil = #clef::print-modern-tab-if-set
816   %% no time signature
817   \override TimeSignature #'stencil = ##f
818   %% better parentheses in a TabStaff
819   \override ParenthesesItem #'stencils = #parentheses-item::calc-tabstaff-parenthesis-stencils
820   %% no arpeggios
821   \override Arpeggio #'stencil = ##f
822   %% we ignore collision warnings that may occur due to
823   %% stem overlapping, because we have no stems ;-)
824   \override NoteColumn #'ignore-collision = ##t
825   %% Special "TAB" clef
826   clefGlyph = #"clefs.tab"
827   clefPosition = #0
828 }
829
830 \context {
831   \Voice
832   \name "VaticanaVoice"
833   \alias "Voice"
834   \description "Same as @code{Voice} context, except that it is
835 accommodated for typesetting Gregorian Chant in the notational style
836 of Editio Vaticana."
837
838   \remove "Slur_engraver"
839   \remove "Stem_engraver"
840   \remove "Ligature_bracket_engraver"
841   \consists "Vaticana_ligature_engraver"
842
843   %% Set default head for notes outside of \[ \].
844   \override NoteHead #'style = #'vaticana.punctum
845
846   %% Put some space before and after divisiones.
847   %% FIXME: This does not seem to show any effect.
848   \override Script #'padding = #0.5
849
850   %% There are no beams in Gregorian Chant notation.
851   autoBeaming = ##f
852
853   %% Prepare TextSpanner for \episem{Initium|Finis} use.
854   %%
855   %% FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is
856   %% required to force the articulation signs being placed vertically
857   %% tightly to the correpsonding note heads.
858   %%
859   \override TextSpanner #'style = #'line
860   \override TextSpanner #'padding = #-0.1
861 }
862
863 \context {
864   \Staff
865   \name "VaticanaStaff"
866   \alias "Staff"
867   \denies "Voice"
868   \accepts "VaticanaVoice"
869   \defaultchild "VaticanaVoice"
870
871   \description "Same as @code{Staff} context, except that it is
872 accommodated for typesetting Gregorian Chant in the notational style
873 of Editio Vaticana."
874
875   \remove "Time_signature_engraver"
876   \consists "Custos_engraver"
877
878   %% We can not remove Bar_engraver; otherwise clefs and custodes will
879   %% not show up any more among other line breaking issues.
880   %% Instead, we make the grob transparent.
881   \override BarLine #'transparent = ##t
882
883   \override StaffSymbol #'line-count = #4
884   \override StaffSymbol #'thickness = #0.6
885
886   %% FIXME: unit on StaffSymbol's width should be \linewidth.
887   %% \override StaffSymbol #'width = #60.0
888
889   %% Choose vaticana do clef on 3rd line as default.
890   clefGlyph = #"clefs.vaticana.do"
891   middleCPosition = #1
892   middleCClefPosition = #1
893   clefPosition = #1
894   clefOctavation = #0
895
896   %% Select vaticana style font.
897   \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
898   \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
899   \override Custos #'style = #'vaticana
900   \override Custos #'neutral-position = #3
901   \override Custos #'neutral-direction = #DOWN
902   \override Dots #'style = #'vaticana
903 }
904
905 \context {
906   \Voice
907   \name "GregorianTranscriptionVoice"
908   \alias "Voice"
909
910   %% Removing ligature bracket engraver without replacing it by some
911   %% other ligature engraver would cause a "Junking event: `LigatureEvent'"
912   %% warning for every "\[" and "\]".  Therefore, we make the grob
913   %% transparent instead.
914   \override LigatureBracket #'transparent = ##t
915
916   %% Put some space before and after divisiones.
917   %% FIXME: This does not seem to show any effect.
918   \override Script #'padding = #0.5
919
920   %% There are no beams in Gregorian Chant notation.
921   autoBeaming = ##f
922
923   %% Prepare TextSpanner for \episem{Initium|Finis} use.
924   %%
925   %% N.B.: dash-fraction MUST be unset; otherwise, TextSpanner will
926   %% always produce dashed lines, regardless of the style property.
927   %%
928   %% FIXME: The line @code{\override TextSpanner #'padding = #-0.1} is
929   %% required to force the articulation signs being placed vertically
930   %% tightly to the correpsonding note heads.
931   %%
932   \override TextSpanner #'dash-fraction = #'()
933   \override TextSpanner #'style = #'line
934   \override TextSpanner #'padding = #-0.1
935 }
936
937 \context {
938   \Staff
939   \name "GregorianTranscriptionStaff"
940   \alias "Staff"
941   \denies "Voice"
942   \accepts "GregorianTranscriptionVoice"
943   \defaultchild "GregorianTranscriptionVoice"
944
945   %% We can not remove Bar_engraver; otherwise clefs and custodes will
946   %% not show up any more among other line breaking issues.
947   %% Instead, we make the grob transparent.
948   \override BarLine #'transparent = ##t
949 }
950
951 \context {
952   \Voice
953   \name "MensuralVoice"
954   \alias "Voice"
955   \description "Same as @code{Voice} context, except that it is
956 accommodated for typesetting a piece in mensural style."
957
958   \remove "Slur_engraver"
959   \remove "Ligature_bracket_engraver"
960   \consists "Mensural_ligature_engraver"
961
962   %% Set default head for notes outside of \[ \].
963   \override NoteHead #'style = #'mensural
964   \override Rest #'style = #'mensural
965
966   %% There are no beams in mensural notation.
967   autoBeaming = ##f
968 }
969
970 \context {
971   \Staff
972   \name "MensuralStaff"
973   \alias "Staff"
974   \denies "Voice"
975   \defaultchild "MensuralVoice"
976   \accepts "MensuralVoice"
977   \description "Same as @code{Staff} context, except that it is
978 accommodated for typesetting a piece in mensural style."
979
980   \consists "Custos_engraver"
981
982   %% We can not remove Bar_engraver; otherwise clefs and custodes will
983   %% not show up any more among other line breaking issues.
984   %% Instead, we make the grob transparent.
985   \override BarLine #'transparent = ##t
986
987   \override StaffSymbol #'thickness = #0.6
988
989   %% FIXME: unit on StaffSymbol's width should be \linewidth.
990   %% \override StaffSymbol #'width = #60.0
991
992   %% Choose mensural g clef on 2nd line as default.
993   clefGlyph = #"clefs.mensural.g"
994   middleCClefPosition = #-6
995   middleCPosition = #-6
996   clefPosition = #-2
997   clefOctavation = #0
998
999   %% Select mensural style font.
1000   \override TimeSignature #'style = #'mensural
1001   \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1002   \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1003   \override Custos #'style = #'mensural
1004   \override Custos #'neutral-position = #3
1005   \override Custos #'neutral-direction = #DOWN
1006
1007   %% Accidentals are valid only once (same as
1008   %% #(set-accidental-style 'forget))
1009   extraNatural = ##f
1010   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
1011   autoCautionaries = #'()
1012   printKeyCancellation = ##f
1013 }
1014
1015
1016 RemoveEmptyRhythmicStaffContext= \context {
1017   \RhythmicStaff
1018   \remove "Axis_group_engraver"
1019   \override VerticalAxisGroup #'remove-empty = ##t
1020   \consists "Hara_kiri_engraver"
1021 }