]> git.donarmstrong.com Git - lilypond.git/blob - ly/engraver-init.ly
Issue 2348: Handling of open strings in tablature
[lilypond.git] / ly / engraver-init.ly
1 %%%% This file is part of LilyPond, the GNU music typesetter.
2 %%%%
3 %%%% Copyright (C) 1996--2012 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.15.20"
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   %% explicitly set instrument, so it is not inherited from the parent
44   instrumentName = #'()
45   shortInstrumentName = #'()
46
47   predefinedDiagramTable = #default-fret-table
48   handleNegativeFrets = #'recalculate
49   restrainOpenStrings = ##f
50 }
51
52 \context {
53   \type "Engraver_group"
54   \name "Staff"
55
56   \consists "Output_property_engraver"
57   \consists "Bar_engraver"
58   \consists "Pure_from_neighbor_engraver"
59   %% Bar_engraver must be first so default bars aren't overwritten
60   %% with empty ones.
61
62   \consists "Font_size_engraver"
63   \consists "Separating_line_group_engraver"
64   \consists "Staff_collecting_engraver"
65
66  %% perhaps move to Voice context?
67   \consists "Ottava_spanner_engraver"
68   \consists "Clef_engraver"
69   \consists "Key_engraver"
70   \consists "Time_signature_engraver"
71   \consists "Ledger_line_engraver"
72   \consists "Staff_symbol_engraver"
73   \consists "Collision_engraver"
74   \consists "Grob_pq_engraver"
75   \consists "Rest_collision_engraver"
76   \consists "Accidental_engraver"
77   \consists "Piano_pedal_engraver"
78   \consists "Piano_pedal_align_engraver"
79   \consists "Instrument_name_engraver"
80   \consists "Axis_group_engraver"
81   \consists "Figured_bass_engraver"
82   \consists "Figured_bass_position_engraver"
83   \consists "Script_row_engraver"
84   \consists "Cue_clef_engraver"
85
86   localKeySignature = #'()
87   createSpacing = ##t
88   ignoreFiguredBassRest = ##f
89
90   %% explicitly set instrument, so we don't get
91   %% weird effects when doing instrument names for
92   %% piano staves
93   instrumentName = #'()
94   shortInstrumentName = #'()
95
96   \defaultchild "Voice"
97   \accepts "Voice"
98   \accepts "CueVoice"
99
100   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
101 @code{Voice} contexts."
102
103 }
104
105 \context {
106   \Staff
107   \type "Engraver_group"
108   \name "DrumStaff"
109   \alias "Staff"
110
111   \remove "Accidental_engraver"
112   \remove "Ottava_spanner_engraver"
113   \remove "Key_engraver"
114   \remove "Piano_pedal_engraver"
115
116   \description "Handles typesetting for percussion."
117
118   \denies "Voice"
119   \accepts "DrumVoice"
120   \defaultchild "DrumVoice"
121
122   clefGlyph = #"clefs.percussion"
123   clefPosition = #0
124   \override Script #'staff-padding = #0.75
125 }
126
127
128 \context {
129   \type "Engraver_group"
130   \name "ChoirStaff"
131   \consists "Vertical_align_engraver"
132   topLevelAlignment = ##f
133
134   \consists "Instrument_name_engraver"
135   \consists "System_start_delimiter_engraver"
136   systemStartDelimiter = #'SystemStartBracket
137   %% explicitly set instrument, so it is not inherited from the parent
138   instrumentName = #'()
139   shortInstrumentName = #'()
140   vocalName = #'()
141   shortVocalName = #'()
142
143   \accepts "Staff"
144   \accepts "DrumStaff"
145   \accepts "RhythmicStaff"
146   \accepts "GrandStaff"
147   \accepts "PianoStaff"
148   \accepts "Lyrics"
149   \accepts "ChordNames"
150   \accepts "FiguredBass"
151   \accepts "ChoirStaff"
152   \accepts "StaffGroup"
153   \defaultchild "Staff"
154   \description "Identical to @code{StaffGroup} except that the
155 contained staves are not connected vertically."
156 }
157
158 \context{
159   \type "Engraver_group"
160
161   localKeySignature = #'()
162   createSpacing = ##t
163
164   squashedPosition = #0
165   \name RhythmicStaff
166   \alias "Staff"
167
168   \override BarLine #'bar-extent = #'(-2 . 2)
169   \override VoltaBracket #'staff-padding = #3
170   \override StaffSymbol #'line-count = #1
171
172   \override Stem  #'neutral-direction = #UP
173   \override Beam  #'neutral-direction = #UP
174
175   \consists "Output_property_engraver"
176   \consists "Font_size_engraver"
177   \consists "Separating_line_group_engraver"
178   \consists "Dot_column_engraver"
179   \consists "Bar_engraver"
180   \consists "Staff_symbol_engraver"
181   \consists "Pitch_squash_engraver"
182   \consists "Time_signature_engraver"
183   \consists "Instrument_name_engraver"
184   \consists "Axis_group_engraver"
185   \consists "Ledger_line_engraver"
186
187   %% explicitly set instrument, so it is not inherited from the parent
188   instrumentName = #'()
189   shortInstrumentName = #'()
190
191   \accepts "Voice"
192   \accepts "CueVoice"
193   \defaultchild "Voice"
194
195   \description "A context like @code{Staff} but for printing rhythms.
196 Pitches are ignored; the notes are printed on one line."
197 }
198
199
200 \context {
201   \type "Engraver_group"
202   \name "Voice"
203
204   \description "Corresponds to a voice on a staff.  This context
205 handles the conversion of dynamic signs, stems, beams, super- and
206 subscripts, slurs, ties, and rests.
207
208 You have to instantiate this explicitly if you want to have
209 multiple voices on the same staff."
210
211   \consists "Font_size_engraver"
212
213   \consists "Pitched_trill_engraver"
214   \consists "Output_property_engraver"
215   \consists "Arpeggio_engraver"
216   \consists "Multi_measure_rest_engraver"
217   \consists "Text_spanner_engraver"
218   \consists "Trill_spanner_engraver"
219   \consists "Grob_pq_engraver"
220   \consists "Forbid_line_break_engraver"
221   \consists "Laissez_vibrer_engraver"
222   \consists "Repeat_tie_engraver"
223   \consists "Note_head_line_engraver"
224   \consists "Glissando_engraver"
225   \consists "Ligature_bracket_engraver"
226   \consists "Breathing_sign_engraver"
227   \consists "Note_heads_engraver"
228   \consists "Dots_engraver"
229   \consists "Dot_column_engraver"
230   \consists "Rest_engraver"
231   \consists "Tweak_engraver"
232   \consists "Footnote_engraver"
233
234   %% switch on to make stem directions interpolate for the
235   %% center line.
236   %  \consists "Melody_engraver"
237
238   \consists "Stem_engraver"
239   \consists "Beam_engraver"
240   \consists "Grace_beam_engraver"
241   \consists "Auto_beam_engraver"
242
243   %% must come before Script_column_engraver.
244   \consists "New_fingering_engraver"
245
246   \consists "Chord_tremolo_engraver"
247   \consists "Double_percent_repeat_engraver"
248   \consists "Percent_repeat_engraver"
249   \consists "Slash_repeat_engraver"
250   \consists "Part_combine_engraver"
251
252   \consists "Text_engraver"
253   \consists "New_dynamic_engraver"
254   \consists "Dynamic_align_engraver"
255 %  \consists "Dynamic_engraver"
256   \consists "Fingering_engraver"
257   \consists "Bend_engraver"
258
259   \consists "Script_engraver"
260   \consists "Script_column_engraver"
261   \consists "Rhythmic_column_engraver"
262   \consists "Note_spacing_engraver"
263   \consists "Spanner_break_forbid_engraver"
264   \consists "Phrasing_slur_engraver"
265   \consists "Cluster_spanner_engraver"
266   \consists "Slur_engraver"
267   \consists "Tie_engraver"
268   \consists "Tuplet_engraver"
269   \consists "Grace_engraver"
270   \consists "Instrument_switch_engraver"
271 }
272
273 \context{
274   \Voice
275
276   \name CueVoice
277   \alias Voice
278   fontSize = #-4
279   \override Stem #'length-fraction = #(magstep -4)
280   \override Beam #'length-fraction = #(magstep -4)
281   \override Beam #'beam-thickness = #0.35
282 }
283
284 \context {
285   \Voice
286   \name DrumVoice
287   \alias Voice
288
289   \description "A voice on a percussion staff."
290   \remove "Arpeggio_engraver"
291   \consists "Grob_pq_engraver"
292
293   \remove "Note_head_line_engraver"
294   \remove "Glissando_engraver"
295   \remove "Ligature_bracket_engraver"
296   \remove "Note_heads_engraver"
297   \consists "Drum_notes_engraver"
298   \remove "New_fingering_engraver"
299
300   \remove "Fingering_engraver"
301
302   \remove "Cluster_spanner_engraver"
303 }
304
305 \context{
306   \type "Engraver_group"
307   \name GrandStaff
308   localKeySignature = #'()
309
310   \description "A group of staves, with a brace on the left
311 side, grouping the staves together.  The bar lines of the
312 contained staves are connected vertically."
313
314   \consists "Instrument_name_engraver"
315   \consists "Span_bar_engraver"
316   \consists "Span_bar_stub_engraver"
317   \consists "Span_arpeggio_engraver"
318   \consists "System_start_delimiter_engraver"
319   \consists "Vertical_align_engraver"
320   systemStartDelimiter = #'SystemStartBrace
321   topLevelAlignment = ##f
322   %% explicitly set instrument, so it is not inherited from the parent
323   instrumentName = #'()
324   shortInstrumentName = #'()
325
326   \defaultchild "Staff"
327   \accepts "Staff"
328   \accepts "RhythmicStaff"
329   \accepts "DrumStaff"
330   \accepts "TabStaff"
331   \accepts "Lyrics"
332   \accepts "FiguredBass"
333   \accepts "Dynamics"
334   \accepts "ChordNames"
335 }
336
337 \context{
338   \GrandStaff
339   \name "PianoStaff"
340   \alias "GrandStaff"
341
342   \description "Just like @code{GrandStaff}, but the staves are only removed
343 together, never separately."
344
345   \consists "Vertical_align_engraver"
346   \consists "Keep_alive_together_engraver"
347   topLevelAlignment = ##f
348
349   instrumentName = #'()
350   shortInstrumentName = #'()
351 }
352
353 \context {
354   \type "Engraver_group"
355   \name "StaffGroup"
356
357   \consists "Vertical_align_engraver"
358   topLevelAlignment = ##f
359
360   \consists "Instrument_name_engraver"
361   \consists "Span_bar_engraver"
362   \consists "Span_bar_stub_engraver"
363   \consists "Span_arpeggio_engraver"
364   \consists "Output_property_engraver"
365   systemStartDelimiter = #'SystemStartBracket
366   %% explicitly set instrument, so it is not inherited from the parent
367   instrumentName = #'()
368   shortInstrumentName = #'()
369
370   \consists "System_start_delimiter_engraver"
371
372   \defaultchild "Staff"
373   \accepts "Staff"
374   \accepts "RhythmicStaff"
375   \accepts "DrumStaff"
376   \accepts "GrandStaff"
377   \accepts "PianoStaff"
378   \accepts "TabStaff"
379   \accepts "Lyrics"
380   \accepts "ChordNames"
381   \accepts "FiguredBass"
382   \accepts "ChoirStaff"
383   \accepts "StaffGroup"
384
385   \description "Groups staves while adding a bracket on the left
386 side, grouping the staves together.  The bar lines of the contained
387 staves are connected vertically.  @code{StaffGroup} only consists of
388 a collection of staves, with a bracket in front and spanning bar lines."
389 }
390
391 \context {
392   \type "Engraver_group"
393   \name Dynamics
394   \alias Voice
395   \consists "Output_property_engraver"
396   \consists "Bar_engraver"
397   \consists "Piano_pedal_engraver"
398   \consists "Script_engraver"
399   \consists "New_dynamic_engraver"
400   \consists "Dynamic_align_engraver"
401   \consists "Text_engraver"
402   \consists "Text_spanner_engraver"
403   \consists "Axis_group_engraver"
404   \consists "Tweak_engraver"
405
406   pedalSustainStrings = #'("Ped." "*Ped." "*")
407   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
408   \override VerticalAxisGroup #'staff-affinity = #CENTER
409   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
410     #'((basic-distance . 5)
411        (padding . 0.5))
412   \override TextScript #'font-shape = #'italic
413   \override DynamicLineSpanner #'Y-offset = #0
414   \override DynamicText #'X-offset =
415   #(ly:make-simple-closure
416     `(,+
417       ,(ly:make-simple-closure
418          (list ly:self-alignment-interface::centered-on-note-columns))
419       ,(ly:make-simple-closure
420         (list ly:self-alignment-interface::x-aligned-on-self))))
421
422   \description "Holds a single line of dynamics, which will be
423 centered between the staves surrounding this context."
424 }
425
426
427 \context{
428   \type "Engraver_group"
429
430   \description "Corresponds to a voice with lyrics.  Handles the
431 printing of a single line of lyrics."
432
433   \name "Lyrics"
434   \consists "Lyric_engraver"
435   \consists "Extender_engraver"
436   \consists "Hyphen_engraver"
437   \consists "Stanza_number_engraver"
438   \consists "Instrument_name_engraver"
439   \consists "Font_size_engraver"
440   \consists "Hara_kiri_engraver"
441   \consists "Pure_from_neighbor_engraver"
442   searchForVoice = ##f
443   %% explicitly set instrument, so it is not inherited from the parent
444   instrumentName = #'()
445   shortInstrumentName = #'()
446
447   \override VerticalAxisGroup #'remove-first = ##t
448   \override VerticalAxisGroup #'remove-empty = ##t
449   \override VerticalAxisGroup #'staff-affinity = #UP
450   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
451     #'((basic-distance . 5.5)
452        (padding . 0.5)
453        (stretchability . 1))
454   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
455      #'((basic-distance . 0)
456         (minimum-distance . 2.8)
457         (padding . 0.2)
458         (stretchability . 0))
459   \override VerticalAxisGroup #'nonstaff-unrelatedstaff-spacing #'padding = #1.5
460   \override InstrumentName #'self-alignment-Y = ##f
461
462   %% sync with define-grobs.scm ;
463   \override InstrumentName #'font-size = #1.0
464
465   %% make sure that barlines aren't collapsed, when
466   %% Bar_engraver is there.
467   \override BarLine #'bar-extent = #'(-0.05 . 0.05)
468
469 }
470
471 \context {
472   \type "Engraver_group"
473   \name NoteNames
474   \description "A context for printing the names of notes."
475   \consists "Axis_group_engraver"
476
477   \override VerticalAxisGroup #'staff-affinity = #UP
478   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing =
479     #'((basic-distance . 0)
480        (minimum-distance . 2.8)
481        (padding . 0.2)
482        (stretchability . 0))
483   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing =
484     #'((basic-distance . 5.5)
485        (padding . 0.5)
486        (stretchability . 1))
487   \override VerticalAxisGroup
488     #'nonstaff-unrelatedstaff-spacing #'padding = 1.5
489
490   \consists "Tie_engraver"
491   \consists "Note_name_engraver"
492   \consists "Separating_line_group_engraver"
493 }
494
495 \context {
496   \type "Engraver_group"
497   \name ChordNames
498   \description "Typesets chord names."
499
500   \consists "Output_property_engraver"
501   \consists "Separating_line_group_engraver"
502   \consists "Chord_name_engraver"
503   \consists "Hara_kiri_engraver"
504 %  \consists "Note_spacing_engraver"
505   \override VerticalAxisGroup #'remove-first = ##t
506   \override VerticalAxisGroup #'remove-empty = ##t
507   \override VerticalAxisGroup #'staff-affinity = #DOWN
508   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
509   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
510 }
511
512 \context {
513   \type "Score_engraver"
514   \name "Score"
515
516   \description "This is the top level notation context.  No
517 other context can contain a @code{Score} context.  This context
518 handles the administration of time signatures.  It also makes sure
519 that items such as clefs, time signatures, and key-signatures are
520 aligned across staves.
521
522 You cannot explicitly instantiate a @code{Score} context (since it
523 is not contained in any other context).  It is instantiated
524 automatically when an output definition (a @code{\score} or
525 @code{\layout} block) is processed."
526
527   \consists "Paper_column_engraver"
528   \consists "Repeat_acknowledge_engraver"
529   \consists "Staff_collecting_engraver"
530
531   %% move the alias along with the engraver.
532
533   % timing translator must come BEFORE bar number engraver
534   \consists "Timing_translator"
535   \consists "Default_bar_line_engraver"
536   \consists "Output_property_engraver"
537   \consists "System_start_delimiter_engraver"
538   \consists "Mark_engraver"
539   \consists "Volta_engraver"
540   \consists "Metronome_mark_engraver"
541   \consists "Break_align_engraver"
542   \consists "Spacing_engraver"
543   \consists "Grace_spacing_engraver"
544   \consists "Vertical_align_engraver"
545   \consists "Stanza_number_align_engraver"
546   \consists "Bar_number_engraver"
547   \consists "Parenthesis_engraver"
548   \consists "Concurrent_hairpin_engraver"
549   \consists "Beam_collision_engraver"
550
551   \defaultchild "Staff"
552
553   \accepts "FretBoards"
554   \accepts "Staff"
555   \accepts "RhythmicStaff"
556   \accepts "TabStaff"
557   \accepts "VaticanaStaff"
558   \accepts "GregorianTranscriptionStaff"
559   \accepts "MensuralStaff"
560   \accepts "PetrucciStaff"
561   \accepts "StaffGroup"
562   \accepts "DrumStaff"
563   \accepts "KievanStaff"
564   \accepts "Lyrics"
565   \accepts "ChordNames"
566   \accepts "GrandStaff"
567   \accepts "ChoirStaff"
568   \accepts "PianoStaff"
569   \accepts "Devnull"
570   \accepts "NoteNames"
571   \accepts "FiguredBass"
572
573   noteToFretFunction = #determine-frets
574   predefinedDiagramTable = ##f
575   soloText = #"Solo"
576   soloIIText = #"Solo II"
577   aDueText = #"a2"
578   printPartCombineTexts = ##t
579   partCombineTextsOnNote = ##t
580   systemStartDelimiter =#'SystemStartBar
581
582   drumStyleTable = #drums-style
583
584   melismaBusyProperties = #default-melisma-properties
585   tieWaitForNote = ##f
586   clefGlyph = #"clefs.G"
587   clefPosition = #-2
588   middleCClefPosition = #-6
589   middleCPosition = #-6
590   firstClef = ##t
591
592   crescendoSpanner = #'hairpin
593   decrescendoSpanner = #'hairpin
594
595   defaultBarType = #"|"
596   doubleRepeatType = #":|:"
597   barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
598   barNumberFormatter = #robust-bar-number-function
599   automaticBars = ##t
600
601   explicitClefVisibility = #all-visible
602   explicitCueClefVisibility = #end-of-line-invisible
603   explicitKeySignatureVisibility = #all-visible
604   implicitTimeSignatureVisibility = #end-of-line-invisible
605
606   repeatCountVisibility = #all-repeat-counts-visible
607
608   timeSignatureSettings = #default-time-signature-settings
609   timeSignatureFraction = #'(4 . 4)
610
611 %% These defaults should be the same as the rules established in
612 %%   scm/time-signature-settings.scm for 4/4 time
613   measureLength = #(ly:make-moment 4 4)
614   baseMoment = #(ly:make-moment 1  4)
615   beatStructure = #'(1 1 1 1)
616   beamExceptions = #'((end . (((1 . 8) . (4 4))
617                               ((1 . 12) . (3 3 3 3)))))
618   beamWholeMeasure = ##t
619   beamHalfMeasure = ##f
620
621   autoBeaming = ##t
622   autoBeamCheck = #default-auto-beam-check
623
624   scriptDefinitions = #default-script-alist
625
626   pedalSustainStrings = #'("Ped." "*Ped." "*")
627   pedalSustainStyle = #'text
628   pedalUnaCordaStrings = #'("una corda" "" "tre corde")
629   pedalUnaCordaStyle = #'text
630
631 %% These are in ordinary italic font, including the *,
632 %% but they are unlikely to be used,
633 %% as the default pedal-style for SostenutoPedal is 'mixed':
634 %% i.e.  Sost. Ped_____________________
635   pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
636   pedalSostenutoStyle = #'mixed
637
638   harmonicAccidentals = ##t
639   fingeringOrientations = #'(up down)
640   stringNumberOrientations = #'(up down)
641   strokeFingerOrientations = #'(right)
642
643   lyricMelismaAlignment = #LEFT
644   markFormatter = #format-mark-letters
645   rehearsalMark = #1
646   subdivideBeams = ##f
647   extraNatural = ##t
648   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0))
649   autoCautionaries = #'()
650
651   printKeyCancellation = ##t
652   keyAlterationOrder = #`(
653     (6 . ,FLAT) (2  . ,FLAT) (5 . ,FLAT ) (1  . ,FLAT) (4  . ,FLAT) (0  . ,FLAT) (3  . ,FLAT)
654     (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
655     (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
656     (3  . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (1 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
657   )
658
659   barCheckSynchronize = ##f
660
661 %% chord names:
662   chordNameFunction = #ignatzek-chord-names
663   minorChordModifier = #(make-simple-markup "m")
664   additionalPitchPrefix = #"" % was "add"
665   majorSevenSymbol = #whiteTriangleMarkup
666   chordNameLowercaseMinor = ##f
667   chordNameSeparator = #(make-hspace-markup 0.5)
668   slashChordSeparator = #(make-simple-markup "/")
669   chordNameExceptions = #ignatzekExceptions
670   chordNoteNamer = #'()
671   chordRootNamer = #note-name->markup
672   chordPrefixSpacer = #0
673   chordNameExceptionsFull = #fullJazzExceptions
674   chordNameExceptionsPartial = #partialJazzExceptions
675   noChordSymbol = #(make-simple-markup "N.C.")
676
677   bassStaffProperties = #'((assign clefGlyph "clefs.F")
678   (assign clefPosition 2)
679   (assign middleCPosition 6)
680   (assign middleCClefPosition 6))
681 %% tablature:
682   stringOneTopmost = ##t
683   highStringOne = ##t
684
685 %% One may change the string tunings as follows :
686 %% The length of the list must be equal to the number of strings
687   stringTunings = #guitar-tuning
688   tablatureFormat = #fret-number-tablature-format
689   tabStaffLineLayoutFunction = #tablature-position-on-lines
690
691 %%
692   figuredBassFormatter = #format-bass-figure
693   metronomeMarkFormatter = #format-metronome-markup
694
695
696   %% See also make-voice-props-set
697   graceSettings = #`(
698     (Voice Stem direction ,UP)
699     (Voice Stem font-size -3)
700     (Voice Flag font-size -3)
701     (Voice NoteHead font-size -3)
702     (Voice TabNoteHead font-size -4)
703     (Voice Dots font-size -3)
704     (Voice Stem length-fraction 0.8)
705     (Voice Stem no-stem-extend #t)
706     (Voice Beam beam-thickness 0.384)
707     (Voice Beam length-fraction 0.8)
708     (Voice Accidental font-size -4)
709     (Voice AccidentalCautionary font-size -4)
710     (Voice Slur direction ,DOWN)
711     (Voice Script font-size -3)
712     (Voice Fingering font-size -8)
713     (Voice StringNumber font-size -8)
714   )
715
716   keepAliveInterfaces = #'(
717     bass-figure-interface
718     chord-name-interface
719     cluster-beacon-interface
720     fret-diagram-interface
721     lyric-syllable-interface
722     note-head-interface
723     tab-note-head-interface
724     lyric-interface
725     percent-repeat-item-interface
726     percent-repeat-interface
727
728     ;; need this, as stanza numbers are items, and appear only once.
729     stanza-number-interface
730   )
731   % \quoteDuring is supposed to quote everything, cueDuring only the essentials
732   quotedEventTypes = #'(StreamEvent)
733   quotedCueEventTypes = #'(
734     note-event
735     rest-event
736     tie-event
737     beam-event
738     tuplet-span-event)
739   instrumentTransposition = #(ly:make-pitch 0 0 0)
740
741   topLevelAlignment = ##t
742
743   timing = ##t
744 }
745
746
747
748
749 \context {
750   \type "Engraver_group"
751   \name "FiguredBass"
752   \description "A context for printing a figured bass line."
753
754   \consists "Figured_bass_engraver"
755   \consists "Separating_line_group_engraver"
756   \consists "Hara_kiri_engraver"
757
758   \override VerticalAxisGroup #'remove-empty = ##t
759   \override VerticalAxisGroup #'remove-first = ##t
760   \override VerticalAxisGroup #'staff-affinity = #UP
761   \override VerticalAxisGroup #'nonstaff-relatedstaff-spacing #'padding = #0.5
762   \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'padding = #0.5
763 }
764
765 \context {
766   \name "Devnull"
767   \type "Engraver_group"
768
769 %% don't want to route anything out of here:
770   \alias "Staff"
771   \alias "Voice"
772   \description "Silently discards all musical information given to this
773 context."
774 }
775
776 \context {
777   \Voice
778   \name "TabVoice"
779   \alias "Voice"
780   \consists "Tab_note_heads_engraver"
781   \consists "Tab_tie_follow_engraver"
782
783   \remove "Note_heads_engraver"
784   \remove "Fingering_engraver"
785   \remove "New_fingering_engraver"
786   \remove "Pitched_trill_engraver"
787
788   \description "Context for drawing notes in a Tab staff."
789
790   %% TabStaff increase the staff-space, which in turn
791   %% increases beam thickness and spacing; beams are
792   %% too big. We have to adjust the beam settings:
793   \override Beam #'beam-thickness = #0.32
794   \override Beam #'length-fraction = #0.62
795   %% the same goes for tremolo beams
796   \override StemTremolo #'beam-thickness = #0.32
797   %% NOTE: in lily/stem-tremolo.cc, we have length-fraction = 1,
798   %% and the tablature staff space is scaled (1.5 by default),
799   %% so we use the inversion of the scale factor:
800   \override StemTremolo #'length-fraction = #(lambda (grob)
801                                                (/ 1 (ly:staff-symbol-staff-space grob)))
802   \override StemTremolo #'beam-width = #stem-tremolo::calc-tab-width
803
804   %% No accidental in tablature !
805   \remove "Accidental_engraver"
806   %% make the Stems as short as possible to minimize their influence
807   %% on the slur::calc-control-points routine
808   \override Stem #'no-stem-extend = ##t
809   \override Flag #'style = #'no-flag
810   \override Stem #'details = #'((lengths 0 0 0 0 0 0)
811                                 (beamed-lengths 0 0 0)
812                                 (beamed-minimum-free-lengths 0 0 0)
813                                 (beamed-extreme-minimum-free-lengths 0 0)
814                                 (stem-shorten 0 0))
815   %% after all, the stubs of the stems may still be visible, so ...
816   \override Stem #'stencil = ##f
817   \override Flag #'stencil = ##f
818   %% automatic beams should be suppressed for similar reasons ...
819   autoBeaming = ##f
820   %% remove beams, dots and rests ...
821   \override Beam #'stencil = ##f
822   \override StemTremolo #'stencil = ##f
823   \override Dots #'stencil = ##f
824   \override Rest #'stencil = ##f
825   \override MultiMeasureRest #'stencil = ##f
826   \override MultiMeasureRestNumber #'stencil = ##f
827   \override MultiMeasureRestText #'stencil = ##f
828   %% ... all kinds of ties/slurs
829   \override Tie  #'stencil = ##f
830   \override RepeatTie #'stencil = ##f
831   \override LaissezVibrerTie #'stencil = ##f
832   \override Slur #'stencil = #slur::draw-tab-slur
833   \override PhrasingSlur #'stencil = ##f
834   %% 'tied to' fret numbers become invisible or parenthesized, respectively)
835   \override Tie #'after-line-breaking = #tie::handle-tab-note-head
836   \override RepeatTie #'after-line-breaking = #repeat-tie::handle-tab-note-head
837   %% ... and all kinds of markups, spanners etc.
838   \override TupletBracket #'stencil = ##f
839   \override TupletNumber #'stencil = ##f
840   \override DynamicText #'stencil = ##f
841   \override DynamicTextSpanner #'stencil = ##f
842   \override TextSpanner #'stencil = ##f
843   \override Hairpin #'stencil = ##f
844   \override Script #'stencil = ##f
845   \override TextScript #'stencil = ##f
846   \override Glissando #'stencil = #glissando::draw-tab-glissando
847   %% the direction for glissando lines will be automatically corrected
848   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
849   \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
850                                                    (padding . 0.3))
851   \override Glissando #'bound-details #'left = #`((attach-dir . ,RIGHT)
852                                                    (padding . 0.3))
853   %% dead notes
854   \override TabNoteHead #'glyph-name = #tab-note-head::calc-glyph-name
855   \override TabNoteHead #'stencil = #tab-note-head::whiteout-if-style-set
856 }
857
858 \context {
859   \Staff
860   \alias "Staff"
861   \name "TabStaff"
862   \denies "Voice"
863   \consists "Tab_staff_symbol_engraver"
864
865   \description "Context for generating tablature. It accepts only @code{TabVoice}
866 contexts and handles the line spacing, the tablature clef etc. properly."
867
868   \accepts "TabVoice"
869   \defaultchild "TabVoice"
870
871   %% 6 strings, bigger spacing
872   \override StaffSymbol #'staff-space = #1.5
873
874   %% Don't draw stems over the tablature figures !
875   \override Stem #'avoid-note-head = ##t
876
877   %% No accidental in tablature !
878   \remove "Accidental_engraver"
879   \remove "Key_engraver"
880
881   \remove "Ottava_spanner_engraver"
882   %% the clef handler
883   \override Clef #'stencil = #clef::print-modern-tab-if-set
884   %% no time signature
885   \override TimeSignature #'stencil = ##f
886   %% no arpeggios
887   \override Arpeggio #'stencil = ##f
888   %% we ignore collision warnings that may occur due to
889   %% stem overlapping, because we have no stems ;-)
890   \override NoteColumn #'ignore-collision = ##t
891   %% Special "TAB" clef
892   clefGlyph = #"clefs.tab"
893   clefPosition = #0
894   %% Change string if note results in negative fret number
895   handleNegativeFrets = #'recalculate
896   %% Allow open strings even if minimumFret is set
897   restrainOpenStrings = ##f
898 }
899
900 \context {
901   \Voice
902   \name "VaticanaVoice"
903   \alias "Voice"
904   \description "Same as @code{Voice} context, except that it is
905 accommodated for typesetting Gregorian Chant in the notational style
906 of Editio Vaticana."
907
908   \remove "Slur_engraver"
909   \remove "Stem_engraver"
910   \remove "Ligature_bracket_engraver"
911   \consists "Vaticana_ligature_engraver"
912   \remove "Text_spanner_engraver"
913   \consists "Episema_engraver"
914
915   %% Set default head for notes outside of \[ \].
916   \override NoteHead #'style = #'vaticana.punctum
917
918   %% Put some space before and after divisiones.
919   %% FIXME: This does not seem to show any effect.
920   \override Script #'padding = #0.5
921
922   %% There are no beams in Gregorian Chant notation.
923   autoBeaming = ##f
924 }
925
926 \context {
927   \Staff
928   \name "VaticanaStaff"
929   \alias "Staff"
930   \denies "Voice"
931   \accepts "VaticanaVoice"
932   \defaultchild "VaticanaVoice"
933
934   \description "Same as @code{Staff} context, except that it is
935 accommodated for typesetting Gregorian Chant in the notational style
936 of Editio Vaticana."
937
938   \remove "Time_signature_engraver"
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 #'line-count = #4
947   \override StaffSymbol #'thickness = #0.6
948
949   %% FIXME: unit on StaffSymbol's width should be \linewidth.
950   %% \override StaffSymbol #'width = #60.0
951
952   %% Choose vaticana do clef on 3rd line as default.
953   clefGlyph = #"clefs.vaticana.do"
954   middleCPosition = #1
955   middleCClefPosition = #1
956   clefPosition = #1
957   clefOctavation = #0
958
959   %% Select vaticana style font.
960   \override KeySignature #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
961   \override Accidental #'glyph-name-alist = #alteration-vaticana-glyph-name-alist
962   \override Custos #'style = #'vaticana
963   \override Custos #'neutral-position = #3
964   \override Custos #'neutral-direction = #DOWN
965   \override Dots #'style = #'vaticana
966 }
967
968 \context {
969   \Voice
970   \name "GregorianTranscriptionVoice"
971   \alias "Voice"
972   \consists "Episema_engraver"
973
974   %% Removing ligature bracket engraver without replacing it by some
975   %% other ligature engraver would cause a "Junking event: `LigatureEvent'"
976   %% warning for every "\[" and "\]".  Therefore, we make the grob
977   %% transparent instead.
978   \override LigatureBracket #'transparent = ##t
979
980   %% Put some space before and after divisiones.
981   %% FIXME: This does not seem to show any effect.
982   \override Script #'padding = #0.5
983
984   %% There are no beams in Gregorian Chant notation.
985   autoBeaming = ##f
986
987 }
988
989 \context {
990   \Staff
991   \name "GregorianTranscriptionStaff"
992   \alias "Staff"
993   \denies "Voice"
994   \accepts "GregorianTranscriptionVoice"
995   \defaultchild "GregorianTranscriptionVoice"
996
997   %% We can not remove Bar_engraver; otherwise clefs and custodes will
998   %% not show up any more among other line breaking issues.
999   %% Instead, we make the grob transparent.
1000   \override BarLine #'transparent = ##t
1001 }
1002
1003 \context {
1004   \Voice
1005   \name "MensuralVoice"
1006   \alias "Voice"
1007   \description "Same as @code{Voice} context, except that it is
1008 accommodated for typesetting a piece in mensural style."
1009
1010   \remove "Slur_engraver"
1011   \remove "Ligature_bracket_engraver"
1012   \consists "Mensural_ligature_engraver"
1013
1014   %% Set default head for notes outside of \[ \].
1015   \override NoteHead #'style = #'mensural
1016   \override Rest #'style = #'mensural
1017   \override Flag #'style = #'mensural
1018
1019   %% There are no beams in mensural notation.
1020   autoBeaming = ##f
1021 }
1022
1023 \context {
1024   \Staff
1025   \name "MensuralStaff"
1026   \alias "Staff"
1027   \denies "Voice"
1028   \defaultchild "MensuralVoice"
1029   \accepts "MensuralVoice"
1030   \description "Same as @code{Staff} context, except that it is
1031 accommodated for typesetting a piece in mensural style."
1032
1033   \consists "Custos_engraver"
1034
1035   %% We can not remove Bar_engraver; otherwise clefs and custodes will
1036   %% not show up any more among other line breaking issues.
1037   %% Instead, we make the grob transparent.
1038   \override BarLine #'transparent = ##t
1039
1040   \override StaffSymbol #'thickness = #0.6
1041
1042   %% FIXME: unit on StaffSymbol's width should be \linewidth.
1043   %% \override StaffSymbol #'width = #60.0
1044
1045   %% Choose mensural g clef on 2nd line as default.
1046   clefGlyph = #"clefs.mensural.g"
1047   middleCClefPosition = #-6
1048   middleCPosition = #-6
1049   clefPosition = #-2
1050   clefOctavation = #0
1051
1052   %% Select mensural style font.
1053   \override TimeSignature #'style = #'mensural
1054   \override KeySignature #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1055   \override Accidental #'glyph-name-alist = #alteration-mensural-glyph-name-alist
1056   \override Custos #'style = #'mensural
1057   \override Custos #'neutral-position = #3
1058   \override Custos #'neutral-direction = #DOWN
1059
1060   %% Accidentals are valid only once (same as
1061   %% \accidentalStyle "forget")
1062   extraNatural = ##f
1063   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
1064   autoCautionaries = #'()
1065   printKeyCancellation = ##f
1066 }
1067
1068 \context {
1069   \Voice
1070   \name "PetrucciVoice"
1071   \alias "Voice"
1072   \description "Same as @code{Voice} context, except that it is
1073 accommodated for typesetting a piece in Petrucci style."
1074
1075   \remove "Ligature_bracket_engraver"
1076   \consists "Mensural_ligature_engraver"
1077
1078   %% Set glyph styles.
1079   \override NoteHead #'style = #'petrucci
1080   \override Rest #'style = #'mensural
1081
1082   % Thickens and shortens stems.
1083   \override Stem #'thickness = #1.7
1084   \override Stem #'length = #5
1085
1086   %% There are no beams in Petrucci notation.
1087   autoBeaming = ##f
1088 }
1089
1090 \context {
1091   \Staff
1092   \name "PetrucciStaff"
1093   \alias "Staff"
1094   \denies "Voice"
1095   \defaultchild "PetrucciVoice"
1096   \accepts "PetrucciVoice"
1097   \description "Same as @code{Staff} context, except that it is
1098 accommodated for typesetting a piece in Petrucci style."
1099
1100   \consists "Custos_engraver"
1101
1102   \override StaffSymbol #'thickness = #1.3
1103
1104   %% Choose Petrucci g clef on 2nd line as default.
1105   clefGlyph = #"clefs.petrucci.g"
1106   middleCClefPosition = #-6
1107   middleCPosition = #-6
1108   clefPosition = #-2
1109   clefOctavation = #0
1110
1111   \override Custos #'style = #'mensural
1112   \override Custos #'neutral-position = #3
1113   \override Custos #'neutral-direction = #DOWN
1114
1115   %% Accidentals are valid only once (if the following note is different)
1116   extraNatural = ##f
1117   autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0)
1118                              ,neo-modern-accidental-rule)
1119   autoCautionaries = #'()
1120   printKeyCancellation = ##f
1121 }
1122
1123 \context {
1124  \Voice
1125  \name "KievanVoice"
1126  \alias "Voice"
1127  \description "Same as @code{Voice} context, except that it is
1128 accommodated for typesetting a piece in Kievan style."
1129
1130  %% Set glyph styles.
1131  \override NoteHead #'style = #'kievan
1132  \override Rest #'style = #'mensural
1133  \override Accidental #'glyph-name-alist = #alteration-kievan-glyph-name-alist
1134  \override Dots #'style = #'kievan
1135  \override Slur #'stencil = ##f
1136
1137  %% There are beams in Kievan notation, but they are invoked manually
1138  autoBeaming = ##f
1139  \override Beam #'beam-thickness = #0.32
1140  \override Beam #'length-fraction = #0.62
1141 }
1142
1143 \context {
1144  \Staff
1145  \name "KievanStaff"
1146  \alias "Staff"
1147  \denies "Voice"
1148  \defaultchild "KievanVoice"
1149  \accepts "KievanVoice"
1150  \description "Same as @code{Staff} context, except that it is
1151 accommodated for typesetting a piece in Kievan style."
1152
1153  \remove "Time_signature_engraver"
1154
1155  %% Choose Kievan tsefaut clef
1156  clefGlyph = #"clefs.kievan.do"
1157  middleCClefPosition = #0
1158  middleCPosition = #0
1159  clefPosition = #0
1160  clefOctavation = #0
1161
1162  %% Accidentals are valid only once (if the following note is different)
1163  extraNatural = ##f
1164  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0)
1165                             ,neo-modern-accidental-rule)
1166  autoCautionaries = #'()
1167  printKeyCancellation = ##f
1168
1169 }
1170
1171 %% Keep the old definitions in here for compatibility (they erase previous
1172 %% settings to the corresponding context!).
1173 %% For new scores, one should simply insert the \RemoveEmptyStaves settings
1174 %% into the desired context. That's just as easy, requires only one line more
1175 %% (the \*Staff), but preserves previous context mods.
1176 %% TODO: DEPRECATED_2.13.17, remove at some point in the future
1177 RemoveEmptyStaffContext = \context {
1178   \Staff
1179   \RemoveEmptyStaves
1180 }
1181
1182 AncientRemoveEmptyStaffContext = \context {
1183   \VaticanaStaff
1184   \RemoveEmptyStaves
1185 }
1186
1187 RemoveEmptyDrumStaffContext = \context {
1188   \DrumStaff
1189   \RemoveEmptyStaves
1190 }
1191
1192 RemoveEmptyRhythmicStaffContext = \context {
1193   \RhythmicStaff
1194   \RemoveEmptyStaves
1195 }
1196
1197 RemoveEmptyTabStaffContext = \context {
1198   \TabStaff
1199   \RemoveEmptyStaves
1200 }