5 % setup for Request->Element conversion. Guru-only
8 StaffContext=\translator {
9 \type "Engraver_group_engraver"
12 \description "Handles clefs, bar lines, keys, accidentals. It can contain
13 @code{Voice} contexts."
16 \consists "Output_property_engraver"
18 \consists "Bar_engraver"
19 % Bar_engraver must be first so default bars aren't overwritten
21 \consists "Font_size_engraver"
23 % \consists "Repeat_engraver"
24 \consists "Volta_engraver"
25 \consists "Separating_line_group_engraver"
26 SeparatingGroupSpanner \override #'spacing-procedure
27 = #Separating_group_spanner::set_spacing_rods_and_seqs
28 \consists "Dot_column_engraver"
30 % perhaps move to Voice context?
31 \consists "Ottava_spanner_engraver"
32 \consists "Clef_engraver"
33 \consists "Key_engraver"
34 \consists "Time_signature_engraver"
35 \consists "Staff_symbol_engraver"
36 \consists "Collision_engraver"
37 \consists "Rest_collision_engraver"
38 \consists "Accidental_engraver"
39 \consists "Piano_pedal_engraver"
40 \consists "Instrument_name_engraver"
41 \consists "Grob_pq_engraver"
42 \consists "Forbid_line_break_engraver"
43 \consists "String_number_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"
219 GrandStaffContext=\translator{
220 \type "Engraver_group_engraver"
222 localKeySignature = #'()
224 \description " A group of staffs, with a brace on the left
225 side, grouping the staves together. The bar lines of the
226 contained staves are connected vertically. "
228 \consists "Span_bar_engraver"
229 \consists "Span_arpeggio_engraver"
230 \consists "System_start_delimiter_engraver"
231 systemStartDelimiter = #'SystemStartBrace
236 PianoStaffContext = \translator{
241 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
242 equal to @code{maxVerticalAlign} so that interstaff beaming and
243 slurring can be used."
244 verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
245 VerticalAlignment \override #'forced-distance = #12
246 VerticalAlignment \override #'self-alignment-Y = #0
248 \consists "Vertical_align_engraver"
249 \consists "Instrument_name_engraver"
254 % \consistsend "Axis_group_engraver"
257 InnerStaffGroupContext= \translator {
258 \type "Engraver_group_engraver"
259 \name InnerStaffGroup
260 localKeySignature = #'()
262 \consists "Span_bar_engraver"
263 \consists "Span_arpeggio_engraver"
264 \consists "Output_property_engraver"
265 systemStartDelimiter = #'SystemStartBracket
267 \consists "System_start_delimiter_engraver"
269 \accepts "RhythmicStaff"
270 \accepts "GrandStaff"
271 \accepts "PianoStaff"
274 \accepts "ChordNames"
277 StaffGroupContext = \translator {
278 \InnerStaffGroupContext
283 " Groups staffs while adding a bracket on the left side,
284 grouping the staves together. The bar lines of the contained
285 staves are connected vertically.
288 \accepts "InnerChoirStaff"
289 \accepts "ChoirStaff"
290 \accepts "InnerStaffGroup"
291 \accepts "FiguredBass"
296 LyricsVoiceContext= \translator{
297 \type "Engraver_group_engraver"
298 \consistsend "Hara_kiri_engraver"
299 minimumVerticalExtent = #'(-1.2 . 2.4)
300 extraVerticalExtent = ##f
304 Corresponds to a voice with lyrics. Handles the printing of a
305 single line of lyrics.
309 \consists "Separating_line_group_engraver"
310 \consists "Lyric_engraver"
311 \consists "Extender_engraver"
312 \consists "Hyphen_engraver"
313 \consists "Stanza_number_engraver"
314 \consists "Skip_event_swallow_translator"
315 phrasingPunctuation = #".,:!?\""
316 SeparationItem \set #'padding = #0.5
318 NoteNamesContext = \translator {
319 \type "Engraver_group_engraver"
321 \consistsend "Axis_group_engraver"
323 minimumVerticalExtent = ##f
324 extraVerticalExtent = ##f
328 \consists "Note_name_engraver"
329 \consists "Separating_line_group_engraver"
332 LyricsContext = \translator {
333 \type "Engraver_group_engraver"
335 \description "Typesets lyrics."
336 %% To get folded repeats right.
337 \consists Vertical_align_engraver
339 % \consistsend "Hara_kiri_engraver"
340 minimumVerticalExtent = ##f
341 extraVerticalExtent = ##f
344 \accepts "LyricsVoice"
348 ChordNamesContext = \translator {
349 \type "Engraver_group_engraver"
351 \description "Typesets chord names."
353 \consists "Rest_swallow_translator"
354 \consists "Output_property_engraver"
355 \consists "Separating_line_group_engraver"
356 \consists "Chord_name_engraver"
357 \consists "Skip_event_swallow_translator"
358 \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"
372 % hara kiri & auto knee don't work together.
373 Beam \override #'auto-knee-gap = #'()
376 RemoveEmptyStaffContext = \translator {
377 \RemoveEmptyStaffContext
378 \accepts "VaticanaVoice"
379 \accepts "GregorianTranscriptionVoice"
382 ScoreContext = \translator {
385 localKeySignature = #'()
387 \description "This is the top level notation context. No
388 other context can contain a @code{Score} context. This context
389 handles the administration of time signatures. It also makes sure
390 that items such as clefs, time signatures, and key-signatures are
391 aligned across staves.
393 You cannot explicitly instantiate a Score context (since it is
394 not contained in any other context). It is instantiated
395 automatically when an output definition (a @code{\score} or
396 @code{\paper} block) is processed."
398 \consists "Repeat_acknowledge_engraver"
399 \consists "Staff_collecting_engraver"
401 % move the alias along with the engraver.
403 %% TODO? add this alias from Timing_engraver::initialize() ?
404 \consists "Timing_engraver"
407 \consists "Output_property_engraver"
408 \consists "System_start_delimiter_engraver"
409 \consists "Mark_engraver"
410 \consists "Metronome_mark_engraver"
411 \consists "Break_align_engraver"
412 \consists "Spacing_engraver"
413 \consists "Vertical_align_engraver"
414 \consists "Lyric_phrasing_engraver"
415 \consists "Bar_number_engraver"
416 \consists "Span_arpeggio_engraver"
420 \accepts "VaticanaStaff"
421 \accepts "GregorianTranscriptionStaff"
422 \accepts "StaffContainer"
423 \accepts "StaffGroup"
424 \accepts "RhythmicStaff"
426 \accepts "ChordNames"
427 \accepts "GrandStaff"
428 \accepts "ChoirStaff"
429 \accepts "PianoStaff"
431 \accepts "FiguredBass"
434 soloIIText = #"Solo II"
437 splitInterval = #'(0 . 1)
438 changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
439 systemStartDelimiter =#'SystemStartBar
441 melismaBusyProperties = #'(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy)
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
474 fingeringOrientations = #'(up down)
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
528 (Voice Stem direction 1)
530 ;; TODO: should take from existing definition.
531 ;; c&p from define-grobs.scm
533 (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
534 (Voice Stem stem-shorten (0.4 0))
535 (Voice Stem font-relative-size -1)
536 (Voice NoteHead font-relative-size -1)
537 (Voice Dots font-relative-size -1)
538 (Voice Stem beamed-lengths
539 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
540 (Voice Stem beamed-minimum-free-lengths
541 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
542 (Voice Stem beamed-extreme-minimum-free-lengths
543 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
545 (Voice Stem no-stem-extend #t)
546 (Voice Beam thickness 0.384)
547 (Voice Beam space-function ,(lambda (beam mult)
548 (* 0.8 (Beam::space_function
550 (Voice Beam position-callbacks (,Beam::least_squares
552 ,Beam::slope_damping))
553 (Staff Accidental font-relative-size -2)
554 (Voice Slur direction -1)
557 \grobdescriptions #all-grob-descriptions
560 OrchestralScoreContext= \translator {
564 EasyNotation = \translator {
566 NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
571 FiguredBassContext = \translator {
572 \type "Engraver_group_engraver"
574 \consists "Figured_bass_engraver"
575 \consists "Rest_swallow_translator"
576 \consists "Note_swallow_translator"
577 \consists "Separating_line_group_engraver"
579 \consistsend "Hara_kiri_engraver"
582 TabVoiceContext = \translator {
586 \consists "Tab_note_heads_engraver"
587 \remove "Fingering_engraver"
588 \remove "New_fingering_engraver"
590 Slur \override #'font-family = #'roman
591 Slur \override #'molecule-callback = #hammer-molecule-callback
592 Slur \override #'direction = #-1
594 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
595 % This feature is now disabled because most of the tab does not use it.
596 %Beam \override #'damping = #100000
597 %Stem \override #'up-to-staff = ##t
599 % No accidental in tablature !
600 \remove Accidental_engraver
603 TabStaffContext = \translator {
609 \description "Context for generating tablature. [DOCME]"
614 StaffSymbol \override #'line-count = #6
615 StaffSymbol \override #'staff-space = #1.5
617 % Don't draw stems over the tablature figures !
618 Stem \override #'avoid-note-head = ##t
620 % No accidental in tablature !
621 \remove Accidental_engraver
625 clefGlyph = #"clefs-tab"
629 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
630 % but this does not work (is this a bug or intended behaviour?):
632 % If I try to do so, I get "error: unknown escaped string:
633 % `\VaticanaStaffContext'" in params-init.ly. If I also move
634 % "\translator { \Vaticana*Context }" from params-init.ly to the end
635 % of gregorian-init.ly, then I get "error: parse error, unexpected
636 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
637 % gregorian-init.ly. --jr
639 VaticanaVoiceContext = \translator {
641 \name "VaticanaVoice"
643 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
645 % We can not remove Slur_engraver, since \addlyrics depends on it.
646 % Instead, we make the grob transparent.
647 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
648 % infinite steepness reqd"), since in ligatures, all note heads are in
649 % the same paper column such that the (transparent) slurs eventually may
650 % start and end in the same column.
651 Slur \override #'transparent = ##t
653 % We can not remove Stem_engraver, since slurs depend on stems. If
654 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
655 % in position 1 (expecting grob): ()".
656 % As a workaround, we make the grob transparent.
657 Stem \set #'transparent = ##t
659 % Since we do not remove stems, but only make it transparent, we have
660 % to set the length to 0.0. Otherwise, articulation marks (such as
661 % ictus, circulus or accentus) may be vertically placed quite away from
663 Stem \set #'length = #'0.0
665 \remove "Ligature_bracket_engraver"
666 \consists "Vaticana_ligature_engraver"
668 % Set default head for notes outside of \[ \].
669 NoteHead \set #'style = #'vaticana_punctum
671 % Put some space before and after divisiones.
672 % FIXME: This does not seem to show any effect.
673 Script \set #'padding = #0.5
675 % There are no beams in Gregorian Chant notation.
678 % Prepare TextSpanner for \episem{Initium|Finis} use.
679 TextSpanner \set #'style = #'line
680 TextSpanner \set #'edge-height = #'(0 . 0)
681 TextSpanner \set #'padding = #0.5
682 TextSpanner \set #'enclose-bounds = ##t
683 TextSpanner \set #'edge-text = #'("" . "")
686 VaticanaStaffContext = \translator {
688 \name "VaticanaStaff"
691 \accepts "VaticanaVoice"
692 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
694 \remove "Time_signature_engraver"
695 \consists "Custos_engraver"
697 % We can not remove Bar_engraver; otherwise clefs and custodes will
698 % not show up any more among other line breaking issues.
699 % Instead, we make the grob transparent.
700 BarLine \set #'transparent = ##t
702 StaffSymbol \set #'line-count = #4
703 StaffSymbol \set #'thickness = #0.6
705 % FIXME: unit on StaffSymbol's width should be \linewidth.
706 % StaffSymbol \set #'width = #60.0
708 % Choose vaticana do clef on 3rd line as default.
709 clefGlyph = #"clefs-vaticana_do"
710 centralCPosition = #1
714 % Select vaticana style font.
715 KeySignature \set #'style = #'vaticana
716 Accidental \set #'style = #'vaticana
717 Custos \set #'style = #'vaticana
718 Custos \set #'neutral-position = #3
719 Custos \set #'neutral-direction = #-1
720 Custos \set #'adjust-if-on-staffline = ##t
723 % Score.barAlways = ##t
726 GregorianTranscriptionVoiceContext = \translator {
728 \name "GregorianTranscriptionVoice"
731 % Removing ligature bracket engraver without replacing it by some
732 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
733 % warning for every "\[" and "\]". Therefore, we make the grob
734 % transparent instead.
735 LigatureBracket \set #'transparent = ##t
737 % We can not remove Slur_engraver, since \addlyrics depends on it.
738 % Instead, we make the grob transparent.
739 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
740 % infinite steepness reqd"), since in ligatures, all note heads are in
741 % the same paper column such that the (transparent) slurs eventually may
742 % start and end in the same column.
743 Slur \override #'transparent = ##t
745 % We can not remove Stem_engraver, since slurs depend on stems. If
746 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
747 % in position 1 (expecting grob): ()".
748 % As a workaround, we make the grob transparent.
749 Stem \set #'transparent = ##t
751 % Since we do not remove stems, but only make it transparent, we have
752 % to set the length to 0.0. Otherwise, articulation marks (such as
753 % ictus, circulus or accentus) may be vertically placed quite away from
755 Stem \set #'length = #'0.0
757 % Put some space before and after divisiones.
758 % FIXME: This does not seem to show any effect.
759 Script \set #'padding = #0.5
761 % There are no beams in Gregorian Chant notation.
764 % Prepare TextSpanner for \episem{Initium|Finis} use.
765 TextSpanner \set #'style = #'line
766 TextSpanner \set #'edge-height = #'(0 . 0)
767 TextSpanner \set #'padding = #0.5
768 TextSpanner \set #'enclose-bounds = ##t
769 TextSpanner \set #'edge-text = #'("" . "")
772 GregorianTranscriptionStaffContext = \translator {
774 \name "GregorianTranscriptionStaff"
777 \accepts "GregorianTranscriptionVoice"
779 % We can not remove Bar_engraver; otherwise clefs and custodes will
780 % not show up any more among other line breaking issues.
781 % Instead, we make the grob transparent.
782 BarLine \set #'transparent = ##t