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