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