5 % setup for Request->Element conversion. Guru-only
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
63 \type Engraver_group_engraver
64 \consists "Axis_group_engraver"
65 minimumVerticalExtent = ##f
66 extraVerticalExtent = ##f
68 localKeySignature = #'()
75 \type "Engraver_group_engraver"
77 \consists "System_start_delimiter_engraver"
78 systemStartDelimiter = #'SystemStartBracket
79 localKeySignature = #'()
82 \accepts "RhythmicStaff"
90 \InnerChoirStaffContext
93 \description "Identical to @code{StaffGroup} except that the
94 contained staves are not connected vertically."
96 \accepts "InnerChoirStaff"
97 \accepts "InnerStaffGroup"
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"
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!
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 \type "Engraver_group_engraver"
221 localKeySignature = #'()
223 \description " A group of staffs, with a brace on the left
224 side, grouping the staves together. The bar lines of the
225 contained staves are connected vertically. "
227 \consists "Span_bar_engraver"
228 \consists "Span_arpeggio_engraver"
229 \consists "System_start_delimiter_engraver"
230 systemStartDelimiter = #'SystemStartBrace
240 Just like @code{GrandStaff} but with @code{minVerticalAlign} set
241 equal to @code{maxVerticalAlign} so that interstaff beaming and
242 slurring can be used."
243 verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
244 VerticalAlignment \override #'forced-distance = #12
245 VerticalAlignment \override #'self-alignment-Y = #0
247 \consists "Vertical_align_engraver"
248 \consists "Instrument_name_engraver"
253 % \consistsend "Axis_group_engraver"
257 \type "Engraver_group_engraver"
258 \name InnerStaffGroup
259 localKeySignature = #'()
261 \consists "Span_bar_engraver"
262 \consists "Span_arpeggio_engraver"
263 \consists "Output_property_engraver"
264 systemStartDelimiter = #'SystemStartBracket
266 \consists "System_start_delimiter_engraver"
268 \accepts "RhythmicStaff"
269 \accepts "GrandStaff"
270 \accepts "PianoStaff"
273 \accepts "ChordNames"
277 \InnerStaffGroupContext
282 " Groups staffs while adding a bracket on the left side,
283 grouping the staves together. The bar lines of the contained
284 staves are connected vertically.
287 \accepts "InnerChoirStaff"
288 \accepts "ChoirStaff"
289 \accepts "InnerStaffGroup"
290 \accepts "FiguredBass"
296 \type "Engraver_group_engraver"
297 \consistsend "Hara_kiri_engraver"
298 minimumVerticalExtent = #'(-1.2 . 2.4)
299 extraVerticalExtent = ##f
303 Corresponds to a voice with lyrics. Handles the printing of a
304 single line of lyrics.
308 \consists "Separating_line_group_engraver"
309 \consists "Lyric_engraver"
310 \consists "Extender_engraver"
311 \consists "Hyphen_engraver"
312 \consists "Stanza_number_engraver"
313 \consists "Instrument_name_engraver"
314 \consists "Skip_event_swallow_translator"
315 SeparationItem \set #'padding = #0.5
318 \type "Engraver_group_engraver"
320 \consistsend "Axis_group_engraver"
322 minimumVerticalExtent = ##f
323 extraVerticalExtent = ##f
327 \consists "Rest_swallow_translator"
328 \consists "Skip_event_swallow_translator"
329 \consists "Tie_engraver"
330 \consists "Note_swallow_translator"
331 \consists "Note_name_engraver"
332 \consists "Separating_line_group_engraver"
336 \type "Engraver_group_engraver"
338 \description "Typesets lyrics."
340 %% To get folded repeats right.
341 \consists Vertical_align_engraver
343 minimumVerticalExtent = ##f
344 extraVerticalExtent = ##f
347 \accepts "LyricsVoice"
352 \type "Engraver_group_engraver"
354 \description "Typesets chord names."
356 \consists "Rest_swallow_translator"
357 \consists "Output_property_engraver"
358 \consists "Separating_line_group_engraver"
359 \consists "Chord_name_engraver"
360 \consists "Skip_event_swallow_translator"
361 \consistsend "Hara_kiri_engraver"
363 minimumVerticalExtent = #'(0 . 2.5)
364 extraVerticalExtent = ##f
369 RemoveEmptyStaffContext= \translator {
371 \remove "Axis_group_engraver"
372 \consistsend "Hara_kiri_engraver"
375 % hara kiri & auto knee don't work together.
376 Beam \override #'auto-knee-gap = #'()
379 AncientRemoveEmptyStaffContext = \translator {
380 %% why not add by default?
382 \RemoveEmptyStaffContext
383 \accepts "VaticanaVoice"
384 \accepts "GregorianTranscriptionVoice"
390 localKeySignature = #'()
392 \description "This is the top level notation context. No
393 other context can contain a @code{Score} context. This context
394 handles the administration of time signatures. It also makes sure
395 that items such as clefs, time signatures, and key-signatures are
396 aligned across staves.
398 You cannot explicitly instantiate a Score context (since it is
399 not contained in any other context). It is instantiated
400 automatically when an output definition (a @code{\score} or
401 @code{\paper} block) is processed."
403 \consists "Repeat_acknowledge_engraver"
404 \consists "Staff_collecting_engraver"
406 % move the alias along with the engraver.
408 %% TODO? add this alias from Timing_engraver::initialize() ?
409 \consists "Timing_engraver"
412 \consists "Output_property_engraver"
413 \consists "System_start_delimiter_engraver"
414 \consists "Mark_engraver"
415 \consists "Metronome_mark_engraver"
416 \consists "Break_align_engraver"
417 \consists "Spacing_engraver"
418 \consists "Vertical_align_engraver"
419 \consists "Lyric_phrasing_engraver"
420 \consists "Bar_number_engraver"
421 \consists "Span_arpeggio_engraver"
425 \accepts "VaticanaStaff"
426 \accepts "GregorianTranscriptionStaff"
427 \accepts "StaffContainer"
428 \accepts "StaffGroup"
429 \accepts "RhythmicStaff"
431 \accepts "ChordNames"
432 \accepts "GrandStaff"
433 \accepts "ChoirStaff"
434 \accepts "PianoStaff"
436 \accepts "FiguredBass"
439 soloIIText = #"Solo II"
442 splitInterval = #'(0 . 1)
443 changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
444 systemStartDelimiter =#'SystemStartBar
446 melismaBusyProperties = #'(melismaBusy slurMelismaBusy tieMelismaBusy beamMelismaBusy)
448 clefGlyph = #"clefs-G"
450 centralCPosition = #-6
452 automaticPhrasing = ##t
453 phrasingPunctuation = #".,:!?\""
455 defaultBarType = #"|"
456 barNumberVisibility = #default-bar-number-visibility
459 explicitClefVisibility = #all-visible
460 explicitKeySignatureVisibility = #all-visible
461 autoBeamSettings = #default-auto-beam-settings
463 scriptDefinitions = #default-script-alist
465 verticalAlignmentChildCallback = #Align_interface::alignment_callback
467 pedalSustainStrings = #'("Ped." "*Ped." "*")
468 pedalSustainStyle = #'text
469 pedalUnaCordaStrings = #'("una corda" "" "tre corde")
470 pedalUnaCordaStyle = #'text
472 %% These are in ordinary italic font, including the *,
473 %% but they are unlikely to be used,
474 %% as the default pedal-style for SostenutoPedal is 'mixed':
475 %% i.e. Sost. Ped_____________________
476 pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
477 pedalSostenutoStyle = #'mixed
479 fingeringOrientations = #'(up down)
480 tupletNumberFormatFunction = #denominator-tuplet-formatter
485 autoAccidentals = #'(Staff (same-octave . 0))
486 autoCautionaries = #'()
488 keyAccidentalOrder = #`(
489 (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
490 (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
491 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
492 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
494 breakAlignOrder = #'(
505 barCheckSynchronize = ##t
508 chordNameFunction = #ignatzek-chord-names
509 majorSevenSymbol = #whiteTriangleMarkup
510 chordNameSeparator = #(make-simple-markup "/")
511 chordNameExceptions = #ignatzekExceptions
512 chordNoteNamer = #'()
513 chordRootNamer = #note-name->markup
515 chordNameExceptionsFull = #fullJazzExceptions
516 chordNameExceptionsPartial = #partialJazzExceptions
519 stringOneTopmost = ##t
522 %% One may change the strings tuning as following :
523 %% The lenght of the list must be equal to the number of string
524 stringTunings = #guitar-tunings
525 tablatureFormat = #fret-number-tablature-format
528 bassFigureFormatFunction = #make-bass-figure-markup
529 metronomeMarkFormatter = #make-metronome-markup
533 (Voice Stem direction 1)
535 ;; TODO: should take from existing definition.
536 ;; c&p from define-grobs.scm
538 (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
539 (Voice Stem stem-shorten (0.4 0))
540 (Voice Stem font-size -3)
541 (Voice NoteHead font-size -3)
542 (Voice Dots font-size -3)
543 (Voice Stem beamed-lengths
544 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
545 (Voice Stem beamed-minimum-free-lengths
546 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
547 (Voice Stem beamed-extreme-minimum-free-lengths
548 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
550 (Voice Stem no-stem-extend #t)
551 (Voice Beam thickness 0.384)
552 (Voice Beam space-function ,(lambda (beam mult)
553 (* 0.8 (Beam::space_function
555 (Voice Beam position-callbacks (,Beam::least_squares
557 ,Beam::slope_damping))
558 (Staff Accidental font-size -4)
559 (Voice Slur direction -1)
562 \grobdescriptions #all-grob-descriptions
569 EasyNotation = \translator {
571 NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
572 NoteHead \override #'Y-extent-callback = #'()
573 NoteHead \override #'X-extent-callback = #'()
579 \type "Engraver_group_engraver"
581 \consists "Figured_bass_engraver"
582 \consists "Rest_swallow_translator"
583 \consists "Note_swallow_translator"
584 \consists "Separating_line_group_engraver"
586 \consistsend "Hara_kiri_engraver"
593 \consists "Tab_note_heads_engraver"
594 \remove "Fingering_engraver"
595 \remove "New_fingering_engraver"
597 Slur \override #'font-family = #'roman
598 Slur \override #'molecule-callback = #hammer-molecule-callback
599 Slur \override #'direction = #-1
601 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
602 % This feature is now disabled because most of the tab does not use it.
603 %Beam \override #'damping = #100000
604 %Stem \override #'up-to-staff = ##t
606 % No accidental in tablature !
607 \remove Accidental_engraver
616 \description "Context for generating tablature. [DOCME]"
619 TODO: this context should use a special staff_symbol engraver that
620 takes the line count out of the stringTunings property.
628 StaffSymbol \override #'line-count = #6
629 StaffSymbol \override #'staff-space = #1.5
631 % Don't draw stems over the tablature figures !
632 Stem \override #'avoid-note-head = ##t
634 % No accidental in tablature !
635 \remove "Accidental_engraver"
636 \remove "Key_engraver"
637 \remove "String_number_engraver"
639 clefGlyph = #"clefs-tab"
643 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
644 % but this does not work (is this a bug or intended behaviour?):
646 % If I try to do so, I get "error: unknown escaped string:
647 % `\VaticanaStaffContext'" in params-init.ly. If I also move
648 % "\translator { \Vaticana*Context }" from params-init.ly to the end
649 % of gregorian-init.ly, then I get "error: parse error, unexpected
650 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
651 % gregorian-init.ly. --jr
655 \name "VaticanaVoice"
657 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
659 % We can not remove Slur_engraver, since \addlyrics depends on it.
660 % Instead, we make the grob transparent.
661 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
662 % infinite steepness reqd"), since in ligatures, all note heads are in
663 % the same paper column such that the (transparent) slurs eventually may
664 % start and end in the same column.
665 Slur \override #'transparent = ##t
667 % We can not remove Stem_engraver, since slurs depend on stems. If
668 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
669 % in position 1 (expecting grob): ()".
670 % As a workaround, we make the grob transparent.
671 Stem \set #'transparent = ##t
673 % Since we do not remove stems, but only make it transparent, we have
674 % to set the length to 0.0. Otherwise, articulation marks (such as
675 % ictus, circulus or accentus) may be vertically placed quite away from
677 Stem \set #'length = #'0.0
679 \remove "Ligature_bracket_engraver"
680 \consists "Vaticana_ligature_engraver"
682 % Set default head for notes outside of \[ \].
683 NoteHead \set #'style = #'vaticana_punctum
685 % Put some space before and after divisiones.
686 % FIXME: This does not seem to show any effect.
687 Script \set #'padding = #0.5
689 % There are no beams in Gregorian Chant notation.
692 % Prepare TextSpanner for \episem{Initium|Finis} use.
693 TextSpanner \set #'style = #'line
694 TextSpanner \set #'edge-height = #'(0 . 0)
695 TextSpanner \set #'padding = #0.5
696 TextSpanner \set #'enclose-bounds = ##t
697 TextSpanner \set #'edge-text = #'("" . "")
702 \name "VaticanaStaff"
705 \accepts "VaticanaVoice"
706 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
708 \remove "Time_signature_engraver"
709 \consists "Custos_engraver"
711 % We can not remove Bar_engraver; otherwise clefs and custodes will
712 % not show up any more among other line breaking issues.
713 % Instead, we make the grob transparent.
714 BarLine \set #'transparent = ##t
716 StaffSymbol \set #'line-count = #4
717 StaffSymbol \set #'thickness = #0.6
719 % FIXME: unit on StaffSymbol's width should be \linewidth.
720 % StaffSymbol \set #'width = #60.0
722 % Choose vaticana do clef on 3rd line as default.
723 clefGlyph = #"clefs-vaticana_do"
724 centralCPosition = #1
728 % Select vaticana style font.
729 KeySignature \set #'style = #'vaticana
730 Accidental \set #'style = #'vaticana
731 Custos \set #'style = #'vaticana
732 Custos \set #'neutral-position = #3
733 Custos \set #'neutral-direction = #-1
734 Custos \set #'adjust-if-on-staffline = ##t
737 % Score.barAlways = ##t
742 \name "GregorianTranscriptionVoice"
745 % Removing ligature bracket engraver without replacing it by some
746 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
747 % warning for every "\[" and "\]". Therefore, we make the grob
748 % transparent instead.
749 LigatureBracket \set #'transparent = ##t
751 % We can not remove Slur_engraver, since \addlyrics depends on it.
752 % Instead, we make the grob transparent.
753 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
754 % infinite steepness reqd"), since in ligatures, all note heads are in
755 % the same paper column such that the (transparent) slurs eventually may
756 % start and end in the same column.
757 Slur \override #'transparent = ##t
759 % We can not remove Stem_engraver, since slurs depend on stems. If
760 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
761 % in position 1 (expecting grob): ()".
762 % As a workaround, we make the grob transparent.
763 Stem \set #'transparent = ##t
765 % Since we do not remove stems, but only make it transparent, we have
766 % to set the length to 0.0. Otherwise, articulation marks (such as
767 % ictus, circulus or accentus) may be vertically placed quite away from
769 Stem \set #'length = #'0.0
771 % Put some space before and after divisiones.
772 % FIXME: This does not seem to show any effect.
773 Script \set #'padding = #0.5
775 % There are no beams in Gregorian Chant notation.
778 % Prepare TextSpanner for \episem{Initium|Finis} use.
779 TextSpanner \set #'style = #'line
780 TextSpanner \set #'edge-height = #'(0 . 0)
781 TextSpanner \set #'padding = #0.5
782 TextSpanner \set #'enclose-bounds = ##t
783 TextSpanner \set #'edge-text = #'("" . "")
787 \name "GregorianTranscriptionStaff"
790 \accepts "GregorianTranscriptionVoice"
792 % We can not remove Bar_engraver; otherwise clefs and custodes will
793 % not show up any more among other line breaking issues.
794 % Instead, we make the grob transparent.
795 BarLine \set #'transparent = ##t