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