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