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