]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
*** empty log message ***
[lilypond.git] / ly / engraver-init.ly
1 \version "1.9.8"
2
3
4 %
5 % setup for Request->Element conversion. Guru-only
6 %
7
8 StaffContext=\translator {
9         \type "Engraver_group_engraver"
10         \name Staff
11
12         \description "Handles clefs, bar lines, keys, accidentals.  It can contain
13 @code{Voice} contexts."
14
15         
16         \consists "Output_property_engraver"    
17         
18         \consists "Bar_engraver"
19 % Bar_engraver must be first so default bars aren't overwritten
20 % with empty ones.
21         \consists "Font_size_engraver"
22
23 %       \consists "Repeat_engraver"
24         \consists "Volta_engraver"
25         \consists "Separating_line_group_engraver"      
26         SeparatingGroupSpanner \override #'spacing-procedure
27           =  #Separating_group_spanner::set_spacing_rods_and_seqs
28         \consists "Dot_column_engraver"
29
30         % perhaps move to Voice context?
31         \consists "Ottava_spanner_engraver"
32         \consists "Clef_engraver"
33         \consists "Key_engraver"
34         \consists "Time_signature_engraver"
35         \consists "Staff_symbol_engraver"
36         \consists "Collision_engraver"
37         \consists "Rest_collision_engraver"
38         \consists "Accidental_engraver"
39         \consists "Piano_pedal_engraver"
40         \consists "Instrument_name_engraver"
41         \consists "Grob_pq_engraver"
42         \consists "Forbid_line_break_engraver"
43         \consists "String_number_engraver"
44         \consistsend "Axis_group_engraver"
45
46         minimumVerticalExtent = #'(-6 . 6)
47         extraVerticalExtent = ##f
48         verticalExtent = ##f 
49         localKeySignature = #'()
50
51         % explicitly set instrument, so we don't get 
52         % weird effects when doing instrument names for
53         % piano staves
54
55         instrument = #'()
56         instr = #'()
57           
58         \accepts "Voice"
59 }
60
61
62 StaffContainerContext = \translator {
63         \type Engraver_group_engraver
64         \consists "Axis_group_engraver"
65         minimumVerticalExtent = ##f
66         extraVerticalExtent = ##f
67         verticalExtent = ##f 
68         localKeySignature = #'()
69
70         \accepts Staff
71         \name StaffContainer
72 }
73
74 InnerChoirStaffContext = \translator {
75         \type "Engraver_group_engraver"
76         \name InnerChoirStaff
77         \consists "System_start_delimiter_engraver"
78         systemStartDelimiter = #'SystemStartBracket
79         localKeySignature = #'()
80
81         \accepts "Staff"
82         \accepts "RhythmicStaff"
83         \accepts "GrandStaff"
84         \accepts "PianoStaff"
85         \accepts "Lyrics"
86         \accepts "ChordNames"
87 }
88
89 ChoirStaffContext = \translator {
90         \InnerChoirStaffContext
91         \name ChoirStaff
92         
93         \description "Identical to @code{StaffGroup} except that the
94     contained staves are not connected vertically."
95         
96         \accepts "InnerChoirStaff"
97         \accepts "InnerStaffGroup"
98 }
99
100
101 RhythmicStaffContext=\translator{
102         \type "Engraver_group_engraver"
103         
104         \consists "Output_property_engraver"    
105
106 \description  "
107     A context like @code{Staff} but for printing rhythms.  Pitches are
108     ignored; the notes are printed on one line.  
109 "
110         minimumVerticalExtent = ##f
111         extraVerticalExtent = ##f
112         verticalExtent = ##f 
113         localKeySignature = #'()
114
115         \consists "Pitch_squash_engraver"
116         \consists "Separating_line_group_engraver"      
117         \name RhythmicStaff
118         \alias "Staff"
119         
120         BarLine \override #'bar-size = #4
121         VoltaBracket \override #'minimum-space =  #15  % urg, in \pt
122         VoltaBracket \override #'padding =  #5  % urg, in \pt
123         StaffSymbol \override #'line-count = #1 
124
125         Stem \override #'neutral-direction = #1
126         Beam \override #'neutral-direction = #1         
127 %       \consists "Repeat_engraver"
128         \consists "Dot_column_engraver"
129         \consists "Volta_engraver"
130         \consists "Bar_engraver"
131         \consists "Time_signature_engraver"
132         \consists "Staff_symbol_engraver"
133         \consists "Instrument_name_engraver"
134         \consistsend "Axis_group_engraver"
135         \accepts "Voice"
136 }
137
138
139 VoiceContext = \translator {
140         \type "Engraver_group_engraver"
141         \name Voice
142
143 \description "
144     Corresponds to a voice on a staff.  This context handles the
145     conversion of dynamic signs, stems, beams, super- and subscripts,
146     slurs, ties, and rests.
147
148     You have to instantiate this explicitly if you want to have
149     multiple voices on the same staff."
150
151         localKeySignature = #'()
152         \consists "Font_size_engraver"
153         
154         % must come before all
155         \consists "Voice_devnull_engraver"
156         \consists "Output_property_engraver"    
157         \consists "Arpeggio_engraver"
158         \consists "Multi_measure_rest_engraver"
159         \consists "Text_spanner_engraver"
160         \consists "Grob_pq_engraver"
161
162         \consists "Note_head_line_engraver"
163         \consists "Glissando_engraver"
164         \consists "Ligature_bracket_engraver"
165         \consists "Breathing_sign_engraver"
166         % \consists "Rest_engraver"
167         \consists "Stem_engraver"
168         \consists "Beam_engraver"
169         \consists "Grace_beam_engraver"
170         \consists "Auto_beam_engraver"
171         \consists "New_fingering_engraver"
172         \consists "Chord_tremolo_engraver"
173         \consists "Percent_repeat_engraver"
174         \consists "Slash_repeat_engraver"
175         \consists "Melisma_engraver"
176
177 %{
178  Must come before text_engraver, but after note_column engraver.
179
180 %}
181         \consists "Text_engraver"
182         \consists "Dynamic_engraver"
183         \consists "Fingering_engraver"
184
185         \consists "Script_engraver"
186         \consists "Script_column_engraver"
187         \consists "Rhythmic_column_engraver"
188         \consists "Phrasing_slur_engraver"
189         \consists "Cluster_spanner_engraver"
190         \consists "Slur_engraver"
191         \consists "Tie_engraver"
192         \consists "Tuplet_engraver"
193         \consists "A2_engraver"
194
195         \consists "Skip_event_swallow_translator"
196         \accepts Thread % bug if you leave out this!
197 }
198
199 ThreadContext = \translator{
200         \type Engraver_group_engraver
201         \name Thread
202         localKeySignature = #'()
203 \description "
204     Handles note heads, and is contained in the Voice context.  You
205     have to instantiate this explicitly if you want to adjust the
206     style of individual note heads.
207 "
208         \consists "Font_size_engraver"  
209         \consists "Thread_devnull_engraver"
210         \consists "Note_heads_engraver"
211         \consists "Rest_engraver"
212
213         % why here ? 
214         \consists "Output_property_engraver"    
215 }
216
217
218
219 GrandStaffContext=\translator{
220         \type "Engraver_group_engraver"
221         \name GrandStaff
222         localKeySignature = #'()
223         
224         \description " A group of staffs, with a brace on the left
225     side, grouping the staves together.  The bar lines of the
226     contained staves are connected vertically.  "
227
228         \consists "Span_bar_engraver"
229         \consists "Span_arpeggio_engraver"
230         \consists "System_start_delimiter_engraver"
231         systemStartDelimiter = #'SystemStartBrace
232
233         \accepts "Staff"
234 }
235
236 PianoStaffContext = \translator{
237         \GrandStaffContext
238         \name "PianoStaff"
239         \alias "GrandStaff"
240 \description "
241     Just like @code{GrandStaff} but with @code{minVerticalAlign} set
242     equal to @code{maxVerticalAlign} so that interstaff beaming and
243     slurring can be used."
244         verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
245         VerticalAlignment \override #'forced-distance = #12
246         VerticalAlignment \override #'self-alignment-Y = #0
247
248         \consists "Vertical_align_engraver"
249         \consists "Instrument_name_engraver"
250         
251         instrument = #'()
252         instr = #'()
253         
254 %       \consistsend "Axis_group_engraver"
255 }
256
257 InnerStaffGroupContext= \translator {
258         \type "Engraver_group_engraver"
259         \name InnerStaffGroup
260         localKeySignature = #'()
261
262         \consists "Span_bar_engraver"
263         \consists "Span_arpeggio_engraver"
264         \consists "Output_property_engraver"    
265         systemStartDelimiter = #'SystemStartBracket
266
267         \consists "System_start_delimiter_engraver"
268         \accepts "Staff"
269         \accepts "RhythmicStaff"
270         \accepts "GrandStaff"
271         \accepts "PianoStaff"
272         \accepts "TabStaff"     
273         \accepts "Lyrics"
274         \accepts "ChordNames"
275 }
276
277 StaffGroupContext = \translator {
278         \InnerStaffGroupContext
279         \name StaffGroup
280         
281         \description
282
283         " Groups staffs while adding a bracket on the left side,
284         grouping the staves together.  The bar lines of the contained
285         staves are connected vertically.
286 "
287         
288         \accepts "InnerChoirStaff"
289         \accepts "ChoirStaff"
290         \accepts "InnerStaffGroup"
291         \accepts "FiguredBass"
292 }
293
294
295 % UGH! JUNKME
296 LyricsVoiceContext= \translator{
297         \type "Engraver_group_engraver"
298         \consistsend "Hara_kiri_engraver"
299         minimumVerticalExtent = #'(-1.2 . 2.4)
300         extraVerticalExtent = ##f
301         verticalExtent = ##f
302
303         \description "
304     Corresponds to a voice with lyrics.  Handles the printing of a
305     single line of lyrics.
306 "
307         
308         \name LyricsVoice 
309         \consists "Separating_line_group_engraver"
310         \consists "Lyric_engraver"
311         \consists "Extender_engraver"
312         \consists "Hyphen_engraver"
313         \consists "Stanza_number_engraver"
314         \consists "Skip_event_swallow_translator"
315         phrasingPunctuation = #".,:!?\""
316         SeparationItem \set #'padding = #0.5
317 }
318 NoteNamesContext = \translator {
319         \type "Engraver_group_engraver"
320         \name NoteNames
321         \consistsend "Axis_group_engraver"
322
323         minimumVerticalExtent = ##f
324         extraVerticalExtent = ##f
325         verticalExtent = ##f 
326
327         
328         \consists "Rest_swallow_translator" 
329         \consists "Skip_event_swallow_translator"
330         \consists "Tie_engraver"
331         \consists "Note_swallow_translator"
332         \consists "Note_name_engraver"
333         \consists "Separating_line_group_engraver"
334 }
335
336 LyricsContext = \translator {
337         \type "Engraver_group_engraver"
338         \name Lyrics
339         \description  "Typesets lyrics."
340         %% To get folded repeats right.
341         \consists Vertical_align_engraver 
342
343 %       \consistsend "Hara_kiri_engraver"
344         minimumVerticalExtent = ##f
345         extraVerticalExtent = ##f
346         verticalExtent = ##f 
347         
348         \accepts "LyricsVoice"
349 }
350
351
352 ChordNamesContext = \translator {
353         \type "Engraver_group_engraver"
354         \name ChordNames
355         \description "Typesets chord names."
356         
357         \consists "Rest_swallow_translator" 
358         \consists "Output_property_engraver"    
359         \consists "Separating_line_group_engraver"
360         \consists "Chord_name_engraver"
361         \consists "Skip_event_swallow_translator"
362         \consistsend "Hara_kiri_engraver"
363         
364         minimumVerticalExtent = #'(0 . 2.5)
365         extraVerticalExtent = ##f
366         verticalExtent = ##f 
367 }
368
369
370 RemoveEmptyStaffContext = \translator {
371         \StaffContext
372         \remove "Axis_group_engraver"
373         \consistsend "Hara_kiri_engraver"
374         \accepts "Voice"
375
376         % hara kiri & auto knee don't work together.
377         Beam \override #'auto-knee-gap = #'()
378 }
379
380 RemoveEmptyStaffContext = \translator {
381         \RemoveEmptyStaffContext
382         \accepts "VaticanaVoice"
383         \accepts "GregorianTranscriptionVoice"
384 }
385
386 ScoreContext = \translator {
387         \type Score_engraver
388         \name Score
389         localKeySignature = #'()
390
391         \description "This is the top level notation context.  No
392     other context can contain a @code{Score} context.  This context
393     handles the administration of time signatures.  It also makes sure
394     that items such as clefs, time signatures, and key-signatures are
395     aligned across staves.
396
397     You cannot explicitly instantiate a Score context (since it is
398     not contained in any other context).  It is instantiated
399     automatically when an output definition (a @code{\score} or
400     @code{\paper} block) is processed."
401         
402         \consists "Repeat_acknowledge_engraver"
403         \consists "Staff_collecting_engraver"
404
405         % move the alias along with the engraver.
406
407         %% TODO? add this alias from Timing_engraver::initialize() ? 
408         \consists "Timing_engraver"
409         \alias "Timing"
410         
411         \consists "Output_property_engraver"
412         \consists "System_start_delimiter_engraver"
413         \consists "Mark_engraver"       
414         \consists "Metronome_mark_engraver"     
415         \consists "Break_align_engraver"
416         \consists "Spacing_engraver"
417         \consists "Vertical_align_engraver"
418         \consists "Lyric_phrasing_engraver"
419         \consists "Bar_number_engraver"
420         \consists "Span_arpeggio_engraver"
421
422         \accepts "Staff"
423         \accepts "TabStaff"
424         \accepts "VaticanaStaff"
425         \accepts "GregorianTranscriptionStaff"
426         \accepts "StaffContainer"
427         \accepts "StaffGroup"
428         \accepts "RhythmicStaff"
429         \accepts "Lyrics"
430         \accepts "ChordNames"
431         \accepts "GrandStaff"
432         \accepts "ChoirStaff"
433         \accepts "PianoStaff"
434         \accepts "NoteNames"
435         \accepts "FiguredBass"
436
437         soloText = #"Solo"
438         soloIIText = #"Solo II"
439         aDueText = #"a2"
440         soloADue = ##t
441         splitInterval = #'(0 . 1)
442         changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
443         systemStartDelimiter =#'SystemStartBar
444
445         melismaBusyProperties = #'(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy)
446         
447         clefGlyph = #"clefs-G"
448         clefPosition = #-2
449         centralCPosition = #-6
450         
451         automaticPhrasing = ##t
452         automaticMelismata = ##t
453         
454         defaultBarType = #"|"
455         barNumberVisibility = #default-bar-number-visibility
456         automaticBars = ##t
457         
458         explicitClefVisibility = #all-visible
459         explicitKeySignatureVisibility = #all-visible
460         autoBeamSettings = #default-auto-beam-settings
461         autoBeaming = ##t
462         scriptDefinitions = #default-script-alist
463
464         verticalAlignmentChildCallback = #Align_interface::alignment_callback
465
466         pedalSustainStrings = #'("Ped." "*Ped." "*")
467         pedalSustainStyle = #'text
468         pedalUnaCordaStrings = #'("una corda" "" "tre corde")
469         pedalUnaCordaStyle = #'text
470
471         %% These are in ordinary italic font, including the *,
472         %% but they are unlikely to be used, 
473         %% as the default pedal-style for SostenutoPedal is 'mixed':
474         %% i.e.  Sost. Ped_____________________ 
475         pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
476         pedalSostenutoStyle = #'mixed
477
478         fingeringOrientations = #'(up down)
479         tupletNumberFormatFunction = #denominator-tuplet-formatter
480         
481         subdivideBeams = ##f
482         allowBeamBreak = ##f
483         extraNatural = ##t
484         autoAccidentals = #'(Staff (same-octave . 0))
485         autoCautionaries = #'()  
486
487        keyAccidentalOrder = #`(
488          (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
489          (3  . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
490          (6 . ,DOUBLE-FLAT) (2  . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1  . ,DOUBLE-FLAT) (4  . ,DOUBLE-FLAT) (0  . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
491          (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
492         )
493         breakAlignOrder = #'(
494           instrument-name
495           left-edge
496           ambitus
497           breathing-sign
498           clef
499           staff-bar
500           key-signature
501           time-signature
502           custos
503         )
504         barCheckSynchronize = ##t
505         
506         %% chord names:
507         chordNameFunction = #ignatzek-chord-names
508         majorSevenSymbol = #whiteTriangleMarkup
509         chordNameSeparator = #(make-simple-markup  "/")
510         chordNameExceptions = #ignatzekExceptions
511         chordNoteNamer = #'()
512         chordRootNamer = #note-name->markup
513
514         chordNameExceptionsFull = #fullJazzExceptions
515         chordNameExceptionsPartial = #partialJazzExceptions
516         
517         %% tablature:
518         stringOneTopmost = ##t
519         highStringOne = ##t
520
521         %% One may change the strings tuning as following :
522         %% The lenght of the list must be equal to the number of string
523         stringTunings   = #guitar-tunings
524         tablatureFormat = #fret-number-tablature-format
525
526         %%
527         bassFigureFormatFunction = #make-bass-figure-markup
528         metronomeMarkFormatter = #make-metronome-markup
529
530
531         graceSettings = #`#(
532                  (Voice Stem direction 1)
533
534                  ;; TODO: should take from existing definition.
535                  ;; c&p from define-grobs.scm
536                  
537                  (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
538                  (Voice Stem stem-shorten (0.4 0))
539                  (Voice Stem  font-size -3)
540                  (Voice NoteHead  font-size -3)
541                  (Voice Dots  font-size -3)
542                  (Voice Stem beamed-lengths  
543                   ,(map (lambda (x) (* 0.8 x)) '(3.26)))
544                  (Voice Stem beamed-minimum-free-lengths  
545                   ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
546                  (Voice Stem beamed-extreme-minimum-free-lengths  
547                   ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
548
549                  (Voice Stem no-stem-extend #t)
550                  (Voice Beam thickness 0.384)
551                  (Voice Beam space-function ,(lambda (beam mult)
552                                                 (* 0.8 (Beam::space_function
553                                                         beam mult))))
554                  (Voice Beam position-callbacks (,Beam::least_squares
555                                                     ,Beam::check_concave
556                                                     ,Beam::slope_damping))
557                  (Staff Accidental font-size -4)
558                  (Voice Slur direction -1)
559         )
560         
561         \grobdescriptions #all-grob-descriptions
562 }
563
564 OrchestralScoreContext= \translator {
565         \ScoreContext
566 }
567
568 EasyNotation =  \translator {
569         \ScoreContext
570         NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
571         NoteHead \override #'Y-extent-callback = #'()
572         NoteHead \override #'X-extent-callback = #'()
573 }
574
575
576
577 FiguredBassContext = \translator {
578         \type "Engraver_group_engraver"
579         \name FiguredBass 
580         \consists "Figured_bass_engraver"
581         \consists "Rest_swallow_translator"
582         \consists "Note_swallow_translator"
583         \consists "Separating_line_group_engraver"
584         
585         \consistsend "Hara_kiri_engraver"
586 }
587
588 TabVoiceContext =   \translator {
589       \VoiceContext
590       \name "TabVoice"
591       \denies "Thread"
592       \consists "Tab_note_heads_engraver"
593       \remove "Fingering_engraver"
594       \remove "New_fingering_engraver"
595       
596       Slur \override #'font-family       = #'roman
597       Slur \override #'molecule-callback = #hammer-molecule-callback
598       Slur \override #'direction    = #-1
599
600       % Draws all stems/beams out of the staff (and not in the middle of the staff !)
601       % This feature is now disabled because most of the tab does not use it.
602       %Beam \override #'damping = #100000
603       %Stem \override #'up-to-staff = ##t
604
605       % No accidental in tablature !
606       \remove Accidental_engraver
607 }
608
609 TabStaffContext = \translator {
610       \StaffContext
611       \alias "Staff"
612       \name "TabStaff"
613       \denies "Voice"
614
615       \description "Context for generating tablature. [DOCME]"
616
617 %{
618       TODO: this context should use a special staff_symbol engraver that
619       takes the line count out of the stringTunings property.
620
621 %}
622       
623       
624       \accepts "TabVoice"
625       
626       % 6 strings
627       StaffSymbol \override #'line-count  = #6
628       StaffSymbol \override #'staff-space = #1.5
629
630      % Don't draw stems over the tablature figures !
631       Stem \override #'avoid-note-head = ##t
632       
633       % No accidental in tablature !
634       \remove "Accidental_engraver"
635       \remove "Key_engraver"
636       \remove "String_number_engraver"
637       % Special "TAB" clef
638       clefGlyph = #"clefs-tab"
639       clefPosition = #0
640 }
641
642 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
643 % but this does not work (is this a bug or intended behaviour?):
644 %
645 % If I try to do so, I get "error: unknown escaped string:
646 % `\VaticanaStaffContext'" in params-init.ly.  If I also move
647 % "\translator { \Vaticana*Context }" from params-init.ly to the end
648 % of gregorian-init.ly, then I get "error: parse error, unexpected
649 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
650 % gregorian-init.ly. --jr
651
652 VaticanaVoiceContext = \translator {
653   \VoiceContext
654   \name "VaticanaVoice"
655   \alias "Voice"
656   \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
657
658   % We can not remove Slur_engraver, since \addlyrics depends on it.
659   % Instead, we make the grob transparent.
660   % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
661   % infinite steepness reqd"), since in ligatures, all note heads are in
662   % the same paper column such that the (transparent) slurs eventually may
663   % start and end in the same column.
664   Slur \override #'transparent = ##t
665
666   % We can not remove Stem_engraver, since slurs depend on stems.  If
667   % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
668   % in position 1 (expecting grob): ()".
669   % As a workaround, we make the grob transparent.
670   Stem \set #'transparent = ##t
671
672   % Since we do not remove stems, but only make it transparent, we have
673   % to set the length to 0.0.  Otherwise, articulation marks (such as
674   % ictus, circulus or accentus) may be vertically placed quite away from
675   % the note head.
676   Stem \set #'length = #'0.0
677
678   \remove "Ligature_bracket_engraver"
679   \consists "Vaticana_ligature_engraver"
680
681   % Set default head for notes outside of \[ \].
682   NoteHead \set #'style = #'vaticana_punctum
683
684   % Put some space before and after divisiones.
685   % FIXME: This does not seem to show any effect.
686   Script \set #'padding = #0.5
687
688   % There are no beams in Gregorian Chant notation.
689   autobeaming = ##f
690
691   % Prepare TextSpanner for \episem{Initium|Finis} use.
692   TextSpanner \set #'style = #'line
693   TextSpanner \set #'edge-height = #'(0 . 0)
694   TextSpanner \set #'padding = #0.5
695   TextSpanner \set #'enclose-bounds = ##t
696   TextSpanner \set #'edge-text = #'("" . "")
697 }
698
699 VaticanaStaffContext = \translator {
700   \StaffContext
701   \name "VaticanaStaff"
702   \alias "Staff"
703   \denies "Voice"
704   \accepts "VaticanaVoice"
705   \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
706
707   \remove "Time_signature_engraver"
708   \consists "Custos_engraver"
709
710   % We can not remove Bar_engraver; otherwise clefs and custodes will
711   % not show up any more among other line breaking issues.
712   % Instead, we make the grob transparent.
713   BarLine \set #'transparent = ##t
714
715   StaffSymbol \set #'line-count = #4
716   StaffSymbol \set #'thickness = #0.6
717
718   % FIXME: unit on StaffSymbol's width should be \linewidth.
719   % StaffSymbol \set #'width = #60.0
720
721   % Choose vaticana do clef on 3rd line as default.
722   clefGlyph = #"clefs-vaticana_do"
723   centralCPosition = #1
724   clefPosition = #1
725   clefOctavation = #0
726
727   % Select vaticana style font.
728   KeySignature \set #'style = #'vaticana
729   Accidental \set #'style = #'vaticana
730   Custos \set #'style = #'vaticana
731   Custos \set #'neutral-position = #3
732   Custos \set #'neutral-direction = #-1
733   Custos \set #'adjust-if-on-staffline = ##t
734
735   % Score.timing = ##f
736   % Score.barAlways = ##t
737 }
738
739 GregorianTranscriptionVoiceContext = \translator {
740   \VoiceContext
741   \name "GregorianTranscriptionVoice"
742   \alias "Voice"
743
744   % Removing ligature bracket engraver without replacing it by some
745   % other ligature engraver would cause a "Junking event: `LigatureEvent'"
746   % warning for every "\[" and "\]".  Therefore, we make the grob
747   % transparent instead.
748   LigatureBracket \set #'transparent = ##t
749
750   % We can not remove Slur_engraver, since \addlyrics depends on it.
751   % Instead, we make the grob transparent.
752   % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
753   % infinite steepness reqd"), since in ligatures, all note heads are in
754   % the same paper column such that the (transparent) slurs eventually may
755   % start and end in the same column.
756   Slur \override #'transparent = ##t
757
758   % We can not remove Stem_engraver, since slurs depend on stems.  If
759   % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
760   % in position 1 (expecting grob): ()".
761   % As a workaround, we make the grob transparent.
762   Stem \set #'transparent = ##t
763
764   % Since we do not remove stems, but only make it transparent, we have
765   % to set the length to 0.0.  Otherwise, articulation marks (such as
766   % ictus, circulus or accentus) may be vertically placed quite away from
767   % the note head.
768   Stem \set #'length = #'0.0
769
770   % Put some space before and after divisiones.
771   % FIXME: This does not seem to show any effect.
772   Script \set #'padding = #0.5
773
774   % There are no beams in Gregorian Chant notation.
775   autobeaming = ##f
776
777   % Prepare TextSpanner for \episem{Initium|Finis} use.
778   TextSpanner \set #'style = #'line
779   TextSpanner \set #'edge-height = #'(0 . 0)
780   TextSpanner \set #'padding = #0.5
781   TextSpanner \set #'enclose-bounds = ##t
782   TextSpanner \set #'edge-text = #'("" . "")
783 }
784
785 GregorianTranscriptionStaffContext = \translator {
786   \StaffContext
787   \name "GregorianTranscriptionStaff"
788   \alias "Staff"
789   \denies "Voice"
790   \accepts "GregorianTranscriptionVoice"
791
792   % We can not remove Bar_engraver; otherwise clefs and custodes will
793   % not show up any more among other line breaking issues.
794   % Instead, we make the grob transparent.
795   BarLine \set #'transparent = ##t
796 }