1 ;;;; interface-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>
9 ; should include default value?
13 ;;; Score elements are called `objects' now and then, which gets
14 ;;; rather confusing, we now have `elements', `items', `spanners'
18 (define all-interfaces '())
20 (define (lily-interface symbol description props)
21 (set! all-interfaces (acons symbol (list symbol
23 props) all-interfaces)
27 (define (grob-description name . interfaces)
28 (let* ((ifs (cons general-grob-interface interfaces))
29 (props (map caddr ifs))
30 ; (prop-typep-pairs (map (lambda (x) (cons (car x) (cadr x)))
31 ; (apply append props)))
34 (list (cons 'separator "\n\n\n") ;easy printing.
36 (cons 'interfaces syms)
37 (cons 'interface-descriptions ifs)
38 ; (cons 'interface-descriptions (cadr merged))
39 ;; description of the grob itself?
40 ; (cons 'properties prop-typep-pairs)
45 'general-grob-interface
46 "All grobs support this"
71 #'thickness= weight of beams, in staffspace
83 vertical-position-quant-function
85 outer-stem-length-limit
104 'axis-group-interface
105 "a group of coupled grobs"
112 'note-column-interface
113 "Stem and noteheads combined"
126 beamed-minimum-lengths
158 extremity-offset-alist
168 'side-position-interface
169 "Position a victim object (this one) next to other objects (the support).
170 #'direction = where to put the victim object (left or right?)
176 side-relative-direction
187 'accidentals-interface
197 'line-of-score-interface
198 "Super grob, parent of all:
200 The columns of a score that form one line. The toplevel grob. Any
201 grob has a Line_of_score as both X and Y reference point. The
202 Paper_score contains one grob of this type. Control enters the
203 Grob dependency calculation from this single Line_of_score
206 between-system-string
208 before-line-breaking-callback
209 after-line-breaking-callback
218 '( style stem-attachment-function note-character ))
229 'rhythmic-head-interface
245 'tuplet-bracket-interface
246 "A bracket with a number in the middle, used for tuplets."
251 tuplet-bracket-visibility
252 tuplet-number-visibility
260 " Order grobs top to bottom/left to right/right to left etc."
274 "read by align-interface"
282 'break-aligned-interface
283 "Items that are aligned in prefatory matter"
292 'chord-name-interface
293 "generate a chord name"
294 '( pitches inversion bass))
298 'time-signature-interface
299 "A time signature, in different styles.
300 The following values for 'style are are recognized:
304 4/4 and 2/2 are typeset as C and struck C, respectively. All
305 other time signatures are written with two digits.
308 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
309 typeset with old-style mensuration marks. All other time
310 signatures are written with two digits.
313 All time signatures are typeset with a single
314 digit, e.g. 3/2 is written as 3. (Any symbol starting
315 with the digit @code{1} will do.)
317 @item @code{C}@var{M}@code{/}@var{N},
318 @code{old}@var{M}@code{/}@var{N} or
320 Tells LilyPond to use a specific symbol as time signature,
321 regardless of the actual time signature.
324 See also the test-file @file{input/test/time.ly}.
333 This is a request to print a special bar symbol. It replaces the
334 regular bar symbol with a special
335 symbol. The argument @var{bartype} is a string which specifies the
336 kind of bar to print. Options are @code{\":|\"}
337 @cindex \"|A@@@code{:|}
340 @cindex \"|B@@@code{|:}
342 @cindex \"|C@@@code{:|:}
345 @cindex \"|D@@@code{||}
347 @cindex \"|E@@@code{|.}
350 @cindex \"|F@@@code{.|}
352 @cindex \"|G@@@code{.|.}
355 These produce, respectively, a right repeat, a left repeat, a double
356 repeat, a double bar, a start bar, an end bar, and a thick double bar.
357 If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
358 but a line break is allowed at that spot.
361 '(bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
368 padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
371 '( grow-direction thickness height padding
377 "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
383 'note-collision-interface
384 "An object that handles collisions between notes with different
385 stem directions and horizontal shifts. Most of the interesting
386 properties are to be set in @ref{note-column-interface}"
387 '(merge-differently-dotted note-width))
393 "A custos is a staff context symbol that appears at the end of a
394 staff line with monophonic musical contents (i.e. with a single
395 voice). It anticipates the pitch of the first note of the following
396 line and thus helps the player or singer to manage line breaks
397 during performance, thus enhancing readability of a score.
399 Custodes were frequently used in music notation until the 16th
400 century. There were different appearences for different notation
401 styles. Nowadays, they have survived only in special forms of
402 musical notation such as via the editio vaticana dating back to the
403 beginning of the 20th century.
405 [TODO: add to glossary]"
416 "The dots to go with a notehead/rest. A separate interface, since they
417 are a party in collision resolution.
418 #'direction is the Direction to handle staff-line collisions in."
419 '(direction dot-count))
424 "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
425 '(font-style font-series font-shape font-family font-name
426 font-design-size font-relative-size)
433 "A scheme markup text"
434 '(text align baseline-skip lookup raise kern magnify))
438 'dot-column-interface
439 "Interface that groups dots so they form a column"
446 "Any kind of loudness sign"
454 "A fingering instruction"
460 'separation-spanner-interface
461 "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
466 'text-script-interface
473 'grace-alignment-interface
474 "put grace notes in line"
482 'hara-kiri-group-interface
483 " As Vertical_group_spanner, but keep track of interesting items. If
484 we don't contain any interesting items after linebreaking, then
485 gracefully commit suicide. Objective: don't disgrace Lily by
486 typesetting empty lines in orchestral scores."
487 '( items-worth-living )
492 'line-spanner-interface
493 "Generic line drawn between two objects, eg. for use with glissandi.
494 gap is measured in staff-spaces. "
496 '(gap dash-period dash-length line-thickness type
501 'lyric-hyphen-interface
502 "A centred hyphen is a simple line between lyrics used to divide
503 syllables. The length of the hyphen line should stretch based on the
504 size of the gap between syllables."
506 '( thickness height minimum-length word-space
511 'key-signature-interface
512 "A group of accidentals."
521 'lyric-extender-interface
522 "The extender is a simple line at the baseline of the lyric
523 that helps show the length of a melissima (tied/slurred note)."
533 'lyric-syllable-interface
534 "a single piece of lyrics"
549 'multi-measure-rest-interface
550 "A rest that spans a whole number of measures. For typesetting the
551 numbers, fields from font-interface may be used.
553 padding is the space between number and rest. Measured in staffspace.
556 '( columns expand-limit minimum-width padding))
560 'paper-column-interface
563 '(column-space-strength before-musical-spacing-factor
564 stem-spacing-correction before-grace-spacing-factor when bounded-by-me
565 dir-list shortest-playing-duration shortest-starter-duration
566 contains-grace extra-space stretch-distance ))
571 'spaceable-element-interface
572 "An grob (generally a Paper_column) that takes part in the
582 'rest-collision-interface
583 "Move around ordinary rests (not multi-measure-rests) to avoid
601 'script-column-interface
602 "An interface that sorts scripts according to their @code{script-priority}"
608 'spacing-spanner-interface
609 " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
610 The space taken by a note is determined by the formula
614 where TIME is the amount of time a note occupies. The value of C is
615 chosen such that the smallest space within a measure is
616 arithmetic_basicspace:
618 C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
620 The smallest space is the one following the shortest note in the
621 measure, or the space following a hypothetical 1/8 note. Typically
622 arithmetic_basicspace is set to a value so that the shortest note
623 takes about two noteheads of space (ie, is followed by a notehead of
627 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
629 @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
630 @{ assuming: SHORTEST <= 1/8 @}
632 = arithmetic_multiplier *
633 ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
635 = arithmetic_multiplier * arithmetic_basicspace
637 @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
639 = quartwidth * arithmetic_basicspace
643 arithmetic_basicspace = 2/1 = 2
646 If you want to space your music wider, use something like:
648 arithmetic_basicspace = 4.;
652 maximum-duration-for-spacing
653 arithmetic-basicspace
654 arithmetic-multiplier
660 'staff-symbol-referencer-interface
662 "Object whose Y position is meaning with reference to a staff
663 symbol. Objects that have this interface should include
664 Staff_symbol_referencer::callback in their Y-offset-callback.
673 'staff-symbol-interface
674 "This spanner draws the lines of a staff. The middle line is
684 'stem-tremolo-interface
686 '( stem beam-width beam-thickness beam-space-function
691 'separation-item-interface
692 "Item that computes widths to generate spacing rods.
694 Calc dimensions for the Separating_group_spanner; this has to be
695 an item to get dependencies correct. It can't be an grob_group
696 since these usually are in a different X_group
704 'sustain-pedal-interface
710 'system-start-delimiter-interface
711 "#'style can be bar-line, bracket or brace"
712 '(bar-line-collapse-height brace-collapse-height bracket-collapse-height
713 thickness arch-height arch-angle arch-thick
714 arch-width bracket-thick glyph ))
718 'text-spanner-interface
719 "generic text spanner"
732 "A tie connecting two noteheads.
733 direction = Forced direction for all ties"
750 'tie-column-interface
751 "that sets tie directions in a tied chord"
756 'percent-repeat-interface
757 "Repeats that look like percent signs"
761 'volta-bracket-interface
762 "Volta bracket with number"
772 "A bar line that spans other barlines (typically used to get cross-staff barlines."
777 (primitive-eval (cons
779 (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
783 (define (interface-names) (map (lambda (x) (symbol->string (car x))) all-interfaces))