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
122 VoltaBracket \override #'padding = #5
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"
176 \consists "Part_combine_engraver"
179 Must come before text_engraver, but after note_column engraver.
182 \consists "Text_engraver"
183 \consists "Dynamic_engraver"
184 \consists "Fingering_engraver"
186 \consists "Script_engraver"
187 \consists "Script_column_engraver"
188 \consists "Rhythmic_column_engraver"
189 \consists "Phrasing_slur_engraver"
190 \consists "Cluster_spanner_engraver"
191 \consists "Slur_engraver"
192 \consists "Tie_engraver"
193 \consists "Tuplet_engraver"
194 \consists "A2_engraver"
196 \consists "Skip_event_swallow_translator"
197 \accepts Thread % bug if you leave out this!
201 \type Engraver_group_engraver
203 localKeySignature = #'()
205 Handles note heads, and is contained in the Voice context. You
206 have to instantiate this explicitly if you want to adjust the
207 style of individual note heads.
209 \consists "Font_size_engraver"
210 \consists "Thread_devnull_engraver"
211 \consists "Note_heads_engraver"
212 \consists "Rest_engraver"
215 \consists "Output_property_engraver"
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
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"
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"
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"
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 "Vocal_name_engraver"
315 \consists "Skip_event_swallow_translator"
316 SeparationItem \set #'padding = #0.5
319 \type "Engraver_group_engraver"
321 \consistsend "Axis_group_engraver"
323 minimumVerticalExtent = ##f
324 extraVerticalExtent = ##f
328 \consists "Rest_swallow_translator"
329 \consists "Skip_event_swallow_translator"
330 \consists "Tie_engraver"
331 \consists "Note_swallow_translator"
332 \consists "Note_name_engraver"
333 \consists "Separating_line_group_engraver"
337 \type "Engraver_group_engraver"
339 \description "Typesets lyrics."
341 %% To get folded repeats right.
342 \consists Vertical_align_engraver
344 minimumVerticalExtent = ##f
345 extraVerticalExtent = ##f
348 \accepts "LyricsVoice"
353 \type "Engraver_group_engraver"
355 \description "Typesets chord names."
357 \consists "Rest_swallow_translator"
358 \consists "Output_property_engraver"
359 \consists "Separating_line_group_engraver"
360 \consists "Chord_name_engraver"
361 \consists "Skip_event_swallow_translator"
362 \consistsend "Hara_kiri_engraver"
364 minimumVerticalExtent = #'(0 . 2.5)
365 extraVerticalExtent = ##f
366 SeparatingGroupSpanner \override #'padding = #0.8
371 RemoveEmptyStaffContext= \translator {
373 \remove "Axis_group_engraver"
374 \consistsend "Hara_kiri_engraver"
377 % hara kiri & auto knee don't work together.
378 Beam \override #'auto-knee-gap = #'()
381 AncientRemoveEmptyStaffContext = \translator {
382 %% why not add by default?
384 \RemoveEmptyStaffContext
385 \accepts "VaticanaVoice"
386 \accepts "GregorianTranscriptionVoice"
392 localKeySignature = #'()
394 \description "This is the top level notation context. No
395 other context can contain a @code{Score} context. This context
396 handles the administration of time signatures. It also makes sure
397 that items such as clefs, time signatures, and key-signatures are
398 aligned across staves.
400 You cannot explicitly instantiate a Score context (since it is
401 not contained in any other context). It is instantiated
402 automatically when an output definition (a @code{\score} or
403 @code{\paper} block) is processed."
405 \consists "Repeat_acknowledge_engraver"
406 \consists "Staff_collecting_engraver"
408 % move the alias along with the engraver.
410 %% TODO? add this alias from Timing_engraver::initialize() ?
411 \consists "Timing_engraver"
414 \consists "Output_property_engraver"
415 \consists "System_start_delimiter_engraver"
416 \consists "Mark_engraver"
417 \consists "Metronome_mark_engraver"
418 \consists "Break_align_engraver"
419 \consists "Spacing_engraver"
420 \consists "Vertical_align_engraver"
421 \consists "Lyric_phrasing_engraver"
422 \consists "Bar_number_engraver"
423 \consists "Span_arpeggio_engraver"
427 \accepts "VaticanaStaff"
428 \accepts "GregorianTranscriptionStaff"
429 \accepts "StaffContainer"
430 \accepts "StaffGroup"
431 \accepts "RhythmicStaff"
433 \accepts "ChordNames"
434 \accepts "GrandStaff"
435 \accepts "ChoirStaff"
436 \accepts "PianoStaff"
439 \accepts "FiguredBass"
442 soloIIText = #"Solo II"
445 splitInterval = #'(0 . 1)
446 changeMoment = #`(,(ly:make-moment 0 0) . ,(ly:make-moment 1 512))
447 systemStartDelimiter =#'SystemStartBar
449 melismaBusyProperties = #default-melisma-properties
451 clefGlyph = #"clefs-G"
453 centralCPosition = #-6
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
481 markFormatter = #format-mark-letters
486 autoAccidentals = #'(Staff (same-octave . 0))
487 autoCautionaries = #'()
489 keyAccidentalOrder = #`(
490 (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
491 (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
492 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
493 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
495 breakAlignOrder = #'(
507 barCheckSynchronize = ##f
510 chordNameFunction = #ignatzek-chord-names
511 majorSevenSymbol = #whiteTriangleMarkup
512 chordNameSeparator = #(make-simple-markup "/")
513 chordNameExceptions = #ignatzekExceptions
514 chordNoteNamer = #'()
515 chordRootNamer = #note-name->markup
517 chordNameExceptionsFull = #fullJazzExceptions
518 chordNameExceptionsPartial = #partialJazzExceptions
521 stringOneTopmost = ##t
524 %% One may change the strings tuning as following :
525 %% The lenght of the list must be equal to the number of string
526 stringTunings = #guitar-tunings
527 tablatureFormat = #fret-number-tablature-format
530 bassFigureFormatFunction = #make-bass-figure-markup
531 metronomeMarkFormatter = #format-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
565 OrchestralScoreContext = \translator {
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"
591 \type "Engraver_group_engraver"
592 \consists "Swallow_engraver"
593 \description "Silently discards all musical information given to this context. "
600 \consists "Tab_note_heads_engraver"
601 \remove "Fingering_engraver"
602 \remove "New_fingering_engraver"
604 \description "Context for drawing notes in a Tab staff. "
605 Slur \override #'font-family = #'roman
606 Slur \override #'molecule-callback = #hammer-molecule-callback
607 Slur \override #'direction = #-1
609 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
610 % This feature is now disabled because most of the tab does not use it.
611 %Beam \override #'damping = #100000
612 %Stem \override #'up-to-staff = ##t
614 % No accidental in tablature !
615 \remove Accidental_engraver
624 \description "Context for generating tablature. [DOCME]"
627 TODO: this context should use a special staff_symbol engraver that
628 takes the line count out of the stringTunings property.
636 StaffSymbol \override #'line-count = #6
637 StaffSymbol \override #'staff-space = #1.5
639 % Don't draw stems over the tablature figures !
640 Stem \override #'avoid-note-head = ##t
642 % No accidental in tablature !
643 \remove "Accidental_engraver"
644 \remove "Key_engraver"
645 \remove "String_number_engraver"
647 clefGlyph = #"clefs-tab"
651 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
652 % but this does not work (is this a bug or intended behaviour?):
654 % If I try to do so, I get "error: unknown escaped string:
655 % `\VaticanaStaffContext'" in params-init.ly. If I also move
656 % "\translator { \Vaticana*Context }" from params-init.ly to the end
657 % of gregorian-init.ly, then I get "error: parse error, unexpected
658 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
659 % gregorian-init.ly. --jr
663 \name "VaticanaVoice"
665 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
667 % We can not remove Slur_engraver, since \addlyrics depends on it.
668 % Instead, we make the grob transparent.
669 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
670 % infinite steepness reqd"), since in ligatures, all note heads are in
671 % the same paper column such that the (transparent) slurs eventually may
672 % start and end in the same column.
673 Slur \override #'transparent = ##t
675 % We can not remove Stem_engraver, since slurs depend on stems. If
676 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
677 % in position 1 (expecting grob): ()".
678 % As a workaround, we make the grob transparent.
679 Stem \set #'transparent = ##t
681 % Since we do not remove stems, but only make it transparent, we have
682 % to set the length to 0.0. Otherwise, articulation marks (such as
683 % ictus, circulus or accentus) may be vertically placed quite away from
685 Stem \set #'length = #'0.0
687 \remove "Ligature_bracket_engraver"
688 \consists "Vaticana_ligature_engraver"
690 % Set default head for notes outside of \[ \].
691 NoteHead \set #'style = #'vaticana_punctum
693 % Put some space before and after divisiones.
694 % FIXME: This does not seem to show any effect.
695 Script \set #'padding = #0.5
697 % There are no beams in Gregorian Chant notation.
700 % Prepare TextSpanner for \episem{Initium|Finis} use.
701 TextSpanner \set #'style = #'line
702 TextSpanner \set #'edge-height = #'(0 . 0)
703 TextSpanner \set #'padding = #0.5
704 TextSpanner \set #'enclose-bounds = #1
705 TextSpanner \set #'edge-text = #'("" . "")
710 \name "VaticanaStaff"
713 \accepts "VaticanaVoice"
714 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
716 \remove "Time_signature_engraver"
717 \consists "Custos_engraver"
719 % We can not remove Bar_engraver; otherwise clefs and custodes will
720 % not show up any more among other line breaking issues.
721 % Instead, we make the grob transparent.
722 BarLine \set #'transparent = ##t
724 StaffSymbol \set #'line-count = #4
725 StaffSymbol \set #'thickness = #0.6
727 % FIXME: unit on StaffSymbol's width should be \linewidth.
728 % StaffSymbol \set #'width = #60.0
730 % Choose vaticana do clef on 3rd line as default.
731 clefGlyph = #"clefs-vaticana_do"
732 centralCPosition = #1
736 % Select vaticana style font.
737 KeySignature \set #'style = #'vaticana
738 Accidental \set #'style = #'vaticana
739 Custos \set #'style = #'vaticana
740 Custos \set #'neutral-position = #3
741 Custos \set #'neutral-direction = #-1
742 Custos \set #'adjust-if-on-staffline = ##t
745 % Score.barAlways = ##t
750 \name "GregorianTranscriptionVoice"
753 % Removing ligature bracket engraver without replacing it by some
754 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
755 % warning for every "\[" and "\]". Therefore, we make the grob
756 % transparent instead.
757 LigatureBracket \set #'transparent = ##t
759 % We can not remove Slur_engraver, since \addlyrics depends on it.
760 % Instead, we make the grob transparent.
761 % Unfortunately, this gives us a lot of warnings ("Degenerate bow:
762 % infinite steepness reqd"), since in ligatures, all note heads are in
763 % the same paper column such that the (transparent) slurs eventually may
764 % start and end in the same column.
765 Slur \override #'transparent = ##t
767 % We can not remove Stem_engraver, since slurs depend on stems. If
768 % we try anyway, lily will crash in slur.scm:16:6: "Wrong type argument
769 % in position 1 (expecting grob): ()".
770 % As a workaround, we make the grob transparent.
771 Stem \set #'transparent = ##t
773 % Since we do not remove stems, but only make it transparent, we have
774 % to set the length to 0.0. Otherwise, articulation marks (such as
775 % ictus, circulus or accentus) may be vertically placed quite away from
777 Stem \set #'length = #'0.0
779 % Put some space before and after divisiones.
780 % FIXME: This does not seem to show any effect.
781 Script \set #'padding = #0.5
783 % There are no beams in Gregorian Chant notation.
786 % Prepare TextSpanner for \episem{Initium|Finis} use.
787 TextSpanner \set #'style = #'line
788 TextSpanner \set #'edge-height = #'(0 . 0)
789 TextSpanner \set #'padding = #0.5
790 TextSpanner \set #'enclose-bounds = #1
791 TextSpanner \set #'edge-text = #'("" . "")
795 \name "GregorianTranscriptionStaff"
798 \accepts "GregorianTranscriptionVoice"
800 % We can not remove Bar_engraver; otherwise clefs and custodes will
801 % not show up any more among other line breaking issues.
802 % Instead, we make the grob transparent.
803 BarLine \set #'transparent = ##t