3 ; should include default value?
7 ;;; Score elements are called `objects' now and then, which gets
8 ;;; rather confusing, we now have `elements', `items', `spanners'
12 (define (lily-interface symbol description props)
20 (define (grob-description name . interfaces)
21 (let* ((ifs (cons general-grob-interface interfaces))
22 (props (map caddr ifs))
23 ; (prop-typep-pairs (map (lambda (x) (cons (car x) (cadr x)))
24 ; (apply append props)))
27 (list (cons 'separator "\n\n\n") ;easy printing.
29 (cons 'interfaces syms)
30 (cons 'interface-descriptions ifs)
31 ; (cons 'interface-descriptions (cadr merged))
32 ;; description of the grob itself?
33 ; (cons 'properties prop-typep-pairs)
36 (define general-grob-interface
38 'general-grob-interface
39 "All grobs support this"
59 (define beam-interface
64 #'thickness= weight of beams, in staffspace
71 default-neutral-direction
76 vertical-position-quant-function
78 outer-stem-length-limit
83 (define clef-interface
94 (define axis-group-interface
97 "a group of coupled grobs"
102 (define note-column-interface
104 'note-column-interface
105 "Stem and noteheads combined"
112 (define stem-interface
119 beamed-minimum-lengths
126 default-neutral-direction
138 (define slur-interface
152 extremity-offset-alist
160 (define side-position-interface
162 'side-position-interface
163 "Position a victim object (this one) next to other objects (the support).
164 #'direction = where to put the victim object (left or right?)
170 side-relative-direction
179 (define accidentals-interface
181 'accidentals-interface
189 (define line-of-score-interface
191 'line-of-score-interface
192 "Super grob, parent of all:
194 The columns of a score that form one line. The toplevel grob. Any
195 grob has a Line_of_score as both X and Y reference point. The
196 Paper_score contains one grob of this type. Control enters the
197 Grob dependency calculation from this single Line_of_score
200 between-system-string
202 before-line-breaking-callback
203 after-line-breaking-callback
208 (define note-head-interface
217 (define note-name-interface
227 (define rhythmic-head-interface
229 'rhythmic-head-interface
237 (define rest-interface
243 (define tuplet-bracket-interface
245 'tuplet-bracket-interface
246 "A bracket with a number in the middle, used for tuplets."
252 tuplet-bracket-visibility
253 tuplet-number-visibility
260 (define align-interface
263 " Order grobs top to bottom/left to right/right to left etc."
274 (define aligned-interface
277 "read by align-interface"
283 (define break-aligned-interface
285 'break-aligned-interface
286 "Items that are aligned in prefatory matter"
293 (define chord-name-interface
295 'chord-name-interface
296 "generate a chord name"
297 '( pitches inversion bass)))
299 (define time-signature-interface
301 'time-signature-interface
302 "A time signature, in different styles"
303 '( fraction style )))
305 (define bar-line-interface
310 This is a request to print a special bar symbol. It replaces the
311 regular bar symbol with a special
312 symbol. The argument @var{bartype} is a string which specifies the
313 kind of bar to print. Options are @code{\":|\"}
314 @cindex \"|A@@@code{:|}
317 @cindex \"|B@@@code{|:}
319 @cindex \"|C@@@code{:|:}
322 @cindex \"|D@@@code{||}
324 @cindex \"|E@@@code{|.}
327 @cindex \"|F@@@code{.|}
329 @cindex \"|G@@@code{.|.}
332 These produce, respectively, a right repeat, a left repeat, a double
333 repeat, a double bar, a start bar, an end bar, and a thick double bar.
334 If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
335 but a line break is allowed at that spot.
338 '( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function )))
340 (define hairpin-interface
345 padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
348 '( grow-direction thickness height padding )
351 (define arpeggio-interface
354 "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
359 (define note-collision-interface
361 'note-collision-interface
362 "An object that handles collisions between notes with different
363 stem directions and horizontal shifts. Most of the interesting
364 properties are to be set in @ref{note-column-interface}"
365 '(merge-differently-dotted note-width)
369 (define custos-interface
372 "A custos is a staff context symbol that appears at the end of a
373 staff line with monophonic musical contents (i.e. with a single
374 voice). It anticipates the pitch of the first note of the following
375 line and thus helps the player or singer to manage line breaks
376 during performance, thus enhancing readability of a score.
378 Custodes were frequently used in music notation until the 16th
379 century. There were different appearences for different notation
380 styles. Nowadays, they have survived only in special forms of
381 musical notation such as via the editio vaticana dating back to the
382 beginning of the 20th century.
384 [TODO: add to glossary]"
393 (define dot-interface
396 "The dots to go with a notehead/rest. A separate interface, since they
397 are a party in collision resolution.
398 #'direction is the Direction to handle staff-line collisions in."
399 '(direction dot-count)
403 (define font-interface
406 "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
407 '(font-style font-series font-shape font-family font-name
408 font-point-size font-relative-size)
412 (define text-interface
415 "A scheme markup text"
416 '(text align lookup raise kern magnify)))
418 (define dot-column-interface
420 'dot-column-interface
421 "Interface that groups dots so they form a column"
425 (define dynamic-interface
428 "Any kind of loudness sign"
433 (define finger-interface
436 "A fingering instruction"
440 (define separation-spanner-interface
442 'separation-spanner-interface
443 "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
446 (define text-script-interface
448 'text-script-interface
453 (define grace-alignment-interface
455 'grace-alignment-interface
456 "put grace notes in line"
462 (define hara-kiri-group-interface
464 'hara-kiri-group-interface
465 " As Vertical_group_spanner, but keep track of interesting items. If
466 we don't contain any interesting items after linebreaking, then
467 gracefully commit suicide. Objective: don't disgrace Lily by
468 typesetting empty lines in orchestral scores."
469 '( items-worth-living )
472 (define line-spanner-interface
474 'line-spanner-interface
475 "Generic line drawn between two objects, eg. for use with glissandi.
476 gap is measured in staff-spaces. "
478 '(gap dash-period dash-length line-thickness type )
481 (define lyric-hyphen-interface
483 'lyric-hyphen-interface
484 "A centred hyphen is a simple line between lyrics used to divide
485 syllables. The length of the hyphen line should stretch based on the
486 size of the gap between syllables."
488 '( thickness height minimum-length word-space )
491 (define key-signature-interface
493 'key-signature-interface
494 "A group of accidentals."
501 (define lyric-extender-interface
503 'lyric-extender-interface
504 "The extender is a simple line at the baseline of the lyric
505 that helps show the length of a melissima (tied/slurred note)."
513 (define lyric-syllable-interface
515 'lyric-syllable-interface
516 "a single piece of lyrics"
522 (define mark-interface
529 (define multi-measure-rest-interface
531 'multi-measure-rest-interface
532 "A rest that spans a whole number of measures. For typesetting the
533 numbers, fields from font-interface may be used.
535 padding is the space between number and rest. Measured in staffspace.
538 '( columns expand-limit minimum-width padding )
542 (define paper-column-interface
544 'paper-column-interface
547 '(column-space-strength before-musical-spacing-factor
548 stem-spacing-correction before-grace-spacing-factor when bounded-by-me
549 dir-list shortest-playing-duration shortest-starter-duration
550 contains-grace extra-space stretch-distance ))
554 (define spaceable-element-interface
556 'spaceable-element-interface
557 "An grob (generally a Paper_column) that takes part in the
565 (define rest-collision-interface
567 'rest-collision-interface
568 "Move around ordinary rests (not multi-measure-rests) to avoid
576 (define script-interface
584 (define script-column-interface
586 'script-column-interface
587 "An interface that sorts scripts according to their @code{script-priority}"
591 (define spacing-spanner-interface
593 'spacing-spanner-interface
594 " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
595 The space taken by a note is determined by the formula
599 where TIME is the amount of time a note occupies. The value of C is
600 chosen such that the smallest space within a measure is
601 arithmetic_basicspace:
603 C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
605 The smallest space is the one following the shortest note in the
606 measure, or the space following a hypothetical 1/8 note. Typically
607 arithmetic_basicspace is set to a value so that the shortest note
608 takes about two noteheads of space (ie, is followed by a notehead of
612 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
614 @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
615 @{ assuming: SHORTEST <= 1/8 @}
617 = arithmetic_multiplier *
618 ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
620 = arithmetic_multiplier * arithmetic_basicspace
622 @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
624 = quartwidth * arithmetic_basicspace
628 arithmetic_basicspace = 2/1 = 2
631 If you want to space your music wider, use something like:
633 arithmetic_basicspace = 4.;
637 maximum-duration-for-spacing
638 arithmetic-basicspace
639 arithmetic-multiplier
643 (define staff-symbol-interface
645 'staff-symbol-interface
646 "This spanner draws the lines of a staff. The middle line is
653 (define stem-tremolo-interface
655 'stem-tremolo-interface
664 (define separation-item-interface
666 'separation-item-interface
667 "Item that computes widths to generate spacing rods.
669 Calc dimensions for the Separating_group_spanner; this has to be
670 an item to get dependencies correct. It can't be an grob_group
671 since these usually are in a different X_group
677 (define sustain-pedal-interface
679 'sustain-pedal-interface
683 (define system-start-delimiter-interface
685 'system-start-delimiter-interface
686 "#'style can be bar-line, bracket or brace"
687 '(collapse-height thickness arch-height arch-angle arch-thick
688 arch-width bracket-thick bracket-width glyph )))
690 (define text-spanner-interface
692 'text-spanner-interface
693 "generic text spanner"
704 (define tie-interface
707 "A tie connecting two noteheads.
708 direction = Forced direction for all ties"
723 (define tie-column-interface
725 'tie-column-interface
726 "that sets tie directions in a tied chord"
730 (define volta-bracket-interface
732 'volta-bracket-interface
733 "Volta bracket with number"
740 (define span-bar-interface