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 . interfaces)
28 (let* ((ifs (cons 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.
35 (cons 'interfaces syms)
36 (cons 'interface-descriptions ifs)
37 ; (cons 'interface-descriptions (cadr merged))
38 ;; description of the grob itself?
39 ; (cons 'properties prop-typep-pairs)
45 "All grobs support this"
70 #'thickness= weight of beams, in staffspace
82 vertical-position-quant-function
84 outer-stem-length-limit
103 'axis-group-interface
104 "a group of coupled grobs"
111 'note-column-interface
112 "Stem and noteheads combined"
125 beamed-minimum-lengths
157 extremity-offset-alist
167 'side-position-interface
168 "Position a victim object (this one) next to other objects (the support).
169 #'direction = where to put the victim object (left or right?)
175 side-relative-direction
186 'accidentals-interface
198 'line-of-score-interface
199 "Super grob, parent of all:
201 The columns of a score that form one line. The toplevel grob. Any
202 grob has a Line_of_score as both X and Y reference point. The
203 Paper_score contains one grob of this type. Control enters the
204 Grob dependency calculation from this single Line_of_score
207 between-system-string
209 before-line-breaking-callback
210 after-line-breaking-callback
219 '( style stem-attachment-function note-character ))
230 'rhythmic-head-interface
246 'tuplet-bracket-interface
247 "A bracket with a number in the middle, used for tuplets."
252 tuplet-bracket-visibility
253 tuplet-number-visibility
261 " Order grobs top to bottom/left to right/right to left etc."
275 "read by align-interface"
283 'break-aligned-interface
284 "Items that are aligned in prefatory matter"
293 'chord-name-interface
294 "generate a chord name"
295 '( pitches inversion bass))
299 'time-signature-interface
300 "A time signature, in different styles.
301 The following values for 'style are are recognized:
305 4/4 and 2/2 are typeset as C and struck C, respectively. All
306 other time signatures are written with two digits.
309 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
310 typeset with old-style mensuration marks. All other time
311 signatures are written with two digits.
314 All time signatures are typeset with a single
315 digit, e.g. 3/2 is written as 3. (Any symbol starting
316 with the digit @code{1} will do.)
318 @item @code{C}@var{M}@code{/}@var{N},
319 @code{old}@var{M}@code{/}@var{N} or
321 Tells LilyPond to use a specific symbol as time signature,
322 regardless of the actual time signature.
325 See also the test-file @file{input/test/time.ly}.
334 This is a request to print a special bar symbol. It replaces the
335 regular bar symbol with a special
336 symbol. The argument @var{bartype} is a string which specifies the
337 kind of bar to print. Options are @code{\":|\"}
338 @cindex \"|A@@@code{:|}
341 @cindex \"|B@@@code{|:}
343 @cindex \"|C@@@code{:|:}
346 @cindex \"|D@@@code{||}
348 @cindex \"|E@@@code{|.}
351 @cindex \"|F@@@code{.|}
353 @cindex \"|G@@@code{.|.}
356 These produce, respectively, a right repeat, a left repeat, a double
357 repeat, a double bar, a start bar, an end bar, and a thick double bar.
358 If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
359 but a line break is allowed at that spot.
362 '(bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
369 padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
372 '( grow-direction thickness height padding
378 "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
379 '(stems arpeggio-direction))
384 'note-collision-interface
385 "An object that handles collisions between notes with different
386 stem directions and horizontal shifts. Most of the interesting
387 properties are to be set in @ref{note-column-interface}"
388 '(merge-differently-dotted note-width))
394 "A custos is a staff context symbol that appears at the end of a
395 staff line with monophonic musical contents (i.e. with a single
396 voice). It anticipates the pitch of the first note of the following
397 line and thus helps the player or singer to manage line breaks
398 during performance, thus enhancing readability of a score.
400 Custodes were frequently used in music notation until the 16th
401 century. There were different appearences for different notation
402 styles. Nowadays, they have survived only in special forms of
403 musical notation such as via the editio vaticana dating back to the
404 beginning of the 20th century.
406 [TODO: add to glossary]"
417 "The dots to go with a notehead/rest. A separate interface, since they
418 are a party in collision resolution.
419 #'direction is the Direction to handle staff-line collisions in."
420 '(direction dot-count))
425 "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
426 '(font-style font-series font-shape font-family font-name
427 font-design-size font-relative-size)
434 "A scheme markup text"
435 '(text align baseline-skip lookup raise kern magnify))
439 'dot-column-interface
440 "Interface that groups dots so they form a column"
447 "Any kind of loudness sign"
455 "A fingering instruction"
461 'separation-spanner-interface
462 "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
467 'text-script-interface
474 'grace-alignment-interface
475 "put grace notes in line"
483 'hara-kiri-group-interface
484 " As Vertical_group_spanner, but keep track of interesting items. If
485 we don't contain any interesting items after linebreaking, then
486 gracefully commit suicide. Objective: don't disgrace Lily by
487 typesetting empty lines in orchestral scores."
488 '( items-worth-living )
493 'line-spanner-interface
494 "Generic line drawn between two objects, eg. for use with glissandi.
495 gap is measured in staff-spaces. "
497 '(gap dash-period dash-length line-thickness type
502 'lyric-hyphen-interface
503 "A centred hyphen is a simple line between lyrics used to divide
504 syllables. The length of the hyphen line should stretch based on the
505 size of the gap between syllables."
507 '( thickness height minimum-length word-space
512 'key-signature-interface
513 "A group of accidentals."
522 'lyric-extender-interface
523 "The extender is a simple line at the baseline of the lyric
524 that helps show the length of a melissima (tied/slurred note)."
534 'lyric-syllable-interface
535 "a single piece of lyrics"
539 ignore-length-mismatch
554 'multi-measure-rest-interface
555 "A rest that spans a whole number of measures. For typesetting the
556 numbers, fields from font-interface may be used.
558 padding is the space between number and rest. Measured in staffspace.
561 '( columns expand-limit minimum-width padding))
565 'paper-column-interface
568 '(column-space-strength before-musical-spacing-factor
569 stem-spacing-correction before-grace-spacing-factor when bounded-by-me
570 dir-list shortest-playing-duration shortest-starter-duration
571 contains-grace extra-space stretch-distance ))
577 "A porrectus ligature, joining two note heads into a single grob."
583 'spaceable-element-interface
584 "An grob (generally a Paper_column) that takes part in the
594 'rest-collision-interface
595 "Move around ordinary rests (not multi-measure-rests) to avoid
613 'script-column-interface
614 "An interface that sorts scripts according to their @code{script-priority}"
620 'spacing-spanner-interface
621 " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
622 The space taken by a note is determined by the formula
626 where TIME is the amount of time a note occupies. The value of C is
627 chosen such that the smallest space within a measure is
628 arithmetic_basicspace:
630 C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
632 The smallest space is the one following the shortest note in the
633 measure, or the space following a hypothetical 1/8 note. Typically
634 arithmetic_basicspace is set to a value so that the shortest note
635 takes about two noteheads of space (ie, is followed by a notehead of
639 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
641 @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
642 @{ assuming: SHORTEST <= 1/8 @}
644 = arithmetic_multiplier *
645 ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
647 = arithmetic_multiplier * arithmetic_basicspace
649 @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
651 = quartwidth * arithmetic_basicspace
655 arithmetic_basicspace = 2/1 = 2
658 If you want to space your music wider, use something like:
660 arithmetic_basicspace = 4.;
664 maximum-duration-for-spacing
665 arithmetic-basicspace
666 arithmetic-multiplier
672 'staff-symbol-referencer-interface
674 "Object whose Y position is meaning with reference to a staff
675 symbol. Objects that have this interface should include
676 Staff_symbol_referencer::callback in their Y-offset-callback.
685 'staff-symbol-interface
686 "This spanner draws the lines of a staff. The middle line is
696 'stem-tremolo-interface
698 '( stem beam-width beam-thickness beam-space-function
703 'separation-item-interface
704 "Item that computes widths to generate spacing rods.
706 Calc dimensions for the Separating_group_spanner; this has to be
707 an item to get dependencies correct. It can't be an grob_group
708 since these usually are in a different X_group
716 'sustain-pedal-interface
722 'system-start-delimiter-interface
723 "#'style can be bar-line, bracket or brace"
724 '(bar-line-collapse-height brace-collapse-height bracket-collapse-height
725 thickness arch-height arch-angle arch-thick
726 arch-width bracket-thick glyph ))
730 'text-spanner-interface
731 "generic text spanner"
744 "A tie connecting two noteheads.
745 direction = Forced direction for all ties"
762 'tie-column-interface
763 "that sets tie directions in a tied chord"
768 'percent-repeat-interface
769 "Repeats that look like percent signs"
773 'volta-bracket-interface
774 "Volta bracket with number"
784 "A bar line that spans other barlines (typically used to get cross-staff barlines."
789 (primitive-eval (cons
791 (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
795 (define (interface-names) (map (lambda (x) (symbol->string (car x))) all-interfaces))