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"
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"
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.5
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"
392 % hara kiri & auto knee don't work together.
393 Beam \override #'auto-knee-gap = #'()
396 AncientRemoveEmptyStaffContext = \translator {
397 %% why not add by default?
399 \RemoveEmptyStaffContext
400 \accepts "VaticanaVoice"
401 \accepts "GregorianTranscriptionVoice"
407 localKeySignature = #'()
409 \description "This is the top level notation context. No
410 other context can contain a @code{Score} context. This context
411 handles the administration of time signatures. It also makes sure
412 that items such as clefs, time signatures, and key-signatures are
413 aligned across staves.
415 You cannot explicitly instantiate a Score context (since it is
416 not contained in any other context). It is instantiated
417 automatically when an output definition (a @code{\score} or
418 @code{\paper} block) is processed."
420 \consists "Repeat_acknowledge_engraver"
421 \consists "Staff_collecting_engraver"
423 % move the alias along with the engraver.
425 %% TODO? add this alias from Timing_engraver::initialize() ?
426 \consists "Timing_engraver"
429 \consists "Output_property_engraver"
430 \consists "System_start_delimiter_engraver"
431 \consists "Mark_engraver"
432 \consists "Metronome_mark_engraver"
433 \consists "Break_align_engraver"
434 \consists "Spacing_engraver"
435 \consists "Vertical_align_engraver"
436 \consists "Lyric_phrasing_engraver"
437 \consists "Bar_number_engraver"
438 \consists "Span_arpeggio_engraver"
442 \accepts "VaticanaStaff"
443 \accepts "GregorianTranscriptionStaff"
444 \accepts "StaffContainer"
445 \accepts "StaffGroup"
446 \accepts "RhythmicStaff"
449 \accepts "ChordNames"
450 \accepts "GrandStaff"
451 \accepts "ChoirStaff"
452 \accepts "PianoStaff"
455 \accepts "FiguredBass"
458 soloIIText = #"Solo II"
461 systemStartDelimiter =#'SystemStartBar
463 drumStyleTable = #drums-style
465 melismaBusyProperties = #default-melisma-properties
467 clefGlyph = #"clefs-G"
469 centralCPosition = #-6
471 defaultBarType = #"|"
472 barNumberVisibility = #default-bar-number-visibility
475 explicitClefVisibility = #all-visible
476 explicitKeySignatureVisibility = #all-visible
477 autoBeamSettings = #default-auto-beam-settings
479 scriptDefinitions = #default-script-alist
481 verticalAlignmentChildCallback = #Align_interface::alignment_callback
483 pedalSustainStrings = #'("Ped." "*Ped." "*")
484 pedalSustainStyle = #'text
485 pedalUnaCordaStrings = #'("una corda" "" "tre corde")
486 pedalUnaCordaStyle = #'text
488 %% These are in ordinary italic font, including the *,
489 %% but they are unlikely to be used,
490 %% as the default pedal-style for SostenutoPedal is 'mixed':
491 %% i.e. Sost. Ped_____________________
492 pedalSostenutoStrings = #'("Sost. Ped." "*Sost. Ped." "*")
493 pedalSostenutoStyle = #'mixed
495 fingeringOrientations = #'(up down)
496 tupletNumberFormatFunction = #denominator-tuplet-formatter
497 markFormatter = #format-mark-letters
502 autoAccidentals = #'(Staff (same-octave . 0))
503 autoCautionaries = #'()
505 keyAccidentalOrder = #`(
506 (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT ) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
507 (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
508 (6 . ,DOUBLE-FLAT) (2 . ,DOUBLE-FLAT) (5 . ,DOUBLE-FLAT ) (1 . ,DOUBLE-FLAT) (4 . ,DOUBLE-FLAT) (0 . ,DOUBLE-FLAT) (3 . ,DOUBLE-FLAT)
509 (3 . ,DOUBLE-SHARP) (0 . ,DOUBLE-SHARP) (4 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (5 . ,DOUBLE-SHARP) (2 . ,DOUBLE-SHARP) (6 . ,DOUBLE-SHARP)
511 breakAlignOrder = #'(
523 barCheckSynchronize = ##f
526 chordNameFunction = #ignatzek-chord-names
527 majorSevenSymbol = #whiteTriangleMarkup
528 chordNameSeparator = #(make-simple-markup "/")
529 chordNameExceptions = #ignatzekExceptions
530 chordNoteNamer = #'()
531 chordRootNamer = #note-name->markup
532 chordNameExceptionsFull = #fullJazzExceptions
533 chordNameExceptionsPartial = #partialJazzExceptions
536 stringOneTopmost = ##t
539 %% One may change the strings tuning as following :
540 %% The lenght of the list must be equal to the number of string
541 stringTunings = #guitar-tunings
542 tablatureFormat = #fret-number-tablature-format
545 bassFigureFormatFunction = #make-bass-figure-markup
546 metronomeMarkFormatter = #format-metronome-markup
548 (Voice Stem direction 1)
550 ;; TODO: should take from existing definition.
551 ;; c&p from define-grobs.scm
553 (Voice Stem lengths ,(map (lambda (x) (* 0.8 x)) '(3.5 3.5 3.5 4.5 5.0)))
554 (Voice Stem stem-shorten (0.4 0))
555 (Voice Stem font-size -3)
556 (Voice NoteHead font-size -3)
557 (Voice Dots font-size -3)
558 (Voice Stem beamed-lengths
559 ,(map (lambda (x) (* 0.8 x)) '(3.26)))
560 (Voice Stem beamed-minimum-free-lengths
561 ,(map (lambda (x) (* 0.8 x)) '(2.5 2.0 1.5)))
562 (Voice Stem beamed-extreme-minimum-free-lengths
563 ,(map (lambda (x) (* 0.8 x)) '(1.83 1.5)))
565 (Voice Stem no-stem-extend #t)
566 (Voice Beam thickness 0.384)
567 (Voice Beam space-function ,(lambda (beam mult)
568 (* 0.8 (Beam::space_function
570 (Voice Beam position-callbacks (,Beam::least_squares
572 ,Beam::slope_damping))
573 (Staff Accidental font-size -4)
574 (Voice Slur direction -1)
577 \grobdescriptions #all-grob-descriptions
580 OrchestralScoreContext = \translator {
584 EasyNotation = \translator {
586 NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
587 NoteHead \override #'Y-extent-callback = #'()
588 NoteHead \override #'X-extent-callback = #'()
594 \type "Engraver_group_engraver"
596 \consists "Figured_bass_engraver"
597 \consists "Rest_swallow_translator"
598 \consists "Note_swallow_translator"
599 \consists "Separating_line_group_engraver"
601 \consistsend "Hara_kiri_engraver"
606 \type "Engraver_group_engraver"
608 %% don't want to route anything out of here:
612 \consists "Swallow_engraver"
613 \description "Silently discards all musical information given to this context. "
619 \consists "Tab_note_heads_engraver"
620 \remove "Note_heads_engraver"
621 \remove "Fingering_engraver"
622 \remove "New_fingering_engraver"
624 \description "Context for drawing notes in a Tab staff. "
625 Slur \override #'font-family = #'roman
626 Slur \override #'molecule-callback = #hammer-molecule-callback
627 Slur \override #'direction = #-1
629 % Draws all stems/beams out of the staff (and not in the middle of the staff !)
630 % This feature is now disabled because most of the tab does not use it.
631 %Beam \override #'damping = #100000
632 %Stem \override #'up-to-staff = ##t
634 % No accidental in tablature !
635 \remove Accidental_engraver
644 \description "Context for generating tablature. [DOCME]"
647 TODO: this context should use a special staff_symbol engraver that
648 takes the line count out of the stringTunings property.
656 StaffSymbol \override #'line-count = #6
657 StaffSymbol \override #'staff-space = #1.5
659 % Don't draw stems over the tablature figures !
660 Stem \override #'avoid-note-head = ##t
662 % No accidental in tablature !
663 \remove "Accidental_engraver"
664 \remove "Key_engraver"
665 \remove "String_number_engraver"
667 clefGlyph = #"clefs-tab"
671 % TODO: Gregorian Chant contexts should be moved to gregorian-init.ly,
672 % but this does not work (is this a bug or intended behaviour?):
674 % If I try to do so, I get "error: unknown escaped string:
675 % `\VaticanaStaffContext'" in params-init.ly. If I also move
676 % "\translator { \Vaticana*Context }" from params-init.ly to the end
677 % of gregorian-init.ly, then I get "error: parse error, unexpected
678 % TRANSLATOR: \translator { \VaticanaStaffContext }" in
679 % gregorian-init.ly. --jr
683 \name "VaticanaVoice"
685 \description "Same as @code{Voice} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
687 \remove "Slur_engraver"
688 \remove "Stem_engraver"
689 \remove "Ligature_bracket_engraver"
690 \consists "Vaticana_ligature_engraver"
692 % Set default head for notes outside of \[ \].
693 NoteHead \set #'style = #'vaticana_punctum
695 % Put some space before and after divisiones.
696 % FIXME: This does not seem to show any effect.
697 Script \set #'padding = #0.5
699 % There are no beams in Gregorian Chant notation.
702 % Prepare TextSpanner for \episem{Initium|Finis} use.
703 TextSpanner \set #'style = #'line
704 TextSpanner \set #'edge-height = #'(0 . 0)
705 TextSpanner \set #'padding = #0.5
706 TextSpanner \set #'enclose-bounds = #1
707 TextSpanner \set #'edge-text = #'("" . "")
712 \name "VaticanaStaff"
715 \accepts "VaticanaVoice"
716 \description "Same as @code{Staff} context, except that it is accommodated for tyepsetting Gregorian Chant in the notational style of Editio Vaticana."
718 \remove "Time_signature_engraver"
719 \consists "Custos_engraver"
721 % We can not remove Bar_engraver; otherwise clefs and custodes will
722 % not show up any more among other line breaking issues.
723 % Instead, we make the grob transparent.
724 BarLine \set #'transparent = ##t
726 StaffSymbol \set #'line-count = #4
727 StaffSymbol \set #'thickness = #0.6
729 % FIXME: unit on StaffSymbol's width should be \linewidth.
730 % StaffSymbol \set #'width = #60.0
732 % Choose vaticana do clef on 3rd line as default.
733 clefGlyph = #"clefs-vaticana_do"
734 centralCPosition = #1
738 % Select vaticana style font.
739 KeySignature \set #'style = #'vaticana
740 Accidental \set #'style = #'vaticana
741 Custos \set #'style = #'vaticana
742 Custos \set #'neutral-position = #3
743 Custos \set #'neutral-direction = #-1
744 Custos \set #'adjust-if-on-staffline = ##t
747 % Score.barAlways = ##t
752 \name "GregorianTranscriptionVoice"
755 % Removing ligature bracket engraver without replacing it by some
756 % other ligature engraver would cause a "Junking event: `LigatureEvent'"
757 % warning for every "\[" and "\]". Therefore, we make the grob
758 % transparent instead.
759 LigatureBracket \set #'transparent = ##t
761 % Put some space before and after divisiones.
762 % FIXME: This does not seem to show any effect.
763 Script \set #'padding = #0.5
765 % There are no beams in Gregorian Chant notation.
768 % Prepare TextSpanner for \episem{Initium|Finis} use.
769 TextSpanner \set #'style = #'line
770 TextSpanner \set #'edge-height = #'(0 . 0)
771 TextSpanner \set #'padding = #0.5
772 TextSpanner \set #'enclose-bounds = #1
773 TextSpanner \set #'edge-text = #'("" . "")
777 \name "GregorianTranscriptionStaff"
780 \accepts "GregorianTranscriptionVoice"
782 % We can not remove Bar_engraver; otherwise clefs and custodes will
783 % not show up any more among other line breaking issues.
784 % Instead, we make the grob transparent.
785 BarLine \set #'transparent = ##t