1 ;;;; grob-description.scm -- part of generated backend documentation
3 ;;;; source file of the GNU LilyPond music typesetter
5 ;;;; (c) 1998--2001 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;; Jan Nieuwenhuizen <janneke@gnu.org>
8 ; distances are given in stafflinethickness (thicknesses) and
9 ; staffspace (distances)
11 (define all-grob-descriptions
14 (molecule-callback . ,Local_key_item::brew_molecule)
15 (X-offset-callbacks . (,Side_position_interface::aligned_side))
16 (after-line-breaking-callback . ,Local_key_item::after_line_breaking)
20 (meta . ,(grob-description "Accidentals" accidentals-interface font-interface side-position-interface))
24 (X-extent-callback . ,Arpeggio::width_callback)
25 (Y-extent-callback . #f)
26 (molecule-callback . ,Arpeggio::brew_molecule)
27 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
28 (X-offset-callbacks . (,Side_position_interface::aligned_side))
30 (staff-position . 0.0)
31 (meta . ,(grob-description "Arpeggio" arpeggio-interface side-position-interface font-interface))
34 (autoBeamSettings . ,auto-beam-settings)
37 (break-align-symbol . Staff_bar)
39 (break-glyph-function . ,default-break-barline)
40 (bar-size-procedure . ,Bar::get_staff_bar_size)
41 (molecule-callback . ,Bar::brew_molecule)
42 (visibility-lambda . ,all-visible)
44 (before-line-breaking-callback . ,Bar::before_line_breaking)
46 ;; Ross. page 151 lists other values, we opt for a leaner look
50 (hair-thickness . 1.6)
51 (thick-thickness . 6.0)
52 (meta . ,(grob-description "BarLine" bar-line-interface font-interface))
56 (molecule-callback . ,Text_item::brew_molecule)
58 (visibility-lambda . ,begin-of-line-visible)
62 (font-relative-size . -1)
63 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
64 (meta . ,(grob-description "BarNumber"
65 side-position-interface
66 text-interface font-interface break-aligned-interface))
70 ;; todo: clean this up a bit: the list is getting
72 (molecule-callback . ,Beam::brew_molecule)
73 (y-dy-callbacks . (,Beam::least_squares
74 ,Beam::cancel_suspect_slope
78 ,Beam::do_quantise_y))
80 (thickness . 0.48) ; in staff-space
81 (before-line-breaking-callback . ,Beam::before_line_breaking)
82 (after-line-breaking-callback . ,Beam::after_line_breaking)
83 (neutral-direction . 1)
84 (dir-function . ,beam-dir-majority)
85 (height-quants . ,default-beam-dy-quants)
86 (vertical-position-quant-function . ,default-beam-y-quants)
87 (beamed-stem-shorten . (0.5))
88 (outer-stem-length-limit . 0.2)
90 (flag-width-function . ,default-beam-flag-width-function)
91 (space-function . ,default-beam-space-function)
94 (meta . ,(grob-description "Beam" beam-interface))
101 (space-alist . ,default-break-align-space-alist)
102 (meta . ,(grob-description "BreakAlignment"
103 axis-group-interface align-interface
110 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
112 (meta . ,(grob-description "BreakAlignGroup" axis-group-interface))
116 (break-align-symbol . Breathing_sign)
118 (molecule-callback . ,Breathing_sign::brew_molecule)
119 (Y-offset-callbacks . (,Breathing_sign::offset_callback))
120 (visibility-lambda . ,begin-of-line-invisible)
121 (meta . ,(grob-description "BreathingSign" break-aligned-interface))
125 (molecule-callback . ,Clef::brew_molecule)
126 (before-line-breaking-callback . ,Clef::before_line_breaking)
128 (font-family . music)
129 (break-align-symbol . Clef_item)
130 (visibility-lambda . ,begin-of-line-visible)
131 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
132 (meta . ,(grob-description "Clef" clef-interface font-interface break-aligned-interface ))
136 (molecule-callback . ,Chord_name::brew_molecule)
137 (after-line-breaking-callback . ,Chord_name::after_line_breaking)
138 (chord-name-function . ,default-chord-name-function)
139 (font-family . roman)
140 (meta . ,(grob-description "ChordName" font-interface text-interface chord-name-interface))
144 (break-align-symbol . Custos)
146 (molecule-callback . ,Custos::brew_molecule)
147 (visibility-lambda . ,end-of-line-visible)
149 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
150 (meta . ,(grob-description "Custos" custos-interface staff-symbol-referencer-interface break-aligned-interface) )
157 (X-extent-callback . ,Axis_group_interface::group_extent_callback)
159 (X-offset-callbacks . (,Dot_column::side_position))
160 (meta . ,(grob-description "DotColumn" dot-column-interface axis-group-interface))
164 (molecule-callback . ,Dots::brew_molecule)
166 (staff-position . 0.0)
167 (Y-offset-callbacks . (,Dots::quantised_position_callback ,Staff_symbol_referencer::callback))
168 (meta . ,(grob-description "Dots" font-interface dots-interface ))
171 . ((molecule-callback . ,Percent_repeat_item_interface::double_percent)
174 (font-family . music)
177 (break-align-symbol . Staff_bar)
178 (visibility-lambda . ,begin-of-line-invisible)
179 (meta . ,(grob-description "DoublePercentRepeat" font-interface percent-repeat-interface))
183 (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
184 (molecule-callback . ,Text_item::brew_molecule)
185 (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
186 (self-alignment-X . 0)
188 (no-spacing-rods . #t)
189 (script-priority . 100)
191 (font-family . dynamic)
192 (font-shape . italic)
193 (self-alignment-Y . 0)
194 (meta . ,(grob-description "DynamicText" font-interface text-interface dynamic-interface))
197 (DynamicLineSpanner . (
200 (minimum-space . 1.2)
202 (meta . ,(grob-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface))
206 (break-align-symbol . Left_edge_item)
207 (X-offset-callbacks . (,Break_align_interface::alignment_callback))
209 (meta . ,(grob-description "LeftEdge" break-aligned-interface))
213 (molecule-callback . ,Text_item::brew_molecule)
214 (X-offset-callbacks . (,Side_position_interface::centered_on_parent ,Side_position_interface::aligned_on_self))
217 (self-alignment-X . 0)
218 (font-family . number)
219 (font-relative-size . -3)
220 (font-shape . upright)
221 (meta . ,(grob-description "Fingering" finger-interface font-interface text-script-interface text-interface side-position-interface))
226 (horizontal-space . 1.2)
228 (before-line-breaking-callback . ,Grace_align_item::before_line_breaking)
229 (meta . ,(grob-description "GraceAlignment" axis-group-interface align-interface grace-alignment-interface))
232 (HaraKiriVerticalGroup . (
233 (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
234 (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
236 (meta . ,(grob-description "HaraKiriVerticalGroup" axis-group-interface hara-kiri-group-interface))
239 (molecule-callback . ,Hairpin::brew_molecule)
242 (spacing-procedure . ,Spanner::set_spacing_rods)
243 (minimum-length . 2.0)
244 (if-text-padding . 1.0)
245 (width-correct . -1.0)
247 (dash-thickness . 1.2)
249 (self-alignment-Y . 0)
250 (Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
251 (meta . ,(grob-description "Hairpin" hairpin-interface dynamic-interface))
256 (Y-offset-callbacks . (,Side_position_interface::aligned_on_self
257 ,Side_position_interface::aligned_on_support_refpoints
260 (self-alignment-Y . 0)
261 (molecule-callback . ,Text_item::brew_molecule)
262 (break-align-symbol . Instrument_name)
263 (visibility-lambda . ,begin-of-line-visible)
265 (font-family . roman)
266 (meta . ,(grob-description "InstrumentName" font-interface text-interface break-aligned-interface))
270 (molecule-callback . ,Key_item::brew_molecule)
271 (break-align-symbol . Key_item)
272 (visibility-lambda . ,begin-of-line-visible)
274 (meta . ,(grob-description "KeySignature" key-signature-interface font-interface break-aligned-interface))
281 (minimum-length . 0.5)
282 (maximum-length . 100)
283 (molecule-callback . ,Hyphen_spanner::brew_molecule)
284 (Y-extent-callback . ,Grob::point_dimension_callback)
285 (meta . ,(grob-description "LyricHyphen" lyric-hyphen-interface ))
290 (meta . ,(grob-description "LineOfScore" line-of-score-interface axis-group-interface))
294 (molecule-callback . ,Lyric_extender::brew_molecule)
295 (height . 0.8) ; stafflinethickness;
296 (right-trim-amount . 0.5)
297 (Y-extent-callback . ,Grob::point_dimension_callback)
298 (meta . ,(grob-description "LyricExtender" lyric-extender-interface))
302 (molecule-callback . ,Text_item::brew_molecule)
303 (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
304 (self-alignment-X . 0)
307 (font-family . roman)
308 (font-shape . upright)
309 (meta . ,(grob-description "LyricText" lyric-syllable-interface text-interface font-interface ))
313 (molecule-callback . ,Text_item::brew_molecule)
314 (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
315 (self-alignment-X . 0)
319 (font-family . roman)
320 (font-shape . upright)
321 (font-relative-size . 1)
322 (visibility-lambda . ,end-of-line-invisible)
324 (meta . ,(grob-description "RehearsalMark" mark-interface side-position-interface))
327 (MultiMeasureRest . (
328 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
329 (molecule-callback . ,Multi_measure_rest::brew_molecule)
330 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
333 (padding . 2.0) ; staffspace
334 (minimum-width . 12.5) ; staffspace
335 (font-family . number)
336 (font-relative-size . 1)
337 (meta . ,(grob-description "MultiMeasureRest" multi-measure-rest-interface rest-interface font-interface ))
341 ;; Ugh, should not be hard-coded.
343 (meta . ,(grob-description "NoteCollision"
344 note-collision-interface axis-group-interface
350 (meta . ,(grob-description "NoteColumn" axis-group-interface note-column-interface))
355 (molecule-callback . ,Note_head::brew_molecule)
356 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
357 (stem-attachment-function
358 . ,note-head-style->attachment-coordinates)
359 (meta . ,(grob-description "NoteHead"
360 rhythmic-head-interface font-interface
361 note-head-interface ))
367 (X-extent-callback . #f)
368 (Y-extent-callback . #f)
369 (molecule-callback . ,Line_spanner::brew_molecule)
370 (meta . ,(grob-description "Glissando"
371 line-spanner-interface))
377 (X-extent-callback . #f)
378 (Y-extent-callback . #f)
379 (molecule-callback . ,Line_spanner::brew_molecule)
380 (meta . ,(grob-description "VoiceFollower"
381 line-spanner-interface))
385 (molecule-callback . ,Text_item::brew_molecule)
386 (font-family . roman)
387 (meta . ,(grob-description "NoteName"
388 note-name-interface font-interface
393 (self-alignment-X . 0)
395 (visibility-lambda . ,begin-of-line-visible)
396 (X-offset-callbacks . (,Side_position_interface::centered_on_parent ,Side_position_interface::aligned_on_self))
397 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
398 (molecule-callback . ,Text_item::brew_molecule)
399 (font-shape . italic)
400 (font-family . roman)
401 (meta . ,(grob-description "OctavateEight" text-interface font-interface ))
406 (before-grace-spacing-factor . 1.2)
407 (before-musical-spacing-factor . 0.4)
408 (meta . ,(grob-description "PaperColumn" paper-column-interface axis-group-interface spaceable-element-interface))
411 (molecule-callback . ,Slur::brew_molecule)
413 (spacing-procedure . ,Spanner::set_spacing_rods)
414 (minimum-length . 1.5)
415 (after-line-breaking-callback . ,Slur::after_line_breaking)
416 (extremity-rules . ,default-slur-extremity-rules)
417 (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist)
418 (de-uglify-parameters . ( 1.5 0.8 -2.0))
419 (Y-extent-callback . ,Slur::height)
420 (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
421 (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
422 (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
423 (bezier-area-steps . 1.0)))
426 (attachment . (#f . #f))
427 (attachment-offset . ((0 . 0) . (0 . 0)))
429 (meta . ,(grob-description "PhrasingSlur" slur-interface))
432 (NonMusicalPaperColumn . (
434 (before-musical-spacing-factor . 1.0)
435 (column-space-strength . 2.0)
436 (meta . ,(grob-description "NonMusicalPaperColumn" paper-column-interface axis-group-interface spaceable-element-interface))
440 (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
441 (molecule-callback . ,Multi_measure_rest::percent)
444 (minimum-width . 12.5) ; staffspace
445 (font-family . music)
446 (meta . ,(grob-description "PercentRepeat" multi-measure-rest-interface font-interface percent-repeat-interface))
451 (molecule-callback . , Percent_repeat_item_interface::beat_slash)
454 (meta . ,(grob-description "RepeatSlash" percent-repeat-interface))
457 (after-line-breaking-callback . ,Rest::after_line_breaking)
458 (X-extent-callback . ,Rest::extent_callback)
459 (Y-extent-callback . ,Rest::extent_callback)
460 (molecule-callback . ,Rest::brew_molecule)
461 (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
462 (minimum-beam-collision-distance . 1.5)
463 (meta . ,(grob-description "Rest"
464 rhythmic-head-interface
465 staff-symbol-referencer-interface
469 (minimum-distance . 0.75)
470 (meta . ,(grob-description "RestCollision" rest-collision-interface ))
474 ;; don't set direction here: it breaks staccato.
475 (molecule-callback . ,Script::brew_molecule)
477 (X-offset-callbacks . (,Side_position_interface::centered_on_parent))
478 (before-line-breaking-callback . ,Script::before_line_breaking)
479 (meta . ,(grob-description "Script" script-interface side-position-interface font-interface))
483 (before-line-breaking-callback . ,Script_column::before_line_breaking)
484 (meta . ,(grob-description "ScriptColumn" script-column-interface))
488 (molecule-callback . ,Slur::brew_molecule)
490 (spacing-procedure . ,Spanner::set_spacing_rods)
491 (minimum-length . 1.5)
492 (after-line-breaking-callback . ,Slur::after_line_breaking)
493 (extremity-rules . ,default-slur-extremity-rules)
494 (extremity-offset-alist . ,default-slur-extremity-offset-alist)
495 (de-uglify-parameters . ( 1.5 0.8 -2.0))
496 (Y-extent-callback . ,Slur::height)
497 (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5)
498 (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006)
499 (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2)
500 (bezier-area-steps . 1.0)))
503 (attachment . (#f . #f))
504 (attachment-offset . ((0 . 0) . (0 . 0)))
506 (meta . ,(grob-description "Slur" slur-interface))
510 (spacing-procedure . ,Spacing_spanner::set_springs)
511 (stem-spacing-correction . 0.5)
512 (arithmetic-basicspace . 2.0)
513 (arithmetic-multiplier . ,(* 0.9 1.32))
514 ;; assume that notes at least this long are present.
515 (maximum-duration-for-spacing . ,(make-moment 1 8))
516 (meta . ,(grob-description "SpacingSpanner" spacing-spanner-interface))
519 (break-align-symbol . Staff_bar)
520 (bar-size-procedure . ,Span_bar::get_bar_size)
521 (molecule-callback . ,Bar::brew_molecule)
522 (visibility-lambda . ,begin-of-line-invisible)
523 (X-extent-callback . ,Span_bar::width_callback)
524 (Y-offset-callbacks . (,Span_bar::center_on_spanned_callback))
528 (before-line-breaking-callback . ,Span_bar::before_line_breaking)
532 ;; Ross. page 151 lists other values, we opt for a leaner look
536 (hair-thickness . 1.6)
537 (thick-thickness . 6.0)
538 (meta . ,(grob-description "SpanBar" span-bar-interface bar-line-interface ))
543 (molecule-callback . ,Text_item::brew_molecule)
544 (break-align-symbol . Clef_item)
545 (visibility-lambda . ,begin-of-line-visible)
546 (font-family . roman)
547 (meta . ,(grob-description "StanzaNumber" break-aligned-interface text-interface font-interface))
551 (molecule-callback . ,Staff_symbol::brew_molecule)
555 (meta . ,(grob-description "StaffSymbol" staff-symbol-interface ))
558 (molecule-callback . ,Text_item::brew_molecule)
560 (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
561 (Y-offset-callbacks .
562 (,Side_position_interface::aligned_side
563 ,Side_position_interface::centered_on_parent))
564 (no-spacing-rods . #t)
565 (font-shape . italic)
566 (self-alignment-X . 0)
567 (meta . ,(grob-description "SostenutoPedal" text-interface font-interface))
571 (before-line-breaking-callback . ,Stem::before_line_breaking)
572 (molecule-callback . ,Stem::brew_molecule)
574 (beamed-lengths . (0.0 2.5 2.0 1.5))
575 (beamed-minimum-lengths . (0.0 1.5 1.25 1.0))
577 ;; Stems in unnatural (forced) direction should be shortened,
578 ;; according to [Roush & Gourlay]. Their suggestion to knock off
579 ;; a whole staffspace seems a bit drastical: we'll do half.
581 (lengths . (3.5 3.5 3.5 4.5 5.0))
582 (stem-shorten . (0.5))
583 ; if stem is on middle line, choose this direction.
584 (neutral-direction . 1)
585 (X-offset-callbacks . (,Stem::off_callback))
586 (X-extent-callback . ,Stem::dim_callback)
587 (Y-extent-callback . ,Stem::height)
588 (meta . ,(grob-description "Stem" stem-interface font-interface))
592 (molecule-callback . ,Stem_tremolo::brew_molecule)
593 (Y-extent-callback . ,Stem_tremolo::height)
594 (X-extent-callback . #f)
596 (beam-width . 2.0) ; staff-space
597 (beam-thickness . 0.42) ; staff-space
598 (beam-space-function . ,default-beam-space-function)
599 (meta . ,(grob-description "StemTremolo" stem-tremolo-interface ))
603 (meta . ,(grob-description "SeparationItem" separation-item-interface ))
605 (SeparatingGroupSpanner . (
606 (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
607 (meta . ,(grob-description "SeparatingGroupSpanner" separation-spanner-interface))
611 (no-spacing-rods . #t)
612 (molecule-callback . ,Sustain_pedal::brew_molecule)
613 (self-alignment-X . 0)
615 (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
616 (Y-offset-callbacks .
617 (,Side_position_interface::aligned_side
618 ,Side_position_interface::centered_on_parent))
620 (meta . ,(grob-description "SustainPedal" sustain-pedal-interface side-position-interface font-interface))
623 ;; TODO: should split in 3
624 (SystemStartDelimiter . (
625 (molecule-callback . ,System_start_delimiter::brew_molecule)
626 (after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
627 ;; really 4.0, but 5 to be on safe side.
628 (brace-collapse-height . 5.0)
629 (bracket-collapse-height . 1)
636 (bracket-thick . 0.25)
637 (Y-extent-callback . #f)
638 (font-family . braces)
639 ;; if you want to set point-size, you cannot set
640 ;; relative-size, as no font will be found for other
642 ;;(font-design-size . 20)
643 ;;(font-relative-size . #f)
644 (meta . ,(grob-description "SystemStartDelimiter" system-start-delimiter-interface font-interface))
648 (molecule-callback . ,Text_item::brew_molecule)
649 (no-spacing-rods . #t)
652 ;; todo: add X self alignment?
654 (font-family . roman)
655 (meta . ,(grob-description "TextScript" text-script-interface text-interface side-position-interface font-interface ))
658 (molecule-callback . ,Text_spanner::brew_molecule)
659 (font-family . roman)
662 ;; urg, only for (de)cresc. text spanners
663 (if-text-padding . 1.0)
667 (meta . ,(grob-description "TextSpanner" text-spanner-interface font-interface))
670 (molecule-callback . ,Tie::brew_molecule)
671 (spacing-procedure . ,Spanner::set_spacing_rods)
672 (staffline-clearance . 0.35)
673 (details . ((ratio . 0.333) (height-limit . 1.0)))
677 (minimum-length . 2.5)
678 (meta . ,(grob-description "Tie" tie-interface ))
682 (after-line-breaking-callback . ,Tie_column::after_line_breaking)
683 (meta . ,(grob-description "TieColumn" tie-column-interface ))
687 (molecule-callback . ,Time_signature::brew_molecule)
688 (break-align-symbol . Time_signature)
689 (visibility-lambda . ,all-visible)
692 (font-family . number)
693 (meta . ,(grob-description "TimeSignature" time-signature-interface font-interface))
700 (after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
701 (molecule-callback . ,Tuplet_bracket::brew_molecule)
702 (font-family . roman)
703 (font-shape . italic)
704 (font-relative-size . -1)
705 (meta . ,(grob-description "TupletBracket" text-interface
706 tuplet-bracket-interface font-interface))
710 (molecule-callback . ,Text_item::brew_molecule)
711 (font-family . roman)
712 (font-shape . italic)
713 (no-spacing-rods . #t)
714 (self-alignment-X . 0)
716 (X-offset-callbacks . (,Side_position_interface::aligned_on_self))
717 (Y-offset-callbacks .
718 (,Side_position_interface::aligned_side
719 ,Side_position_interface::centered_on_parent))
720 (meta . ,(grob-description "UnaCordaPedal" text-interface font-interface))
724 (molecule-callback . ,Volta_spanner::brew_molecule)
729 (Y-offset-callbacks . (,Side_position_interface::aligned_side))
730 (thickness . 1.6) ; stafflinethickness
731 (height . 2.0) ; staffspace;
733 (font-family . number)
734 (font-relative-size . -2)
735 (meta . ,(grob-description "VoltaBracket" volta-bracket-interface side-position-interface font-interface))
738 (VerticalAlignment . (
740 (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
741 (X-extent-callback . #f)
744 (meta . ,(grob-description "VerticalAlignment" align-interface axis-group-interface))
747 (VerticalAxisGroup . (
749 (meta . ,(grob-description "VerticalAxisGroup" axis-group-interface))
755 ; (display (map pair? all-grob-descriptions))