6 % setup for Request->Element conversion. Guru-only
9 StaffContext=\translator {
10 \type "Engraver_group_engraver"
13 \description "Handles clefs, bar lines, keys, accidentals. It can contain
14 @code{Voice} contexts."
17 \consists "Output_property_engraver"
19 \consists "Bar_engraver"
20 % Bar_engraver must be first so default bars aren't overwritten
22 \consists "Font_size_engraver"
24 % \consists "Repeat_engraver"
25 \consists "Volta_engraver"
26 \consists "Separating_line_group_engraver"
27 SeparatingGroupSpanner \override #'spacing-procedure
28 = #Separating_group_spanner::set_spacing_rods_and_seqs
29 \consists "Dot_column_engraver"
31 % perhaps move to Voice context?
32 \consists "Ottava_spanner_engraver"
33 \consists "Clef_engraver"
34 \consists "Key_engraver"
35 \consists "Time_signature_engraver"
36 \consists "Staff_symbol_engraver"
37 \consists "Collision_engraver"
38 \consists "Rest_collision_engraver"
39 \consists "Accidental_engraver"
40 \consists "Piano_pedal_engraver"
41 \consists "Instrument_name_engraver"
42 \consists "Grob_pq_engraver"
43 \consists "Forbid_line_break_engraver"
44 \consistsend "Axis_group_engraver"
46 minimumVerticalExtent = #'(-6 . 6)
47 extraVerticalExtent = ##f
49 localKeySignature = #'()
51 % explicitly set instrument, so we don't get
52 % weird effects when doing instrument names for
62 StaffContainerContext = \translator {
63 \type Engraver_group_engraver
64 \consists "Axis_group_engraver"
65 minimumVerticalExtent = ##f
66 extraVerticalExtent = ##f
68 localKeySignature = #'()
74 InnerChoirStaffContext = \translator {
75 \type "Engraver_group_engraver"
77 \consists "System_start_delimiter_engraver"
78 systemStartDelimiter = #'SystemStartBracket
79 localKeySignature = #'()
82 \accepts "RhythmicStaff"
89 ChoirStaffContext = \translator {
90 \InnerChoirStaffContext
93 \description "Identical to @code{StaffGroup} except that the
94 contained staves are not connected vertically."
96 \accepts "InnerChoirStaff"
97 \accepts "InnerStaffGroup"
101 RhythmicStaffContext=\translator{
102 \type "Engraver_group_engraver"
104 \consists "Output_property_engraver"
107 A context like @code{Staff} but for printing rhythms. Pitches are
108 ignored; the notes are printed on one line.
110 minimumVerticalExtent = ##f
111 extraVerticalExtent = ##f
113 localKeySignature = #'()
115 \consists "Pitch_squash_engraver"
116 \consists "Separating_line_group_engraver"
120 BarLine \override #'bar-size = #4
121 VoltaBracket \override #'minimum-space = #15 % urg, in \pt
122 VoltaBracket \override #'padding = #5 % urg, in \pt
123 StaffSymbol \override #'line-count = #1
125 Stem \override #'neutral-direction = #1
126 Beam \override #'neutral-direction = #1
127 % \consists "Repeat_engraver"
128 \consists "Dot_column_engraver"
129 \consists "Volta_engraver"
130 \consists "Bar_engraver"
131 \consists "Time_signature_engraver"
132 \consists "Staff_symbol_engraver"
133 \consists "Instrument_name_engraver"
134 \consistsend "Axis_group_engraver"
139 VoiceContext = \translator {
140 \type "Engraver_group_engraver"
144 Corresponds to a voice on a staff. This context handles the
145 conversion of dynamic signs, stems, beams, super- and subscripts,
146 slurs, ties, and rests.
148 You have to instantiate this explicitly if you want to have
149 multiple voices on the same staff."
151 localKeySignature = #'()
152 \consists "Font_size_engraver"
154 % must come before all
155 \consists "Voice_devnull_engraver"
156 \consists "Output_property_engraver"
157 \consists "Arpeggio_engraver"
158 \consists "Multi_measure_rest_engraver"
159 \consists "Text_spanner_engraver"
160 \consists "Grob_pq_engraver"
162 \consists "Note_head_line_engraver"
163 \consists "Glissando_engraver"
164 \consists "Ligature_bracket_engraver"
165 \consists "Breathing_sign_engraver"
166 % \consists "Rest_engraver"
167 \consists "Stem_engraver"
168 \consists "Beam_engraver"
169 \consists "Grace_beam_engraver"
170 \consists "Auto_beam_engraver"
171 \consists "New_fingering_engraver"
172 \consists "Chord_tremolo_engraver"
173 \consists "Percent_repeat_engraver"
174 \consists "Slash_repeat_engraver"
175 \consists "Melisma_engraver"
178 Must come before text_engraver, but after note_column engraver.
181 \consists "Text_engraver"
182 \consists "Dynamic_engraver"
183 \consists "Fingering_engraver"
185 \consists "Script_engraver"
186 \consists "Script_column_engraver"
187 \consists "Rhythmic_column_engraver"
188 \consists "Phrasing_slur_engraver"
189 \consists "Cluster_spanner_engraver"
190 \consists "Slur_engraver"
191 \consists "Tie_engraver"
192 \consists "Tuplet_engraver"
193 \consists "A2_engraver"
195 \consists "Skip_event_swallow_translator"
196 \accepts Thread % bug if you leave out this!
199 ThreadContext = \translator{
200 \type Engraver_group_engraver
202 localKeySignature = #'()
204 Handles note heads, and is contained in the Voice context. You
205 have to instantiate this explicitly if you want to adjust the
206 style of individual note heads.
208 \consists "Font_size_engraver"
209 \consists "Thread_devnull_engraver"
210 \consists "Note_heads_engraver"
211 \consists "Rest_engraver"
214 \consists "Output_property_engraver"
220 GrandStaffContext=\translator{
221 \type "Engraver_group_engraver"
223 localKeySignature = #'()
225 \description " A group of staffs, with a brace on the left
226 side, grouping the staves together. The bar lines of the
227 contained staves are connected vertically. "
229 \consists "Span_bar_engraver"
230 \consists "Span_arpeggio_engraver"
231 \consists "System_start_delimiter_engraver"
232 systemStartDelimiter = #'SystemStartBrace
237 PianoStaffContext = \translator{
242 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
243 equal to @code{maxVerticalAlign} so that interstaff beaming and
244 slurring can be used."
245 verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
246 VerticalAlignment \override #'forced-distance = #12
247 VerticalAlignment \override #'self-alignment-Y = #0
249 \consists "Vertical_align_engraver"
250 \consists "Instrument_name_engraver"
255 % \consistsend "Axis_group_engraver"
258 InnerStaffGroupContext= \translator {
259 \type "Engraver_group_engraver"
260 \name InnerStaffGroup
261 localKeySignature = #'()
263 \consists "Span_bar_engraver"
264 \consists "Span_arpeggio_engraver"
265 \consists "Output_property_engraver"
266 systemStartDelimiter = #'SystemStartBracket
268 \consists "System_start_delimiter_engraver"
270 \accepts "RhythmicStaff"
271 \accepts "GrandStaff"
272 \accepts "PianoStaff"
275 \accepts "ChordNames"
278 StaffGroupContext = \translator {
279 \InnerStaffGroupContext
284 " Groups staffs while adding a bracket on the left side,
285 grouping the staves together. The bar lines of the contained
286 staves are connected vertically.
289 \accepts "InnerChoirStaff"
290 \accepts "ChoirStaff"
291 \accepts "InnerStaffGroup"
292 \accepts "FiguredBass"
297 LyricsVoiceContext= \translator{
298 \type "Engraver_group_engraver"
299 \consistsend "Hara_kiri_engraver"
300 minimumVerticalExtent = #'(-1.2 . 2.4)
301 extraVerticalExtent = ##f
305 Corresponds to a voice with lyrics. Handles the printing of a
306 single line of lyrics.
310 \consists "Separating_line_group_engraver"
311 \consists "Lyric_engraver"
312 \consists "Extender_engraver"
313 \consists "Hyphen_engraver"
314 \consists "Stanza_number_engraver"
315 \consists "Skip_event_swallow_translator"
316 phrasingPunctuation = #".,:!?\""
317 SeparationItem \set #'padding = #0.5
319 NoteNamesContext = \translator {
320 \type "Engraver_group_engraver"
322 \consistsend "Axis_group_engraver"
324 minimumVerticalExtent = ##f
325 extraVerticalExtent = ##f
329 \consists "Note_name_engraver"
330 \consists "Separating_line_group_engraver"
333 LyricsContext = \translator {
334 \type "Engraver_group_engraver"
336 \description "Typesets lyrics."
337 %% To get folded repeats right.
338 \consists Vertical_align_engraver
340 \consistsend "Hara_kiri_engraver"
341 minimumVerticalExtent = ##f
342 extraVerticalExtent = ##f
345 \accepts "LyricsVoice"
349 ChordNamesContext = \translator {
350 \type "Engraver_group_engraver"
352 \description " Typesets chord names."
354 \consists "Rest_swallow_translator"
355 \consists "Output_property_engraver"
356 \consists "Separating_line_group_engraver"
357 \consists "Chord_name_engraver"
358 \consists "Skip_event_swallow_translator"
359 \consistsend "Hara_kiri_engraver"
360 minimumVerticalExtent = #'(0 . 2.5)
361 extraVerticalExtent = ##f
366 RemoveEmptyStaffContext = \translator {
368 \remove "Axis_group_engraver"
369 \consistsend "Hara_kiri_engraver"
370 \consists "Instrument_name_engraver"
373 % hara kiri & auto knee don't work together.
374 Beam \override #'auto-knee-gap = #'()
377 RemoveEmptyStaffContext = \translator {
378 \RemoveEmptyStaffContext
379 \accepts "VaticanaVoice"
380 \accepts "GregorianTranscriptionVoice"
383 ScoreContext = \translator {
386 localKeySignature = #'()
388 \description "This is the top level notation context. No
389 other context can contain a @code{Score} context. This context
390 handles the administration of time signatures. It also makes sure
391 that items such as clefs, time signatures, and key-signatures are
392 aligned across staves.
394 You cannot explicitly instantiate a Score context (since it is
395 not contained in any other context). It is instantiated
396 automatically when an output definition (a @code{\score} or
397 @code{\paper} block) is processed."
399 \consists "Repeat_acknowledge_engraver"
400 \consists "Staff_collecting_engraver"
402 % move the alias along with the engraver.
404 %% TODO? add this alias from Timing_engraver::initialize() ?
405 \consists "Timing_engraver"
408 \consists "Output_property_engraver"
409 \consists "System_start_delimiter_engraver"
410 \consists "Mark_engraver"
411 \consists "Metronome_mark_engraver"
412 \consists "Break_align_engraver"
413 \consists "Spacing_engraver"
414 \consists "Vertical_align_engraver"
415 \consists "Lyric_phrasing_engraver"
416 \consists "Bar_number_engraver"
417 \consists "Span_arpeggio_engraver"
421 \accepts "VaticanaStaff"
422 \accepts "GregorianTranscriptionStaff"
423 \accepts "StaffContainer"
424 \accepts "StaffGroup"
425 \accepts "RhythmicStaff"
427 \accepts "ChordNames"
428 \accepts "GrandStaff"
429 \accepts "ChoirStaff"
430 \accepts "PianoStaff"
432 \accepts "FiguredBass"
435 soloIIText = #"Solo II"
438 splitInterval = #'(0 . 1)
439 changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
440 systemStartDelimiter =#'SystemStartBar
443 clefGlyph = #"clefs-G"
445 centralCPosition = #-6
447 automaticPhrasing = ##t
448 automaticMelismata = ##t
450 defaultBarType = #"|"
451 barNumberVisibility = #default-bar-number-visibility
454 explicitClefVisibility = #all-visible
455 explicitKeySignatureVisibility = #all-visible
456 autoBeamSettings = #default-auto-beam-settings
458 scriptDefinitions = #default-script-alist
460 verticalAlignmentChildCallback = #Align_interface::alignment_callback
462 pedalSustainStrings = #'("Ped." "*Ped." "*")
463 pedalSustainStyle = #'text
464 pedalUnaCordaStrings = #'("una corda" "" "tre corde")
465 pedalUnaCordaStyle = #'text
467 %% These are in ordinary italic font, including the *,
468 %% but they are unlikely to be used,
469 %% as the default pedal-style for SostenutoPedal is 'mixed':
470 %% i.e. Sost. Ped_____________________
471 pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
472 pedalSostenutoStyle = #'mixed
475 tupletNumberFormatFunction = #denominator-tuplet-formatter
480 autoAccidentals = #'(Staff (same-octave . 0))
481 autoCautionaries = #'()
483 keyAccidentalOrder = #'(
484 (6 . -1) (2 . -1) (5 . -1 ) (1 . -1) (4 . -1) (0 . -1) (3 . -1)
485 (3 . 1) (0 . 1) (4 . 1) (1 . 1) (5 . 1) (2 . 1) (6 . 1)
486 (6 . -2) (2 . -2) (5 . -2 ) (1 . -2) (4 . -2) (0 . -2) (3 . -2)
487 (3 . 2) (0 . 2) (4 . 2) (2 . 2) (5 . 2) (2 . 2) (6 . 2)
489 breakAlignOrder = #'(
500 barCheckSynchronize = ##t
503 chordNameFunction = #ignatzek-chord-names
504 majorSevenSymbol = #whiteTriangleMarkup
505 chordNameSeparator = #(make-simple-markup "/")
506 chordNameExceptions = #ignatzekExceptions
507 chordNoteNamer = #'()
508 chordRootNamer = #note-name->markup
510 chordNameExceptionsFull = #fullJazzExceptions
511 chordNameExceptionsPartial = #partialJazzExceptions
514 stringOneTopmost = ##t
517 %% One may change the strings tuning as following :
518 %% The lenght of the list must be equal to the number of string
519 stringTunings = #guitar-tunings
520 tablatureFormat = #fret-number-tablature-format
523 bassFigureFormatFunction = #make-bass-figure-markup
524 metronomeMarkFormatter = #make-metronome-markup
526 \grobdescriptions #all-grob-descriptions
529 OrchestralScoreContext= \translator {
533 EasyNotation = \translator {
535 NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
540 FiguredBassContext = \translator {
541 \type "Engraver_group_engraver"
543 \consists "Figured_bass_engraver"
544 \consists "Rest_swallow_translator"
545 \consists "Note_swallow_translator"
546 \consists "Separating_line_group_engraver"
548 \consistsend "Hara_kiri_engraver"
551 TabVoiceContext = \translator {
555 \consists "Tab_note_heads_engraver"
556 \remove "Fingering_engraver"
557 \remove "New_fingering_engraver"
559 Slur \override #'font-family = #'roman
560 Slur \override #'molecule-callback = #hammer-molecule-callback
561 Slur \override #'direction = #-1
563 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
564 % This feature is now disabled because most of the tab does not use it.
565 %Beam \override #'damping = #100000
566 %Stem \override #'up-to-staff = ##t
568 % No accidental in tablature !
569 \remove Accidental_engraver
572 TabStaffContext = \translator {
578 \description "Context for generating tablature. [DOCME]"
583 StaffSymbol \override #'line-count = #6
584 StaffSymbol \override #'staff-space = #1.5
586 % Don't draw stems over the tablature figures !
587 Stem \override #'avoid-note-head = ##t
589 % No accidental in tablature !
590 \remove Accidental_engraver
594 clefGlyph = #"clefs-tab"
598 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
599 % but this does not work (is this a bug or intended behaviour?):
601 % If I try to do so, I get "error: unknown escaped string:
602 % `\VaticanaStaffContext'" in params-init.ly. If I also move
603 % "\translator { \Vaticana*Context }" from params-init.ly to the end
604 % of gregorian-init.ly, then I get "error: parse error, unexpected
605 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
606 % gregorian-init.ly. --jr
608 VaticanaVoiceContext = \translator {
610 \name "VaticanaVoice"
612 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
614 % We can not remove Slur_engraver, since \addlyrics depends on it.
615 % Instead, we make the grob transparent.
616 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
617 % infinite steepness reqd"), since in ligatures, all note heads are in
618 % the same paper column such that the (transparent) slurs eventually may
619 % start and end in the same column.
620 Slur \override #'transparent = ##t
622 % We can not remove Stem_engraver, since slurs depend on stems. If
623 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
624 % in position 1 (expecting grob): ()".
625 % As a workaround, we make the grob transparent.
626 Stem \set #'transparent = ##t
628 % Since we do not remove stems, but only make it transparent, we have
629 % to set the length to 0.0. Otherwise, articulation marks (such as
630 % ictus, circulus or accentus) may be vertically placed quite away from
632 Stem \set #'length = #'0.0
634 \remove "Ligature_bracket_engraver"
635 \consists "Vaticana_ligature_engraver"
637 % Set default head for notes outside of \[ \].
638 NoteHead \set #'style = #'vaticana_punctum
640 % Put some space before and after divisiones.
641 % FIXME: This does not seem to show any effect.
642 Script \set #'padding = #0.5
644 % There are no beams in Gregorian Chant notation.
647 % Prepare TextSpanner for \episem{Initium|Finis} use.
648 TextSpanner \set #'style = #'line
649 TextSpanner \set #'edge-height = #'(0 . 0)
650 TextSpanner \set #'padding = #0.5
651 TextSpanner \set #'enclose-bounds = ##t
652 TextSpanner \set #'edge-text = #'("" . "")
655 VaticanaStaffContext = \translator {
657 \name "VaticanaStaff"
660 \accepts "VaticanaVoice"
661 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
663 \remove "Time_signature_engraver"
664 \consists "Custos_engraver"
666 % We can not remove Bar_engraver; otherwise clefs and custodes will
667 % not show up any more among other line breaking issues.
668 % Instead, we make the grob transparent.
669 BarLine \set #'transparent = ##t
671 StaffSymbol \set #'line-count = #4
673 % FIXME: unit on StaffSymbol's width should be \linewidth.
674 % StaffSymbol \set #'width = #60.0
676 % Choose vaticana do clef on 3rd line as default.
677 clefGlyph = #"clefs-vaticana_do"
678 centralCPosition = #1
682 % Select vaticana style font.
683 KeySignature \set #'style = #'vaticana
684 Accidental \set #'style = #'vaticana
685 Custos \set #'style = #'vaticana
686 Custos \set #'neutral-position = #3
687 Custos \set #'neutral-direction = #-1
688 Custos \set #'adjust-if-on-staffline = ##t
691 % Score.barAlways = ##t
694 GregorianTranscriptionVoiceContext = \translator {
696 \name "GregorianTranscriptionVoice"
699 % Removing ligature bracket engraver without replacing it by some
700 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
701 % warning for every "\[" and "\]". Therefore, we make the grob
702 % transparent instead.
703 LigatureBracket \set #'transparent = ##t
705 % We can not remove Slur_engraver, since \addlyrics depends on it.
706 % Instead, we make the grob transparent.
707 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
708 % infinite steepness reqd"), since in ligatures, all note heads are in
709 % the same paper column such that the (transparent) slurs eventually may
710 % start and end in the same column.
711 Slur \override #'transparent = ##t
713 % We can not remove Stem_engraver, since slurs depend on stems. If
714 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
715 % in position 1 (expecting grob): ()".
716 % As a workaround, we make the grob transparent.
717 Stem \set #'transparent = ##t
719 % Since we do not remove stems, but only make it transparent, we have
720 % to set the length to 0.0. Otherwise, articulation marks (such as
721 % ictus, circulus or accentus) may be vertically placed quite away from
723 Stem \set #'length = #'0.0
725 % Put some space before and after divisiones.
726 % FIXME: This does not seem to show any effect.
727 Script \set #'padding = #0.5
729 % There are no beams in Gregorian Chant notation.
732 % Prepare TextSpanner for \episem{Initium|Finis} use.
733 TextSpanner \set #'style = #'line
734 TextSpanner \set #'edge-height = #'(0 . 0)
735 TextSpanner \set #'padding = #0.5
736 TextSpanner \set #'enclose-bounds = ##t
737 TextSpanner \set #'edge-text = #'("" . "")
740 GregorianTranscriptionStaffContext = \translator {
742 \name "GregorianTranscriptionStaff"
745 \accepts "GregorianTranscriptionVoice"
747 % We can not remove Bar_engraver; otherwise clefs and custodes will
748 % not show up any more among other line breaking issues.
749 % Instead, we make the grob transparent.
750 BarLine \set #'transparent = ##t