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