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