]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
746213a6c716c44589fbc56ec628c15e6e3833aa
[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 "Note_name_engraver"
329         \consists "Separating_line_group_engraver"
330 }
331
332 LyricsContext = \translator {
333         \type "Engraver_group_engraver"
334         \name Lyrics
335         \description  "Typesets lyrics."
336         %% To get folded repeats right.
337         \consists Vertical_align_engraver 
338
339 %       \consistsend "Hara_kiri_engraver"
340         minimumVerticalExtent = ##f
341         extraVerticalExtent = ##f
342         verticalExtent = ##f 
343         
344         \accepts "LyricsVoice"
345 }
346
347
348 ChordNamesContext = \translator {
349         \type "Engraver_group_engraver"
350         \name ChordNames
351         \description "Typesets chord names."
352         
353         \consists "Rest_swallow_translator" 
354         \consists "Output_property_engraver"    
355         \consists "Separating_line_group_engraver"
356         \consists "Chord_name_engraver"
357         \consists "Skip_event_swallow_translator"
358         \consistsend "Hara_kiri_engraver"
359         
360         minimumVerticalExtent = #'(0 . 2.5)
361         extraVerticalExtent = ##f
362         verticalExtent = ##f 
363 }
364
365
366 RemoveEmptyStaffContext = \translator {
367         \StaffContext
368         \remove "Axis_group_engraver"
369         \consistsend "Hara_kiri_engraver"
370         \accepts "Voice"
371
372         % hara kiri & auto knee don't work together.
373         Beam \override #'auto-knee-gap = #'()
374 }
375
376 RemoveEmptyStaffContext = \translator {
377         \RemoveEmptyStaffContext
378         \accepts "VaticanaVoice"
379         \accepts "GregorianTranscriptionVoice"
380 }
381
382 ScoreContext = \translator {
383         \type Score_engraver
384         \name Score
385         localKeySignature = #'()
386
387         \description "This is the top level notation context.  No
388     other context can contain a @code{Score} context.  This context
389     handles the administration of time signatures.  It also makes sure
390     that items such as clefs, time signatures, and key-signatures are
391     aligned across staves.
392
393     You cannot explicitly instantiate a Score context (since it is
394     not contained in any other context).  It is instantiated
395     automatically when an output definition (a @code{\score} or
396     @code{\paper} block) is processed."
397         
398         \consists "Repeat_acknowledge_engraver"
399         \consists "Staff_collecting_engraver"
400
401         % move the alias along with the engraver.
402
403         %% TODO? add this alias from Timing_engraver::initialize() ? 
404         \consists "Timing_engraver"
405         \alias "Timing"
406         
407         \consists "Output_property_engraver"
408         \consists "System_start_delimiter_engraver"
409         \consists "Mark_engraver"       
410         \consists "Metronome_mark_engraver"     
411         \consists "Break_align_engraver"
412         \consists "Spacing_engraver"
413         \consists "Vertical_align_engraver"
414         \consists "Lyric_phrasing_engraver"
415         \consists "Bar_number_engraver"
416         \consists "Span_arpeggio_engraver"
417
418         \accepts "Staff"
419         \accepts "TabStaff"
420         \accepts "VaticanaStaff"
421         \accepts "GregorianTranscriptionStaff"
422         \accepts "StaffContainer"
423         \accepts "StaffGroup"
424         \accepts "RhythmicStaff"
425         \accepts "Lyrics"
426         \accepts "ChordNames"
427         \accepts "GrandStaff"
428         \accepts "ChoirStaff"
429         \accepts "PianoStaff"
430         \accepts "NoteNames"
431         \accepts "FiguredBass"
432
433         soloText = #"Solo"
434         soloIIText = #"Solo II"
435         aDueText = #"a2"
436         soloADue = ##t
437         splitInterval = #'(0 . 1)
438         changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
439         systemStartDelimiter =#'SystemStartBar
440
441         melismaBusyProperties = #'(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy)
442         
443         clefGlyph = #"clefs-G"
444         clefPosition = #-2
445         centralCPosition = #-6
446         
447         automaticPhrasing = ##t
448         automaticMelismata = ##t
449         
450         defaultBarType = #"|"
451         barNumberVisibility = #default-bar-number-visibility
452         automaticBars = ##t
453         
454         explicitClefVisibility = #all-visible
455         explicitKeySignatureVisibility = #all-visible
456         autoBeamSettings = #default-auto-beam-settings
457         autoBeaming = ##t
458         scriptDefinitions = #default-script-alist
459
460         verticalAlignmentChildCallback = #Align_interface::alignment_callback
461
462         pedalSustainStrings = #'("Ped." "*Ped." "*")
463         pedalSustainStyle = #'text
464         pedalUnaCordaStrings = #'("una corda" "" "tre corde")
465         pedalUnaCordaStyle = #'text
466
467         %% These are in ordinary italic font, including the *,
468         %% but they are unlikely to be used, 
469         %% as the default pedal-style for SostenutoPedal is 'mixed':
470         %% i.e.  Sost. Ped_____________________ 
471         pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*") 
472         pedalSostenutoStyle = #'mixed
473
474         fingeringOrientations = #'(up down)
475         tupletNumberFormatFunction = #denominator-tuplet-formatter
476         
477         subdivideBeams = ##f
478         allowBeamBreak = ##f
479         extraNatural = ##t
480         autoAccidentals = #'(Staff (same-octave . 0))
481         autoCautionaries = #'()  
482
483        keyAccidentalOrder = #'(
484          (6 . -1) (2  . -1) (5 . -1 ) (1  . -1) (4  . -1) (0  . -1) (3  . -1)
485          (3  . 1) (0 . 1) (4 . 1) (1 . 1) (5 . 1) (2 . 1) (6 . 1)
486          (6 . -2) (2  . -2) (5 . -2 ) (1  . -2) (4  . -2) (0  . -2) (3 . -2)
487          (3  . 2) (0 . 2) (4 . 2) (2 . 2) (5 . 2) (2 . 2) (6 . 2)
488         )
489         breakAlignOrder = #'(
490           instrument-name
491           left-edge
492           ambitus
493           breathing-sign
494           clef
495           staff-bar
496           key-signature
497           time-signature
498           custos
499         )
500         barCheckSynchronize = ##t
501         
502         %% chord names:
503         chordNameFunction = #ignatzek-chord-names
504         majorSevenSymbol = #whiteTriangleMarkup
505         chordNameSeparator = #(make-simple-markup  "/")
506         chordNameExceptions = #ignatzekExceptions
507         chordNoteNamer = #'()
508         chordRootNamer = #note-name->markup
509
510         chordNameExceptionsFull = #fullJazzExceptions
511         chordNameExceptionsPartial = #partialJazzExceptions
512         
513         %% tablature:
514         stringOneTopmost = ##t
515         highStringOne = ##t
516
517         %% One may change the strings tuning as following :
518         %% The lenght of the list must be equal to the number of string
519         stringTunings   = #guitar-tunings
520         tablatureFormat = #fret-number-tablature-format
521
522         %%
523         bassFigureFormatFunction = #make-bass-figure-markup
524         metronomeMarkFormatter = #make-metronome-markup
525
526
527         graceSettings = #`#(
528                  (Voice Stem direction 1)
529
530                  ;; TODO: should take from existing definition.
531                  ;; c&p from define-grobs.scm
532                  
533                  (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
534                  (Voice Stem stem-shorten (0.4 0))
535                  (Voice Stem font-relative-size -1)
536                  (Voice NoteHead font-relative-size -1)
537                  (Voice Dots font-relative-size -1)
538                  (Voice Stem beamed-lengths  
539                   ,(map (lambda (x) (* 0.8 x)) '(3.26)))
540                  (Voice Stem beamed-minimum-free-lengths  
541                   ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
542                  (Voice Stem beamed-extreme-minimum-free-lengths  
543                   ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
544
545                  (Voice Stem no-stem-extend #t)
546                  (Voice Beam thickness 0.384)
547                  (Voice Beam space-function ,(lambda (beam mult)
548                                                 (* 0.8 (Beam::space_function
549                                                         beam mult))))
550                  (Voice Beam position-callbacks (,Beam::least_squares
551                                                     ,Beam::check_concave
552                                                     ,Beam::slope_damping))
553                  (Staff Accidental font-relative-size -2)
554                  (Voice Slur direction -1)
555         )
556         
557         \grobdescriptions #all-grob-descriptions
558 }
559
560 OrchestralScoreContext= \translator {
561         \ScoreContext
562 }
563
564 EasyNotation =  \translator {
565         \ScoreContext
566         NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
567 }
568
569
570
571 FiguredBassContext = \translator {
572         \type "Engraver_group_engraver"
573         \name FiguredBass 
574         \consists "Figured_bass_engraver"
575         \consists "Rest_swallow_translator"
576         \consists "Note_swallow_translator"
577         \consists "Separating_line_group_engraver"
578         
579         \consistsend "Hara_kiri_engraver"
580 }
581
582 TabVoiceContext =   \translator {
583       \VoiceContext
584       \name "TabVoice"
585       \denies "Thread"
586       \consists "Tab_note_heads_engraver"
587       \remove "Fingering_engraver"
588       \remove "New_fingering_engraver"
589       
590       Slur \override #'font-family       = #'roman
591       Slur \override #'molecule-callback = #hammer-molecule-callback
592       Slur \override #'direction    = #-1
593
594       % Draws all stems/beams out of the staff (and not in the middle of the staff !)
595       % This feature is now disabled because most of the tab does not use it.
596       %Beam \override #'damping = #100000
597       %Stem \override #'up-to-staff = ##t
598
599       % No accidental in tablature !
600       \remove Accidental_engraver
601 }
602
603 TabStaffContext = \translator {
604       \StaffContext
605       \alias "Staff"
606       \name "TabStaff"
607       \denies "Voice"
608
609       \description "Context for generating tablature. [DOCME]"
610       
611       \accepts "TabVoice"
612       
613       % 6 strings
614       StaffSymbol \override #'line-count  = #6
615       StaffSymbol \override #'staff-space = #1.5
616
617      % Don't draw stems over the tablature figures !
618       Stem \override #'avoid-note-head = ##t
619       
620       % No accidental in tablature !
621       \remove Accidental_engraver
622       \remove Key_engraver
623
624       % Special "TAB" clef
625       clefGlyph = #"clefs-tab"
626       clefPosition = #0
627 }
628
629 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
630 % but this does not work (is this a bug or intended behaviour?):
631 %
632 % If I try to do so, I get "error: unknown escaped string:
633 % `\VaticanaStaffContext'" in params-init.ly.  If I also move
634 % "\translator { \Vaticana*Context }" from params-init.ly to the end
635 % of gregorian-init.ly, then I get "error: parse error, unexpected
636 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
637 % gregorian-init.ly. --jr
638
639 VaticanaVoiceContext = \translator {
640   \VoiceContext
641   \name "VaticanaVoice"
642   \alias "Voice"
643   \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
644
645   % We can not remove Slur_engraver, since \addlyrics depends on it.
646   % Instead, we make the grob transparent.
647   % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
648   % infinite steepness reqd"), since in ligatures, all note heads are in
649   % the same paper column such that the (transparent) slurs eventually may
650   % start and end in the same column.
651   Slur \override #'transparent = ##t
652
653   % We can not remove Stem_engraver, since slurs depend on stems.  If
654   % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
655   % in position 1 (expecting grob): ()".
656   % As a workaround, we make the grob transparent.
657   Stem \set #'transparent = ##t
658
659   % Since we do not remove stems, but only make it transparent, we have
660   % to set the length to 0.0.  Otherwise, articulation marks (such as
661   % ictus, circulus or accentus) may be vertically placed quite away from
662   % the note head.
663   Stem \set #'length = #'0.0
664
665   \remove "Ligature_bracket_engraver"
666   \consists "Vaticana_ligature_engraver"
667
668   % Set default head for notes outside of \[ \].
669   NoteHead \set #'style = #'vaticana_punctum
670
671   % Put some space before and after divisiones.
672   % FIXME: This does not seem to show any effect.
673   Script \set #'padding = #0.5
674
675   % There are no beams in Gregorian Chant notation.
676   autobeaming = ##f
677
678   % Prepare TextSpanner for \episem{Initium|Finis} use.
679   TextSpanner \set #'style = #'line
680   TextSpanner \set #'edge-height = #'(0 . 0)
681   TextSpanner \set #'padding = #0.5
682   TextSpanner \set #'enclose-bounds = ##t
683   TextSpanner \set #'edge-text = #'("" . "")
684 }
685
686 VaticanaStaffContext = \translator {
687   \StaffContext
688   \name "VaticanaStaff"
689   \alias "Staff"
690   \denies "Voice"
691   \accepts "VaticanaVoice"
692   \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
693
694   \remove "Time_signature_engraver"
695   \consists "Custos_engraver"
696
697   % We can not remove Bar_engraver; otherwise clefs and custodes will
698   % not show up any more among other line breaking issues.
699   % Instead, we make the grob transparent.
700   BarLine \set #'transparent = ##t
701
702   StaffSymbol \set #'line-count = #4
703   StaffSymbol \set #'thickness = #0.6
704
705   % FIXME: unit on StaffSymbol's width should be \linewidth.
706   % StaffSymbol \set #'width = #60.0
707
708   % Choose vaticana do clef on 3rd line as default.
709   clefGlyph = #"clefs-vaticana_do"
710   centralCPosition = #1
711   clefPosition = #1
712   clefOctavation = #0
713
714   % Select vaticana style font.
715   KeySignature \set #'style = #'vaticana
716   Accidental \set #'style = #'vaticana
717   Custos \set #'style = #'vaticana
718   Custos \set #'neutral-position = #3
719   Custos \set #'neutral-direction = #-1
720   Custos \set #'adjust-if-on-staffline = ##t
721
722   % Score.timing = ##f
723   % Score.barAlways = ##t
724 }
725
726 GregorianTranscriptionVoiceContext = \translator {
727   \VoiceContext
728   \name "GregorianTranscriptionVoice"
729   \alias "Voice"
730
731   % Removing ligature bracket engraver without replacing it by some
732   % other ligature engraver would cause a "Junking event: `LigatureEvent'"
733   % warning for every "\[" and "\]".  Therefore, we make the grob
734   % transparent instead.
735   LigatureBracket \set #'transparent = ##t
736
737   % We can not remove Slur_engraver, since \addlyrics depends on it.
738   % Instead, we make the grob transparent.
739   % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
740   % infinite steepness reqd"), since in ligatures, all note heads are in
741   % the same paper column such that the (transparent) slurs eventually may
742   % start and end in the same column.
743   Slur \override #'transparent = ##t
744
745   % We can not remove Stem_engraver, since slurs depend on stems.  If
746   % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
747   % in position 1 (expecting grob): ()".
748   % As a workaround, we make the grob transparent.
749   Stem \set #'transparent = ##t
750
751   % Since we do not remove stems, but only make it transparent, we have
752   % to set the length to 0.0.  Otherwise, articulation marks (such as
753   % ictus, circulus or accentus) may be vertically placed quite away from
754   % the note head.
755   Stem \set #'length = #'0.0
756
757   % Put some space before and after divisiones.
758   % FIXME: This does not seem to show any effect.
759   Script \set #'padding = #0.5
760
761   % There are no beams in Gregorian Chant notation.
762   autobeaming = ##f
763
764   % Prepare TextSpanner for \episem{Initium|Finis} use.
765   TextSpanner \set #'style = #'line
766   TextSpanner \set #'edge-height = #'(0 . 0)
767   TextSpanner \set #'padding = #0.5
768   TextSpanner \set #'enclose-bounds = ##t
769   TextSpanner \set #'edge-text = #'("" . "")
770 }
771
772 GregorianTranscriptionStaffContext = \translator {
773   \StaffContext
774   \name "GregorianTranscriptionStaff"
775   \alias "Staff"
776   \denies "Voice"
777   \accepts "GregorianTranscriptionVoice"
778
779   % We can not remove Bar_engraver; otherwise clefs and custodes will
780   % not show up any more among other line breaking issues.
781   % Instead, we make the grob transparent.
782   BarLine \set #'transparent = ##t
783 }