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