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"
85 \consists "System_start_delimiter_engraver"
86 systemStartDelimiter = #'SystemStartBracket
87 localKeySignature = #'()
91 \accepts "RhythmicStaff"
99 \InnerChoirStaffContext
102 \description "Identical to @code{StaffGroup} except that the
103 contained staves are not connected vertically."
105 \accepts "InnerChoirStaff"
106 \accepts "InnerStaffGroup"
111 \type "Engraver_group_engraver"
113 \consists "Output_property_engraver"
116 A context like @code{Staff} but for printing rhythms. Pitches are
117 ignored; the notes are printed on one line.
119 minimumVerticalExtent = ##f
120 extraVerticalExtent = ##f
122 localKeySignature = #'()
124 \consists "Pitch_squash_engraver"
125 \consists "Separating_line_group_engraver"
129 BarLine \override #'bar-size = #4
130 VoltaBracket \override #'minimum-space = #15
131 VoltaBracket \override #'padding = #5
132 StaffSymbol \override #'line-count = #1
134 Stem \override #'neutral-direction = #1
135 Beam \override #'neutral-direction = #1
136 % \consists "Repeat_engraver"
137 \consists "Dot_column_engraver"
138 \consists "Volta_engraver"
139 \consists "Bar_engraver"
140 \consists "Time_signature_engraver"
141 \consists "Staff_symbol_engraver"
142 \consists "Instrument_name_engraver"
143 \consistsend "Axis_group_engraver"
149 \type "Engraver_group_engraver"
153 Corresponds to a voice on a staff. This context handles the
154 conversion of dynamic signs, stems, beams, super- and subscripts,
155 slurs, ties, and rests.
157 You have to instantiate this explicitly if you want to have
158 multiple voices on the same staff."
160 localKeySignature = #'()
161 \consists "Font_size_engraver"
163 \consists "Output_property_engraver"
164 \consists "Arpeggio_engraver"
165 \consists "Multi_measure_rest_engraver"
166 \consists "Text_spanner_engraver"
167 \consists "Grob_pq_engraver"
169 \consists "Note_head_line_engraver"
170 \consists "Glissando_engraver"
171 \consists "Ligature_bracket_engraver"
172 \consists "Breathing_sign_engraver"
173 % \consists "Rest_engraver"
174 \consists "Note_heads_engraver"
175 \consists "Rest_engraver"
177 \consists "Stem_engraver"
178 \consists "Beam_engraver"
179 \consists "Grace_beam_engraver"
180 \consists "Auto_beam_engraver"
181 \consists "New_fingering_engraver"
182 \consists "Chord_tremolo_engraver"
183 \consists "Percent_repeat_engraver"
184 \consists "Slash_repeat_engraver"
185 \consists "Melisma_engraver"
186 \consists "Part_combine_engraver"
189 Must come before text_engraver, but after note_column engraver.
192 \consists "Text_engraver"
193 \consists "Dynamic_engraver"
194 \consists "Fingering_engraver"
196 \consists "Script_engraver"
197 \consists "Script_column_engraver"
198 \consists "Rhythmic_column_engraver"
199 \consists "Phrasing_slur_engraver"
200 \consists "Cluster_spanner_engraver"
201 \consists "Slur_engraver"
202 \consists "Tie_engraver"
203 \consists "Tuplet_engraver"
205 \consists "Skip_event_swallow_translator"
213 \description " A voice on a percussion staff."
216 \remove "Arpeggio_engraver"
217 \consists "Multi_measure_rest_engraver"
218 \consists "Text_spanner_engraver"
219 \consists "Grob_pq_engraver"
221 \remove "Note_head_line_engraver"
222 \remove "Glissando_engraver"
223 \remove "Ligature_bracket_engraver"
224 \remove "Note_heads_engraver"
225 \consists "Rest_engraver"
226 \consists "Drum_notes_engraver"
227 \remove "New_fingering_engraver"
229 \remove "Fingering_engraver"
231 \remove "Phrasing_slur_engraver"
232 \remove "Cluster_spanner_engraver"
233 \remove "Slur_engraver"
234 \consists "Tuplet_engraver"
236 \consists "Skip_event_swallow_translator"
240 \type "Engraver_group_engraver"
242 localKeySignature = #'()
244 \description " A group of staffs, with a brace on the left
245 side, grouping the staves together. The bar lines of the
246 contained staves are connected vertically. "
248 \consists "Span_bar_engraver"
249 \consists "Span_arpeggio_engraver"
250 \consists "System_start_delimiter_engraver"
251 systemStartDelimiter = #'SystemStartBrace
262 "Just like @code{GrandStaff} but with a forced distance between
263 the staves, so cross staff beaming and slurring can be used."
265 verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
266 VerticalAlignment \override #'forced-distance = #12
267 VerticalAlignment \override #'self-alignment-Y = #0
269 \consists "Vertical_align_engraver"
270 \consists "Instrument_name_engraver"
277 \type "Engraver_group_engraver"
278 \name InnerStaffGroup
279 localKeySignature = #'()
281 \consists "Span_bar_engraver"
282 \consists "Span_arpeggio_engraver"
283 \consists "Output_property_engraver"
284 systemStartDelimiter = #'SystemStartBracket
286 \consists "System_start_delimiter_engraver"
288 \accepts "RhythmicStaff"
290 \accepts "GrandStaff"
291 \accepts "PianoStaff"
294 \accepts "ChordNames"
298 \InnerStaffGroupContext
303 "Groups staffs while adding a bracket on the left side, grouping
304 the staves together. The bar lines of the contained staves are
305 connected vertically. "
307 \accepts "InnerChoirStaff"
308 \accepts "ChoirStaff"
309 \accepts "InnerStaffGroup"
310 \accepts "FiguredBass"
315 \type "Engraver_group_engraver"
316 \consistsend "Hara_kiri_engraver"
317 minimumVerticalExtent = #'(-1.2 . 2.4)
318 extraVerticalExtent = ##f
321 \description " Corresponds to a voice with lyrics. Handles the
322 printing of a single line of lyrics. "
325 \consists "Separating_line_group_engraver"
326 \consists "Lyric_engraver"
327 \consists "Extender_engraver"
328 \consists "Hyphen_engraver"
329 \consists "Stanza_number_engraver"
330 \consists "Vocal_name_engraver"
331 \consists "Skip_event_swallow_translator"
332 SeparationItem \set #'padding = #0.2
336 \type "Engraver_group_engraver"
338 \consistsend "Axis_group_engraver"
340 minimumVerticalExtent = ##f
341 extraVerticalExtent = ##f
345 \consists "Rest_swallow_translator"
346 \consists "Skip_event_swallow_translator"
347 \consists "Tie_engraver"
348 \consists "Note_swallow_translator"
349 \consists "Note_name_engraver"
350 \consists "Separating_line_group_engraver"
354 \type "Engraver_group_engraver"
356 \description "Typesets chord names."
358 \consists "Rest_swallow_translator"
359 \consists "Output_property_engraver"
360 \consists "Separating_line_group_engraver"
361 \consists "Chord_name_engraver"
362 \consists "Skip_event_swallow_translator"
363 \consistsend "Hara_kiri_engraver"
365 minimumVerticalExtent = #'(0 . 2.5)
366 extraVerticalExtent = ##f
367 SeparatingGroupSpanner \override #'padding = #0.8
372 RemoveEmptyStaffContext= \translator {
374 \remove "Axis_group_engraver"
375 \consistsend "Hara_kiri_engraver"
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 "StaffGroup"
428 \accepts "RhythmicStaff"
431 \accepts "ChordNames"
432 \accepts "GrandStaff"
433 \accepts "ChoirStaff"
434 \accepts "PianoStaff"
437 \accepts "FiguredBass"
440 soloIIText = #"Solo II"
443 systemStartDelimiter =#'SystemStartBar
445 drumStyleTable = #drums-style
447 melismaBusyProperties = #default-melisma-properties
449 clefGlyph = #"clefs-G"
451 centralCPosition = #-6
453 defaultBarType = #"|"
454 barNumberVisibility = #default-bar-number-visibility
457 explicitClefVisibility = #all-visible
458 explicitKeySignatureVisibility = #all-visible
459 autoBeamSettings = #(cons default-auto-beam-settings '())
461 scriptDefinitions = #default-script-alist
463 verticalAlignmentChildCallback = #Align_interface::alignment_callback
465 pedalSustainStrings = #'("Ped." "*Ped." "*")
466 pedalSustainStyle = #'text
467 pedalUnaCordaStrings = #'("una corda" "" "tre corde")
468 pedalUnaCordaStyle = #'text
470 %% These are in ordinary italic font, including the *,
471 %% but they are unlikely to be used,
472 %% as the default pedal-style for SostenutoPedal is 'mixed':
473 %% i.e. Sost. Ped_____________________
474 pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
475 pedalSostenutoStyle = #'mixed
477 fingeringOrientations = #'(up down)
478 tupletNumberFormatFunction = #denominator-tuplet-formatter
479 markFormatter = #format-mark-letters
484 autoAccidentals = #'(Staff (same-octave . 0))
485 autoCautionaries = #'()
487 keyAccidentalOrder = #`(
488 (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
489 (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
490 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
491 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
493 breakAlignOrder = #'(
505 barCheckSynchronize = ##f
508 chordNameFunction = #ignatzek-chord-names
509 majorSevenSymbol = #whiteTriangleMarkup
510 chordNameSeparator = #(make-simple-markup "/")
511 chordNameExceptions = #ignatzekExceptions
512 chordNoteNamer = #'()
513 chordRootNamer = #note-name->markup
514 chordNameExceptionsFull = #fullJazzExceptions
515 chordNameExceptionsPartial = #partialJazzExceptions
518 stringOneTopmost = ##t
521 %% One may change the strings tuning as following :
522 %% The lenght of the list must be equal to the number of string
523 stringTunings = #guitar-tunings
524 tablatureFormat = #fret-number-tablature-format
527 bassFigureFormatFunction = #make-bass-figure-markup
528 metronomeMarkFormatter = #format-metronome-markup
530 (Voice Stem direction 1)
532 ;; TODO: should take from existing definition.
533 ;; c&p from define-grobs.scm
535 (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
536 (Voice Stem stem-shorten (0.4 0))
537 (Voice Stem font-size -3)
538 (Voice NoteHead font-size -3)
539 (Voice Dots font-size -3)
540 (Voice Stem beamed-lengths
541 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
542 (Voice Stem beamed-minimum-free-lengths
543 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
544 (Voice Stem beamed-extreme-minimum-free-lengths
545 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
547 (Voice Stem no-stem-extend #t)
548 (Voice Beam thickness 0.384)
549 (Voice Beam space-function ,(lambda (beam mult)
550 (* 0.8 (Beam::space_function
552 (Voice Beam position-callbacks (,Beam::least_squares
554 ,Beam::slope_damping))
555 (Staff Accidental font-size -4)
556 (Voice Slur direction -1)
559 \grobdescriptions #all-grob-descriptions
562 OrchestralScoreContext = \translator {
566 EasyNotation = \translator {
568 NoteHead \override #'print-function = #Note_head::brew_ez_stencil
569 NoteHead \override #'Y-extent-callback = #'()
570 NoteHead \override #'X-extent-callback = #'()
576 \type "Engraver_group_engraver"
578 \consists "Figured_bass_engraver"
579 \consists "Rest_swallow_translator"
580 \consists "Note_swallow_translator"
581 \consists "Separating_line_group_engraver"
583 \consistsend "Hara_kiri_engraver"
588 \type "Engraver_group_engraver"
590 %% don't want to route anything out of here:
594 \consists "Swallow_engraver"
595 \description "Silently discards all musical information given to this context. "
601 \consists "Tab_note_heads_engraver"
602 \remove "Note_heads_engraver"
603 \remove "Fingering_engraver"
604 \remove "New_fingering_engraver"
606 \description "Context for drawing notes in a Tab staff. "
607 Slur \override #'font-family = #'roman
608 Slur \override #'print-function = #hammer-print-function
609 Slur \override #'direction = #-1
611 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
612 % This feature is now disabled because most of the tab does not use it.
613 %Beam \override #'damping = #100000
614 %Stem \override #'up-to-staff = ##t
616 % No accidental in tablature !
617 \remove Accidental_engraver
626 \description "Context for generating tablature. [DOCME]"
629 TODO: this context should use a special staff_symbol engraver that
630 takes the line count out of the stringTunings property.
638 StaffSymbol \override #'line-count = #6
639 StaffSymbol \override #'staff-space = #1.5
641 % Don't draw stems over the tablature figures !
642 Stem \override #'avoid-note-head = ##t
644 % No accidental in tablature !
645 \remove "Accidental_engraver"
646 \remove "Key_engraver"
647 \remove "String_number_engraver"
649 clefGlyph = #"clefs-tab"
653 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
654 % but this does not work (is this a bug or intended behaviour?):
656 % If I try to do so, I get "error: unknown escaped string:
657 % `\VaticanaStaffContext'" in params-init.ly. If I also move
658 % "\translator { \Vaticana*Context }" from params-init.ly to the end
659 % of gregorian-init.ly, then I get "error: parse error, unexpected
660 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
661 % gregorian-init.ly. --jr
665 \name "VaticanaVoice"
667 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
669 \remove "Slur_engraver"
670 \remove "Stem_engraver"
671 \remove "Ligature_bracket_engraver"
672 \consists "Vaticana_ligature_engraver"
674 % Set default head for notes outside of \[ \].
675 NoteHead \set #'style = #'vaticana_punctum
677 % Put some space before and after divisiones.
678 % FIXME: This does not seem to show any effect.
679 Script \set #'padding = #0.5
681 % There are no beams in Gregorian Chant notation.
684 % Prepare TextSpanner for \episem{Initium|Finis} use.
685 TextSpanner \set #'style = #'line
686 TextSpanner \set #'edge-height = #'(0 . 0)
687 TextSpanner \set #'padding = #0.5
688 TextSpanner \set #'enclose-bounds = #1
689 TextSpanner \set #'edge-text = #'("" . "")
694 \name "VaticanaStaff"
697 \accepts "VaticanaVoice"
698 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
700 \remove "Time_signature_engraver"
701 \consists "Custos_engraver"
703 % We can not remove Bar_engraver; otherwise clefs and custodes will
704 % not show up any more among other line breaking issues.
705 % Instead, we make the grob transparent.
706 BarLine \set #'transparent = ##t
708 StaffSymbol \set #'line-count = #4
709 StaffSymbol \set #'thickness = #0.6
711 % FIXME: unit on StaffSymbol's width should be \linewidth.
712 % StaffSymbol \set #'width = #60.0
714 % Choose vaticana do clef on 3rd line as default.
715 clefGlyph = #"clefs-vaticana_do"
716 centralCPosition = #1
720 % Select vaticana style font.
721 KeySignature \set #'style = #'vaticana
722 Accidental \set #'style = #'vaticana
723 Custos \set #'style = #'vaticana
724 Custos \set #'neutral-position = #3
725 Custos \set #'neutral-direction = #-1
726 Custos \set #'adjust-if-on-staffline = ##t
729 % Score.barAlways = ##t
734 \name "GregorianTranscriptionVoice"
737 % Removing ligature bracket engraver without replacing it by some
738 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
739 % warning for every "\[" and "\]". Therefore, we make the grob
740 % transparent instead.
741 LigatureBracket \set #'transparent = ##t
743 % Put some space before and after divisiones.
744 % FIXME: This does not seem to show any effect.
745 Script \set #'padding = #0.5
747 % There are no beams in Gregorian Chant notation.
750 % Prepare TextSpanner for \episem{Initium|Finis} use.
751 TextSpanner \set #'style = #'line
752 TextSpanner \set #'edge-height = #'(0 . 0)
753 TextSpanner \set #'padding = #0.5
754 TextSpanner \set #'enclose-bounds = #1
755 TextSpanner \set #'edge-text = #'("" . "")
759 \name "GregorianTranscriptionStaff"
762 \accepts "GregorianTranscriptionVoice"
764 % We can not remove Bar_engraver; otherwise clefs and custodes will
765 % not show up any more among other line breaking issues.
766 % Instead, we make the grob transparent.
767 BarLine \set #'transparent = ##t