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