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 \consists "Dot_column_engraver"
28 % perhaps move to Voice context?
29 \consists "Ottava_spanner_engraver"
30 \consists "Clef_engraver"
31 \consists "Key_engraver"
32 \consists "Time_signature_engraver"
33 \consists "Staff_symbol_engraver"
34 \consists "Collision_engraver"
35 \consists "Rest_collision_engraver"
36 \consists "Accidental_engraver"
37 \consists "Piano_pedal_engraver"
38 \consists "Instrument_name_engraver"
39 \consists "Grob_pq_engraver"
40 \consists "Forbid_line_break_engraver"
41 \consists "String_number_engraver"
42 \consistsend "Axis_group_engraver"
44 minimumVerticalExtent = #'(-6 . 6)
45 extraVerticalExtent = ##f
47 localKeySignature = #'()
49 % explicitly set instrument, so we don't get
50 % weird effects when doing instrument names for
61 \type "Engraver_group_engraver"
65 \remove "Accidental_engraver"
66 \remove "Ottava_spanner_engraver"
67 \remove "Key_engraver"
68 \remove "Piano_pedal_engraver"
69 \remove "String_number_engraver"
71 \description "Handles typesetting for percussion."
76 clefGlyph = #"clefs-percussion"
78 Script \set #'staff-padding = #0.75
83 \type Engraver_group_engraver
84 \consists "Axis_group_engraver"
85 minimumVerticalExtent = ##f
86 extraVerticalExtent = ##f
88 localKeySignature = #'()
95 \type "Engraver_group_engraver"
97 \consists "System_start_delimiter_engraver"
98 systemStartDelimiter = #'SystemStartBracket
99 localKeySignature = #'()
103 \accepts "RhythmicStaff"
104 \accepts "GrandStaff"
105 \accepts "PianoStaff"
106 \accepts "LyricsVoice"
107 \accepts "ChordNames"
111 \InnerChoirStaffContext
114 \description "Identical to @code{StaffGroup} except that the
115 contained staves are not connected vertically."
117 \accepts "InnerChoirStaff"
118 \accepts "InnerStaffGroup"
123 \type "Engraver_group_engraver"
125 \consists "Output_property_engraver"
128 A context like @code{Staff} but for printing rhythms. Pitches are
129 ignored; the notes are printed on one line.
131 minimumVerticalExtent = ##f
132 extraVerticalExtent = ##f
134 localKeySignature = #'()
136 \consists "Pitch_squash_engraver"
137 \consists "Separating_line_group_engraver"
141 BarLine \override #'bar-size = #4
142 VoltaBracket \override #'minimum-space = #15
143 VoltaBracket \override #'padding = #5
144 StaffSymbol \override #'line-count = #1
146 Stem \override #'neutral-direction = #1
147 Beam \override #'neutral-direction = #1
148 % \consists "Repeat_engraver"
149 \consists "Dot_column_engraver"
150 \consists "Volta_engraver"
151 \consists "Bar_engraver"
152 \consists "Time_signature_engraver"
153 \consists "Staff_symbol_engraver"
154 \consists "Instrument_name_engraver"
155 \consistsend "Axis_group_engraver"
161 \type "Engraver_group_engraver"
165 Corresponds to a voice on a staff. This context handles the
166 conversion of dynamic signs, stems, beams, super- and subscripts,
167 slurs, ties, and rests.
169 You have to instantiate this explicitly if you want to have
170 multiple voices on the same staff."
172 localKeySignature = #'()
173 \consists "Font_size_engraver"
175 \consists "Output_property_engraver"
176 \consists "Arpeggio_engraver"
177 \consists "Multi_measure_rest_engraver"
178 \consists "Text_spanner_engraver"
179 \consists "Grob_pq_engraver"
181 \consists "Note_head_line_engraver"
182 \consists "Glissando_engraver"
183 \consists "Ligature_bracket_engraver"
184 \consists "Breathing_sign_engraver"
185 % \consists "Rest_engraver"
186 \consists "Note_heads_engraver"
187 \consists "Rest_engraver"
189 \consists "Stem_engraver"
190 \consists "Beam_engraver"
191 \consists "Grace_beam_engraver"
192 \consists "Auto_beam_engraver"
193 \consists "New_fingering_engraver"
194 \consists "Chord_tremolo_engraver"
195 \consists "Percent_repeat_engraver"
196 \consists "Slash_repeat_engraver"
197 \consists "Melisma_engraver"
198 \consists "Part_combine_engraver"
201 Must come before text_engraver, but after note_column engraver.
204 \consists "Text_engraver"
205 \consists "Dynamic_engraver"
206 \consists "Fingering_engraver"
208 \consists "Script_engraver"
209 \consists "Script_column_engraver"
210 \consists "Rhythmic_column_engraver"
211 \consists "Phrasing_slur_engraver"
212 \consists "Cluster_spanner_engraver"
213 \consists "Slur_engraver"
214 \consists "Tie_engraver"
215 \consists "Tuplet_engraver"
217 \consists "Skip_event_swallow_translator"
225 \description " A voice on a percussion staff."
228 \remove "Arpeggio_engraver"
229 \consists "Multi_measure_rest_engraver"
230 \consists "Text_spanner_engraver"
231 \consists "Grob_pq_engraver"
233 \remove "Note_head_line_engraver"
234 \remove "Glissando_engraver"
235 \remove "Ligature_bracket_engraver"
236 \remove "Note_heads_engraver"
237 \consists "Rest_engraver"
238 \consists "Drum_notes_engraver"
239 \remove "New_fingering_engraver"
241 \remove "Fingering_engraver"
243 \remove "Phrasing_slur_engraver"
244 \remove "Cluster_spanner_engraver"
245 \remove "Slur_engraver"
246 \consists "Tuplet_engraver"
248 \consists "Skip_event_swallow_translator"
252 \type "Engraver_group_engraver"
254 localKeySignature = #'()
256 \description " A group of staffs, with a brace on the left
257 side, grouping the staves together. The bar lines of the
258 contained staves are connected vertically. "
260 \consists "Span_bar_engraver"
261 \consists "Span_arpeggio_engraver"
262 \consists "System_start_delimiter_engraver"
263 systemStartDelimiter = #'SystemStartBrace
274 "Just like @code{GrandStaff} but with a forced distance between
275 the staves, so cross staff beaming and slurring can be used."
277 verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
278 VerticalAlignment \override #'forced-distance = #12
279 VerticalAlignment \override #'self-alignment-Y = #0
281 \consists "Vertical_align_engraver"
282 \consists "Instrument_name_engraver"
289 \type "Engraver_group_engraver"
290 \name InnerStaffGroup
291 localKeySignature = #'()
293 \consists "Span_bar_engraver"
294 \consists "Span_arpeggio_engraver"
295 \consists "Output_property_engraver"
296 systemStartDelimiter = #'SystemStartBracket
298 \consists "System_start_delimiter_engraver"
300 \accepts "RhythmicStaff"
302 \accepts "GrandStaff"
303 \accepts "PianoStaff"
305 \accepts "LyricsVoice"
306 \accepts "ChordNames"
310 \InnerStaffGroupContext
315 "Groups staffs while adding a bracket on the left side, grouping
316 the staves together. The bar lines of the contained staves are
317 connected vertically. "
319 \accepts "InnerChoirStaff"
320 \accepts "ChoirStaff"
321 \accepts "InnerStaffGroup"
322 \accepts "FiguredBass"
327 \type "Engraver_group_engraver"
328 \consistsend "Hara_kiri_engraver"
329 minimumVerticalExtent = #'(-1.2 . 2.4)
330 extraVerticalExtent = ##f
333 \description " Corresponds to a voice with lyrics. Handles the
334 printing of a single line of lyrics. "
337 \consists "Separating_line_group_engraver"
338 \consists "Lyric_engraver"
339 \consists "Extender_engraver"
340 \consists "Hyphen_engraver"
341 \consists "Stanza_number_engraver"
342 \consists "Vocal_name_engraver"
343 \consists "Skip_event_swallow_translator"
344 SeparationItem \set #'padding = #0.2
348 \type "Engraver_group_engraver"
350 \consistsend "Axis_group_engraver"
352 minimumVerticalExtent = ##f
353 extraVerticalExtent = ##f
357 \consists "Rest_swallow_translator"
358 \consists "Skip_event_swallow_translator"
359 \consists "Tie_engraver"
360 \consists "Note_swallow_translator"
361 \consists "Note_name_engraver"
362 \consists "Separating_line_group_engraver"
366 \type "Engraver_group_engraver"
368 \description "Typesets chord names."
370 \consists "Rest_swallow_translator"
371 \consists "Output_property_engraver"
372 \consists "Separating_line_group_engraver"
373 \consists "Chord_name_engraver"
374 \consists "Skip_event_swallow_translator"
375 \consistsend "Hara_kiri_engraver"
377 minimumVerticalExtent = #'(0 . 2.5)
378 extraVerticalExtent = ##f
379 SeparatingGroupSpanner \override #'padding = #0.8
384 RemoveEmptyStaffContext= \translator {
386 \remove "Axis_group_engraver"
387 \consistsend "Hara_kiri_engraver"
388 Beam \override #'auto-knee-gap = #'()
391 AncientRemoveEmptyStaffContext = \translator {
392 %% why not add by default?
394 \RemoveEmptyStaffContext
395 \accepts "VaticanaVoice"
396 \accepts "GregorianTranscriptionVoice"
402 localKeySignature = #'()
404 \description "This is the top level notation context. No
405 other context can contain a @code{Score} context. This context
406 handles the administration of time signatures. It also makes sure
407 that items such as clefs, time signatures, and key-signatures are
408 aligned across staves.
410 You cannot explicitly instantiate a Score context (since it is
411 not contained in any other context). It is instantiated
412 automatically when an output definition (a @code{\score} or
413 @code{\paper} block) is processed."
415 \consists "Repeat_acknowledge_engraver"
416 \consists "Staff_collecting_engraver"
418 % move the alias along with the engraver.
420 %% TODO? add this alias from Timing_engraver::initialize() ?
421 \consists "Timing_engraver"
424 \consists "Output_property_engraver"
425 \consists "System_start_delimiter_engraver"
426 \consists "Mark_engraver"
427 \consists "Metronome_mark_engraver"
428 \consists "Break_align_engraver"
429 \consists "Spacing_engraver"
430 \consists "Vertical_align_engraver"
431 \consists "Lyric_phrasing_engraver"
432 \consists "Bar_number_engraver"
433 \consists "Span_arpeggio_engraver"
437 \accepts "VaticanaStaff"
438 \accepts "GregorianTranscriptionStaff"
439 \accepts "StaffContainer"
440 \accepts "StaffGroup"
441 \accepts "RhythmicStaff"
443 \accepts "LyricsVoice"
444 \accepts "ChordNames"
445 \accepts "GrandStaff"
446 \accepts "ChoirStaff"
447 \accepts "PianoStaff"
450 \accepts "FiguredBass"
453 soloIIText = #"Solo II"
456 systemStartDelimiter =#'SystemStartBar
458 drumStyleTable = #drums-style
460 melismaBusyProperties = #default-melisma-properties
462 clefGlyph = #"clefs-G"
464 centralCPosition = #-6
466 defaultBarType = #"|"
467 barNumberVisibility = #default-bar-number-visibility
470 explicitClefVisibility = #all-visible
471 explicitKeySignatureVisibility = #all-visible
472 autoBeamSettings = #(cons default-auto-beam-settings '())
474 scriptDefinitions = #default-script-alist
476 verticalAlignmentChildCallback = #Align_interface::alignment_callback
478 pedalSustainStrings = #'("Ped." "*Ped." "*")
479 pedalSustainStyle = #'text
480 pedalUnaCordaStrings = #'("una corda" "" "tre corde")
481 pedalUnaCordaStyle = #'text
483 %% These are in ordinary italic font, including the *,
484 %% but they are unlikely to be used,
485 %% as the default pedal-style for SostenutoPedal is 'mixed':
486 %% i.e. Sost. Ped_____________________
487 pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
488 pedalSostenutoStyle = #'mixed
490 fingeringOrientations = #'(up down)
491 tupletNumberFormatFunction = #denominator-tuplet-formatter
492 markFormatter = #format-mark-letters
497 autoAccidentals = #'(Staff (same-octave . 0))
498 autoCautionaries = #'()
500 keyAccidentalOrder = #`(
501 (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
502 (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
503 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
504 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
506 breakAlignOrder = #'(
518 barCheckSynchronize = ##f
521 chordNameFunction = #ignatzek-chord-names
522 majorSevenSymbol = #whiteTriangleMarkup
523 chordNameSeparator = #(make-simple-markup "/")
524 chordNameExceptions = #ignatzekExceptions
525 chordNoteNamer = #'()
526 chordRootNamer = #note-name->markup
527 chordNameExceptionsFull = #fullJazzExceptions
528 chordNameExceptionsPartial = #partialJazzExceptions
531 stringOneTopmost = ##t
534 %% One may change the strings tuning as following :
535 %% The lenght of the list must be equal to the number of string
536 stringTunings = #guitar-tunings
537 tablatureFormat = #fret-number-tablature-format
540 bassFigureFormatFunction = #make-bass-figure-markup
541 metronomeMarkFormatter = #format-metronome-markup
543 (Voice Stem direction 1)
545 ;; TODO: should take from existing definition.
546 ;; c&p from define-grobs.scm
548 (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
549 (Voice Stem stem-shorten (0.4 0))
550 (Voice Stem font-size -3)
551 (Voice NoteHead font-size -3)
552 (Voice Dots font-size -3)
553 (Voice Stem beamed-lengths
554 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
555 (Voice Stem beamed-minimum-free-lengths
556 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
557 (Voice Stem beamed-extreme-minimum-free-lengths
558 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
560 (Voice Stem no-stem-extend #t)
561 (Voice Beam thickness 0.384)
562 (Voice Beam space-function ,(lambda (beam mult)
563 (* 0.8 (Beam::space_function
565 (Voice Beam position-callbacks (,Beam::least_squares
567 ,Beam::slope_damping))
568 (Staff Accidental font-size -4)
569 (Voice Slur direction -1)
572 \grobdescriptions #all-grob-descriptions
575 OrchestralScoreContext = \translator {
579 EasyNotation = \translator {
581 NoteHead \override #'print-function = #Note_head::brew_ez_molecule
582 NoteHead \override #'Y-extent-callback = #'()
583 NoteHead \override #'X-extent-callback = #'()
589 \type "Engraver_group_engraver"
591 \consists "Figured_bass_engraver"
592 \consists "Rest_swallow_translator"
593 \consists "Note_swallow_translator"
594 \consists "Separating_line_group_engraver"
596 \consistsend "Hara_kiri_engraver"
601 \type "Engraver_group_engraver"
603 %% don't want to route anything out of here:
607 \consists "Swallow_engraver"
608 \description "Silently discards all musical information given to this context. "
614 \consists "Tab_note_heads_engraver"
615 \remove "Note_heads_engraver"
616 \remove "Fingering_engraver"
617 \remove "New_fingering_engraver"
619 \description "Context for drawing notes in a Tab staff. "
620 Slur \override #'font-family = #'roman
621 Slur \override #'print-function = #hammer-print-function
622 Slur \override #'direction = #-1
624 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
625 % This feature is now disabled because most of the tab does not use it.
626 %Beam \override #'damping = #100000
627 %Stem \override #'up-to-staff = ##t
629 % No accidental in tablature !
630 \remove Accidental_engraver
639 \description "Context for generating tablature. [DOCME]"
642 TODO: this context should use a special staff_symbol engraver that
643 takes the line count out of the stringTunings property.
651 StaffSymbol \override #'line-count = #6
652 StaffSymbol \override #'staff-space = #1.5
654 % Don't draw stems over the tablature figures !
655 Stem \override #'avoid-note-head = ##t
657 % No accidental in tablature !
658 \remove "Accidental_engraver"
659 \remove "Key_engraver"
660 \remove "String_number_engraver"
662 clefGlyph = #"clefs-tab"
666 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
667 % but this does not work (is this a bug or intended behaviour?):
669 % If I try to do so, I get "error: unknown escaped string:
670 % `\VaticanaStaffContext'" in params-init.ly. If I also move
671 % "\translator { \Vaticana*Context }" from params-init.ly to the end
672 % of gregorian-init.ly, then I get "error: parse error, unexpected
673 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
674 % gregorian-init.ly. --jr
678 \name "VaticanaVoice"
680 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
682 \remove "Slur_engraver"
683 \remove "Stem_engraver"
684 \remove "Ligature_bracket_engraver"
685 \consists "Vaticana_ligature_engraver"
687 % Set default head for notes outside of \[ \].
688 NoteHead \set #'style = #'vaticana_punctum
690 % Put some space before and after divisiones.
691 % FIXME: This does not seem to show any effect.
692 Script \set #'padding = #0.5
694 % There are no beams in Gregorian Chant notation.
697 % Prepare TextSpanner for \episem{Initium|Finis} use.
698 TextSpanner \set #'style = #'line
699 TextSpanner \set #'edge-height = #'(0 . 0)
700 TextSpanner \set #'padding = #0.5
701 TextSpanner \set #'enclose-bounds = #1
702 TextSpanner \set #'edge-text = #'("" . "")
707 \name "VaticanaStaff"
710 \accepts "VaticanaVoice"
711 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
713 \remove "Time_signature_engraver"
714 \consists "Custos_engraver"
716 % We can not remove Bar_engraver; otherwise clefs and custodes will
717 % not show up any more among other line breaking issues.
718 % Instead, we make the grob transparent.
719 BarLine \set #'transparent = ##t
721 StaffSymbol \set #'line-count = #4
722 StaffSymbol \set #'thickness = #0.6
724 % FIXME: unit on StaffSymbol's width should be \linewidth.
725 % StaffSymbol \set #'width = #60.0
727 % Choose vaticana do clef on 3rd line as default.
728 clefGlyph = #"clefs-vaticana_do"
729 centralCPosition = #1
733 % Select vaticana style font.
734 KeySignature \set #'style = #'vaticana
735 Accidental \set #'style = #'vaticana
736 Custos \set #'style = #'vaticana
737 Custos \set #'neutral-position = #3
738 Custos \set #'neutral-direction = #-1
739 Custos \set #'adjust-if-on-staffline = ##t
742 % Score.barAlways = ##t
747 \name "GregorianTranscriptionVoice"
750 % Removing ligature bracket engraver without replacing it by some
751 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
752 % warning for every "\[" and "\]". Therefore, we make the grob
753 % transparent instead.
754 LigatureBracket \set #'transparent = ##t
756 % Put some space before and after divisiones.
757 % FIXME: This does not seem to show any effect.
758 Script \set #'padding = #0.5
760 % There are no beams in Gregorian Chant notation.
763 % Prepare TextSpanner for \episem{Initium|Finis} use.
764 TextSpanner \set #'style = #'line
765 TextSpanner \set #'edge-height = #'(0 . 0)
766 TextSpanner \set #'padding = #0.5
767 TextSpanner \set #'enclose-bounds = #1
768 TextSpanner \set #'edge-text = #'("" . "")
772 \name "GregorianTranscriptionStaff"
775 \accepts "GregorianTranscriptionVoice"
777 % We can not remove Bar_engraver; otherwise clefs and custodes will
778 % not show up any more among other line breaking issues.
779 % Instead, we make the grob transparent.
780 BarLine \set #'transparent = ##t