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"
67 \remove "Accidental_engraver"
68 \remove "Ottava_spanner_engraver"
69 \remove "Key_engraver"
70 \remove "Piano_pedal_engraver"
71 \remove "String_number_engraver"
73 \description "Handles typesetting for percussion."
78 clefGlyph = #"clefs-percussion"
80 Script \set #'staff-padding = #0.75
85 \type Engraver_group_engraver
86 \consists "Axis_group_engraver"
87 minimumVerticalExtent = ##f
88 extraVerticalExtent = ##f
90 localKeySignature = #'()
97 \type "Engraver_group_engraver"
99 \consists "System_start_delimiter_engraver"
100 systemStartDelimiter = #'SystemStartBracket
101 localKeySignature = #'()
105 \accepts "RhythmicStaff"
106 \accepts "GrandStaff"
107 \accepts "PianoStaff"
108 \accepts "LyricsVoice"
109 \accepts "ChordNames"
113 \InnerChoirStaffContext
116 \description "Identical to @code{StaffGroup} except that the
117 contained staves are not connected vertically."
119 \accepts "InnerChoirStaff"
120 \accepts "InnerStaffGroup"
125 \type "Engraver_group_engraver"
127 \consists "Output_property_engraver"
130 A context like @code{Staff} but for printing rhythms. Pitches are
131 ignored; the notes are printed on one line.
133 minimumVerticalExtent = ##f
134 extraVerticalExtent = ##f
136 localKeySignature = #'()
138 \consists "Pitch_squash_engraver"
139 \consists "Separating_line_group_engraver"
143 BarLine \override #'bar-size = #4
144 VoltaBracket \override #'minimum-space = #15
145 VoltaBracket \override #'padding = #5
146 StaffSymbol \override #'line-count = #1
148 Stem \override #'neutral-direction = #1
149 Beam \override #'neutral-direction = #1
150 % \consists "Repeat_engraver"
151 \consists "Dot_column_engraver"
152 \consists "Volta_engraver"
153 \consists "Bar_engraver"
154 \consists "Time_signature_engraver"
155 \consists "Staff_symbol_engraver"
156 \consists "Instrument_name_engraver"
157 \consistsend "Axis_group_engraver"
163 \type "Engraver_group_engraver"
167 Corresponds to a voice on a staff. This context handles the
168 conversion of dynamic signs, stems, beams, super- and subscripts,
169 slurs, ties, and rests.
171 You have to instantiate this explicitly if you want to have
172 multiple voices on the same staff."
174 localKeySignature = #'()
175 \consists "Font_size_engraver"
177 \consists "Output_property_engraver"
178 \consists "Arpeggio_engraver"
179 \consists "Multi_measure_rest_engraver"
180 \consists "Text_spanner_engraver"
181 \consists "Grob_pq_engraver"
183 \consists "Note_head_line_engraver"
184 \consists "Glissando_engraver"
185 \consists "Ligature_bracket_engraver"
186 \consists "Breathing_sign_engraver"
187 % \consists "Rest_engraver"
188 \consists "Note_heads_engraver"
189 \consists "Rest_engraver"
191 \consists "Stem_engraver"
192 \consists "Beam_engraver"
193 \consists "Grace_beam_engraver"
194 \consists "Auto_beam_engraver"
195 \consists "New_fingering_engraver"
196 \consists "Chord_tremolo_engraver"
197 \consists "Percent_repeat_engraver"
198 \consists "Slash_repeat_engraver"
199 \consists "Melisma_engraver"
200 \consists "Part_combine_engraver"
203 Must come before text_engraver, but after note_column engraver.
206 \consists "Text_engraver"
207 \consists "Dynamic_engraver"
208 \consists "Fingering_engraver"
210 \consists "Script_engraver"
211 \consists "Script_column_engraver"
212 \consists "Rhythmic_column_engraver"
213 \consists "Phrasing_slur_engraver"
214 \consists "Cluster_spanner_engraver"
215 \consists "Slur_engraver"
216 \consists "Tie_engraver"
217 \consists "Tuplet_engraver"
219 \consists "Skip_event_swallow_translator"
227 \description " A voice on a percussion staff."
230 \remove "Arpeggio_engraver"
231 \consists "Multi_measure_rest_engraver"
232 \consists "Text_spanner_engraver"
233 \consists "Grob_pq_engraver"
235 \remove "Note_head_line_engraver"
236 \remove "Glissando_engraver"
237 \remove "Ligature_bracket_engraver"
238 \remove "Note_heads_engraver"
239 \consists "Rest_engraver"
240 \consists "Drum_notes_engraver"
241 \remove "New_fingering_engraver"
243 \remove "Fingering_engraver"
245 \remove "Phrasing_slur_engraver"
246 \remove "Cluster_spanner_engraver"
247 \remove "Slur_engraver"
248 \consists "Tuplet_engraver"
250 \consists "Skip_event_swallow_translator"
254 \type "Engraver_group_engraver"
256 localKeySignature = #'()
258 \description " A group of staffs, with a brace on the left
259 side, grouping the staves together. The bar lines of the
260 contained staves are connected vertically. "
262 \consists "Span_bar_engraver"
263 \consists "Span_arpeggio_engraver"
264 \consists "System_start_delimiter_engraver"
265 systemStartDelimiter = #'SystemStartBrace
276 "Just like @code{GrandStaff} but with a forced distance between
277 the staves, so cross staff beaming and slurring can be used."
279 verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback
280 VerticalAlignment \override #'forced-distance = #12
281 VerticalAlignment \override #'self-alignment-Y = #0
283 \consists "Vertical_align_engraver"
284 \consists "Instrument_name_engraver"
291 \type "Engraver_group_engraver"
292 \name InnerStaffGroup
293 localKeySignature = #'()
295 \consists "Span_bar_engraver"
296 \consists "Span_arpeggio_engraver"
297 \consists "Output_property_engraver"
298 systemStartDelimiter = #'SystemStartBracket
300 \consists "System_start_delimiter_engraver"
302 \accepts "RhythmicStaff"
304 \accepts "GrandStaff"
305 \accepts "PianoStaff"
307 \accepts "LyricsVoice"
308 \accepts "ChordNames"
312 \InnerStaffGroupContext
317 "Groups staffs while adding a bracket on the left side, grouping
318 the staves together. The bar lines of the contained staves are
319 connected vertically. "
321 \accepts "InnerChoirStaff"
322 \accepts "ChoirStaff"
323 \accepts "InnerStaffGroup"
324 \accepts "FiguredBass"
329 \type "Engraver_group_engraver"
330 \consistsend "Hara_kiri_engraver"
331 minimumVerticalExtent = #'(-1.2 . 2.4)
332 extraVerticalExtent = ##f
335 \description " Corresponds to a voice with lyrics. Handles the
336 printing of a single line of lyrics. "
339 \consists "Separating_line_group_engraver"
340 \consists "Lyric_engraver"
341 \consists "Extender_engraver"
342 \consists "Hyphen_engraver"
343 \consists "Stanza_number_engraver"
344 \consists "Vocal_name_engraver"
345 \consists "Skip_event_swallow_translator"
346 SeparationItem \set #'padding = #0.2
350 \type "Engraver_group_engraver"
352 \consistsend "Axis_group_engraver"
354 minimumVerticalExtent = ##f
355 extraVerticalExtent = ##f
359 \consists "Rest_swallow_translator"
360 \consists "Skip_event_swallow_translator"
361 \consists "Tie_engraver"
362 \consists "Note_swallow_translator"
363 \consists "Note_name_engraver"
364 \consists "Separating_line_group_engraver"
368 \type "Engraver_group_engraver"
370 \description "Typesets chord names."
372 \consists "Rest_swallow_translator"
373 \consists "Output_property_engraver"
374 \consists "Separating_line_group_engraver"
375 \consists "Chord_name_engraver"
376 \consists "Skip_event_swallow_translator"
377 \consistsend "Hara_kiri_engraver"
379 minimumVerticalExtent = #'(0 . 2.5)
380 extraVerticalExtent = ##f
381 SeparatingGroupSpanner \override #'padding = #0.8
386 RemoveEmptyStaffContext= \translator {
388 \remove "Axis_group_engraver"
389 \consistsend "Hara_kiri_engraver"
390 Beam \override #'auto-knee-gap = #'()
393 AncientRemoveEmptyStaffContext = \translator {
394 %% why not add by default?
396 \RemoveEmptyStaffContext
397 \accepts "VaticanaVoice"
398 \accepts "GregorianTranscriptionVoice"
404 localKeySignature = #'()
406 \description "This is the top level notation context. No
407 other context can contain a @code{Score} context. This context
408 handles the administration of time signatures. It also makes sure
409 that items such as clefs, time signatures, and key-signatures are
410 aligned across staves.
412 You cannot explicitly instantiate a Score context (since it is
413 not contained in any other context). It is instantiated
414 automatically when an output definition (a @code{\score} or
415 @code{\paper} block) is processed."
417 \consists "Repeat_acknowledge_engraver"
418 \consists "Staff_collecting_engraver"
420 % move the alias along with the engraver.
422 %% TODO? add this alias from Timing_engraver::initialize() ?
423 \consists "Timing_engraver"
426 \consists "Output_property_engraver"
427 \consists "System_start_delimiter_engraver"
428 \consists "Mark_engraver"
429 \consists "Metronome_mark_engraver"
430 \consists "Break_align_engraver"
431 \consists "Spacing_engraver"
432 \consists "Vertical_align_engraver"
433 \consists "Lyric_phrasing_engraver"
434 \consists "Bar_number_engraver"
435 \consists "Span_arpeggio_engraver"
439 \accepts "VaticanaStaff"
440 \accepts "GregorianTranscriptionStaff"
441 \accepts "StaffContainer"
442 \accepts "StaffGroup"
443 \accepts "RhythmicStaff"
445 \accepts "LyricsVoice"
446 \accepts "ChordNames"
447 \accepts "GrandStaff"
448 \accepts "ChoirStaff"
449 \accepts "PianoStaff"
452 \accepts "FiguredBass"
455 soloIIText = #"Solo II"
458 systemStartDelimiter =#'SystemStartBar
460 drumStyleTable = #drums-style
462 melismaBusyProperties = #default-melisma-properties
464 clefGlyph = #"clefs-G"
466 centralCPosition = #-6
468 defaultBarType = #"|"
469 barNumberVisibility = #default-bar-number-visibility
472 explicitClefVisibility = #all-visible
473 explicitKeySignatureVisibility = #all-visible
474 autoBeamSettings = #default-auto-beam-settings
476 scriptDefinitions = #default-script-alist
478 verticalAlignmentChildCallback = #Align_interface::alignment_callback
480 pedalSustainStrings = #'("Ped." "*Ped." "*")
481 pedalSustainStyle = #'text
482 pedalUnaCordaStrings = #'("una corda" "" "tre corde")
483 pedalUnaCordaStyle = #'text
485 %% These are in ordinary italic font, including the *,
486 %% but they are unlikely to be used,
487 %% as the default pedal-style for SostenutoPedal is 'mixed':
488 %% i.e. Sost. Ped_____________________
489 pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
490 pedalSostenutoStyle = #'mixed
492 fingeringOrientations = #'(up down)
493 tupletNumberFormatFunction = #denominator-tuplet-formatter
494 markFormatter = #format-mark-letters
499 autoAccidentals = #'(Staff (same-octave . 0))
500 autoCautionaries = #'()
502 keyAccidentalOrder = #`(
503 (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
504 (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
505 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
506 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
508 breakAlignOrder = #'(
520 barCheckSynchronize = ##f
523 chordNameFunction = #ignatzek-chord-names
524 majorSevenSymbol = #whiteTriangleMarkup
525 chordNameSeparator = #(make-simple-markup "/")
526 chordNameExceptions = #ignatzekExceptions
527 chordNoteNamer = #'()
528 chordRootNamer = #note-name->markup
529 chordNameExceptionsFull = #fullJazzExceptions
530 chordNameExceptionsPartial = #partialJazzExceptions
533 stringOneTopmost = ##t
536 %% One may change the strings tuning as following :
537 %% The lenght of the list must be equal to the number of string
538 stringTunings = #guitar-tunings
539 tablatureFormat = #fret-number-tablature-format
542 bassFigureFormatFunction = #make-bass-figure-markup
543 metronomeMarkFormatter = #format-metronome-markup
545 (Voice Stem direction 1)
547 ;; TODO: should take from existing definition.
548 ;; c&p from define-grobs.scm
550 (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
551 (Voice Stem stem-shorten (0.4 0))
552 (Voice Stem font-size -3)
553 (Voice NoteHead font-size -3)
554 (Voice Dots font-size -3)
555 (Voice Stem beamed-lengths
556 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
557 (Voice Stem beamed-minimum-free-lengths
558 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
559 (Voice Stem beamed-extreme-minimum-free-lengths
560 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
562 (Voice Stem no-stem-extend #t)
563 (Voice Beam thickness 0.384)
564 (Voice Beam space-function ,(lambda (beam mult)
565 (* 0.8 (Beam::space_function
567 (Voice Beam position-callbacks (,Beam::least_squares
569 ,Beam::slope_damping))
570 (Staff Accidental font-size -4)
571 (Voice Slur direction -1)
574 \grobdescriptions #all-grob-descriptions
577 OrchestralScoreContext = \translator {
581 EasyNotation = \translator {
583 NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
584 NoteHead \override #'Y-extent-callback = #'()
585 NoteHead \override #'X-extent-callback = #'()
591 \type "Engraver_group_engraver"
593 \consists "Figured_bass_engraver"
594 \consists "Rest_swallow_translator"
595 \consists "Note_swallow_translator"
596 \consists "Separating_line_group_engraver"
598 \consistsend "Hara_kiri_engraver"
603 \type "Engraver_group_engraver"
605 %% don't want to route anything out of here:
609 \consists "Swallow_engraver"
610 \description "Silently discards all musical information given to this context. "
616 \consists "Tab_note_heads_engraver"
617 \remove "Note_heads_engraver"
618 \remove "Fingering_engraver"
619 \remove "New_fingering_engraver"
621 \description "Context for drawing notes in a Tab staff. "
622 Slur \override #'font-family = #'roman
623 Slur \override #'molecule-callback = #hammer-molecule-callback
624 Slur \override #'direction = #-1
626 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
627 % This feature is now disabled because most of the tab does not use it.
628 %Beam \override #'damping = #100000
629 %Stem \override #'up-to-staff = ##t
631 % No accidental in tablature !
632 \remove Accidental_engraver
641 \description "Context for generating tablature. [DOCME]"
644 TODO: this context should use a special staff_symbol engraver that
645 takes the line count out of the stringTunings property.
653 StaffSymbol \override #'line-count = #6
654 StaffSymbol \override #'staff-space = #1.5
656 % Don't draw stems over the tablature figures !
657 Stem \override #'avoid-note-head = ##t
659 % No accidental in tablature !
660 \remove "Accidental_engraver"
661 \remove "Key_engraver"
662 \remove "String_number_engraver"
664 clefGlyph = #"clefs-tab"
668 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
669 % but this does not work (is this a bug or intended behaviour?):
671 % If I try to do so, I get "error: unknown escaped string:
672 % `\VaticanaStaffContext'" in params-init.ly. If I also move
673 % "\translator { \Vaticana*Context }" from params-init.ly to the end
674 % of gregorian-init.ly, then I get "error: parse error, unexpected
675 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
676 % gregorian-init.ly. --jr
680 \name "VaticanaVoice"
682 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
684 \remove "Slur_engraver"
685 \remove "Stem_engraver"
686 \remove "Ligature_bracket_engraver"
687 \consists "Vaticana_ligature_engraver"
689 % Set default head for notes outside of \[ \].
690 NoteHead \set #'style = #'vaticana_punctum
692 % Put some space before and after divisiones.
693 % FIXME: This does not seem to show any effect.
694 Script \set #'padding = #0.5
696 % There are no beams in Gregorian Chant notation.
699 % Prepare TextSpanner for \episem{Initium|Finis} use.
700 TextSpanner \set #'style = #'line
701 TextSpanner \set #'edge-height = #'(0 . 0)
702 TextSpanner \set #'padding = #0.5
703 TextSpanner \set #'enclose-bounds = #1
704 TextSpanner \set #'edge-text = #'("" . "")
709 \name "VaticanaStaff"
712 \accepts "VaticanaVoice"
713 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
715 \remove "Time_signature_engraver"
716 \consists "Custos_engraver"
718 % We can not remove Bar_engraver; otherwise clefs and custodes will
719 % not show up any more among other line breaking issues.
720 % Instead, we make the grob transparent.
721 BarLine \set #'transparent = ##t
723 StaffSymbol \set #'line-count = #4
724 StaffSymbol \set #'thickness = #0.6
726 % FIXME: unit on StaffSymbol's width should be \linewidth.
727 % StaffSymbol \set #'width = #60.0
729 % Choose vaticana do clef on 3rd line as default.
730 clefGlyph = #"clefs-vaticana_do"
731 centralCPosition = #1
735 % Select vaticana style font.
736 KeySignature \set #'style = #'vaticana
737 Accidental \set #'style = #'vaticana
738 Custos \set #'style = #'vaticana
739 Custos \set #'neutral-position = #3
740 Custos \set #'neutral-direction = #-1
741 Custos \set #'adjust-if-on-staffline = ##t
744 % Score.barAlways = ##t
749 \name "GregorianTranscriptionVoice"
752 % Removing ligature bracket engraver without replacing it by some
753 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
754 % warning for every "\[" and "\]". Therefore, we make the grob
755 % transparent instead.
756 LigatureBracket \set #'transparent = ##t
758 % Put some space before and after divisiones.
759 % FIXME: This does not seem to show any effect.
760 Script \set #'padding = #0.5
762 % There are no beams in Gregorian Chant notation.
765 % Prepare TextSpanner for \episem{Initium|Finis} use.
766 TextSpanner \set #'style = #'line
767 TextSpanner \set #'edge-height = #'(0 . 0)
768 TextSpanner \set #'padding = #0.5
769 TextSpanner \set #'enclose-bounds = #1
770 TextSpanner \set #'edge-text = #'("" . "")
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