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