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