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 ;;; TODO: this should be done through C++ macros, in order to have
19 ;;; tighter coupling between the C++ and its doco.
21 (define all-interfaces '())
23 (define (lily-interface symbol description props)
24 (set! all-interfaces (acons symbol (list symbol
26 props) all-interfaces)
30 (define (grob-description . interfaces)
31 (let* ((ifs (cons grob-interface interfaces))
32 (props (map caddr ifs))
33 ; (prop-typep-pairs (map (lambda (x) (cons (car x) (cadr x)))
34 ; (apply append props)))
37 (list (cons 'separator "\n\n\n") ;easy printing.
38 (cons 'interfaces syms)
39 (cons 'interface-descriptions ifs)
40 ; (cons 'interface-descriptions (cadr merged))
41 ;; description of the grob itself?
42 ; (cons 'properties prop-typep-pairs)
48 "All grobs support this"
73 #'thickness= weight of beams, in staffspace
85 vertical-position-quant-function
87 outer-stem-length-limit
94 'staff-spacing-interface
100 'note-spacing-interface
117 'axis-group-interface
118 "a group of coupled grobs"
125 'note-column-interface
126 "Stem and noteheads combined"
140 beamed-minimum-lengths
172 extremity-offset-alist
182 'side-position-interface
183 "Position a victim object (this one) next to other objects (the support).
184 #'direction = where to put the victim object (left or right?)
187 side-support-elements
190 side-relative-direction
201 'accidentals-interface
213 'line-of-score-interface
214 "Super grob, parent of all:
216 The columns of a score that form one line. The toplevel grob. Any
217 grob has a Line_of_score as both X and Y reference point. The
218 Paper_score contains one grob of this type. Control enters the
219 Grob dependency calculation from this single Line_of_score
222 between-system-string
224 before-line-breaking-callback
225 after-line-breaking-callback
234 '( style stem-attachment-function ))
245 'rhythmic-head-interface
261 'tuplet-bracket-interface
262 "A bracket with a number in the middle, used for tuplets."
267 tuplet-bracket-visibility
268 tuplet-number-visibility
276 " Order grobs top to bottom/left to right/right to left etc."
290 "read by align-interface"
298 'break-aligned-interface
299 "Items that are aligned in prefatory matter"
309 'chord-name-interface
310 "generate a chord name"
311 '( pitches inversion bass))
315 'time-signature-interface
316 "A time signature, in different styles.
317 The following values for 'style are are recognized:
321 4/4 and 2/2 are typeset as C and struck C, respectively. All
322 other time signatures are written with two digits.
325 2/2, 3/2, 2/4, 3/4, 4/4, 6/4, 9/4, 4/8, 6/8 and 9/8 are
326 typeset with old-style mensuration marks. All other time
327 signatures are written with two digits.
330 All time signatures are typeset with a single
331 digit, e.g. 3/2 is written as 3. (Any symbol starting
332 with the digit @code{1} will do.)
334 @item @code{C}@var{M}@code{/}@var{N},
335 @code{old}@var{M}@code{/}@var{N} or
337 Tells LilyPond to use a specific symbol as time signature,
338 regardless of the actual time signature.
341 See also the test-file @file{input/test/time.ly}.
350 This is a request to print a special bar symbol. It replaces the
351 regular bar symbol with a special
352 symbol. The argument @var{bartype} is a string which specifies the
353 kind of bar to print. Options are @code{\":|\"}
354 @cindex \"|A@@@code{:|}
357 @cindex \"|B@@@code{|:}
359 @cindex \"|C@@@code{:|:}
362 @cindex \"|D@@@code{||}
364 @cindex \"|E@@@code{|.}
367 @cindex \"|F@@@code{.|}
369 @cindex \"|G@@@code{.|.}
372 These produce, respectively, a right repeat, a left repeat, a double
373 repeat, a double bar, a start bar, an end bar, and a thick double bar.
374 If @var{bartype} is set to @code{\"empty\"} then nothing is printed,
375 but a line break is allowed at that spot.
378 '(bar-size-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))
385 padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf'
388 '( grow-direction thickness height padding
394 "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads."
395 '(stems arpeggio-direction))
400 'note-collision-interface
401 "An object that handles collisions between notes with different
402 stem directions and horizontal shifts. Most of the interesting
403 properties are to be set in @ref{note-column-interface}"
404 '(merge-differently-dotted note-width))
410 "A custos is a staff context symbol that appears at the end of a
411 staff line with monophonic musical contents (i.e. with a single
412 voice). It anticipates the pitch of the first note of the following
413 line and thus helps the player or singer to manage line breaks
414 during performance, thus enhancing readability of a score.
416 Custodes were frequently used in music notation until the 16th
417 century. There were different appearences for different notation
418 styles. Nowadays, they have survived only in special forms of
419 musical notation such as via the editio vaticana dating back to the
420 beginning of the 20th century.
422 [TODO: add to glossary]"
433 "The dots to go with a notehead/rest. A separate interface, since they
434 are a party in collision resolution.
435 #'direction is the Direction to handle staff-line collisions in."
436 '(direction dot-count))
441 "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
442 '(font-style font-series font-shape font-family font-name
443 font-design-size font-relative-size)
450 "A scheme markup text"
451 '(text align baseline-skip lookup raise kern magnify))
455 'dot-column-interface
456 "Interface that groups dots so they form a column"
463 "Any kind of loudness sign"
471 "A fingering instruction"
477 'separation-spanner-interface
478 "Spanner that containing @code{separation-item-interface} grobs to calculate rods"
483 'text-script-interface
490 'grace-alignment-interface
491 "put grace notes in line"
499 'hara-kiri-group-interface
500 " As Vertical_group_spanner, but keep track of interesting items. If
501 we don't contain any interesting items after linebreaking, then
502 gracefully commit suicide. Objective: don't disgrace Lily by
503 typesetting empty lines in orchestral scores."
504 '( items-worth-living )
509 'line-spanner-interface
510 "Generic line drawn between two objects, eg. for use with glissandi.
511 gap is measured in staff-spaces. "
513 '(gap dash-period dash-length line-thickness type
518 'lyric-hyphen-interface
519 "A centred hyphen is a simple line between lyrics used to divide
520 syllables. The length of the hyphen line should stretch based on the
521 size of the gap between syllables."
523 '( thickness height minimum-length word-space
528 'key-signature-interface
529 "A group of accidentals."
538 'lyric-extender-interface
539 "The extender is a simple line at the baseline of the lyric
540 that helps show the length of a melissima (tied/slurred note)."
550 'lyric-syllable-interface
551 "a single piece of lyrics"
555 ignore-length-mismatch
570 'multi-measure-rest-interface
571 "A rest that spans a whole number of measures. For typesetting the
572 numbers, fields from font-interface may be used.
574 padding is the space between number and rest. Measured in staffspace.
577 '( columns expand-limit minimum-width padding))
581 'paper-column-interface
584 '(column-space-strength before-musical-spacing-factor
585 stem-spacing-correction before-grace-spacing-factor when bounded-by-me
586 dir-list shortest-playing-duration shortest-starter-duration
587 contains-grace extra-space stretch-distance ))
591 'piano-pedal-interface
599 "A porrectus ligature, joining two note heads into a single grob."
605 'spaceable-element-interface
606 "An grob (generally a Paper_column) that takes part in the
616 'rest-collision-interface
617 "Move around ordinary rests (not multi-measure-rests) to avoid
635 'script-column-interface
636 "An interface that sorts scripts according to their @code{script-priority}"
642 'spacing-spanner-interface
643 " SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
644 The space taken by a note is determined by the formula
648 where TIME is the amount of time a note occupies. The value of C is
649 chosen such that the smallest space within a measure is
650 arithmetic_basicspace:
652 C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8))
654 The smallest space is the one following the shortest note in the
655 measure, or the space following a hypothetical 1/8 note. Typically
656 arithmetic_basicspace is set to a value so that the shortest note
657 takes about two noteheads of space (ie, is followed by a notehead of
661 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
663 @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @}
664 @{ assuming: SHORTEST <= 1/8 @}
666 = arithmetic_multiplier *
667 ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
669 = arithmetic_multiplier * arithmetic_basicspace
671 @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @}
673 = quartwidth * arithmetic_basicspace
677 arithmetic_basicspace = 2/1 = 2
680 If you want to space your music wider, use something like:
682 arithmetic_basicspace = 4.;
687 shortest-duration-space
693 'staff-symbol-referencer-interface
695 "Object whose Y position is meaning with reference to a staff
696 symbol. Objects that have this interface should include
697 Staff_symbol_referencer::callback in their Y-offset-callback.
706 'staff-symbol-interface
707 "This spanner draws the lines of a staff. The middle line is
717 'stem-tremolo-interface
719 '( stem beam-width beam-thickness beam-space-function
724 'separation-item-interface
725 "Item that computes widths to generate spacing rods.
727 Calc dimensions for the Separating_group_spanner; this has to be
728 an item to get dependencies correct. It can't be an grob_group
729 since these usually are in a different X_group
737 'system-start-delimiter-interface
738 "#'style can be bar-line, bracket or brace"
739 '(bar-line-collapse-height brace-collapse-height bracket-collapse-height
740 thickness arch-height arch-angle arch-thick
741 arch-width bracket-thick glyph ))
745 'text-spanner-interface
746 "generic text spanner"
760 "A tie connecting two noteheads.
761 direction = Forced direction for all ties"
778 'tie-column-interface
779 "that sets tie directions in a tied chord"
784 'percent-repeat-interface
785 "Repeats that look like percent signs"
789 'volta-bracket-interface
790 "Volta bracket with number"
800 "A bar line that spans other barlines (typically used to get cross-staff barlines."
805 (primitive-eval (cons
807 (map (lambda (x) (list 'define (car x) (list 'quote (cdr x))))
811 (define (interface-names) (map (lambda (x) (symbol->string (car x))) all-interfaces))