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