From: fred Date: Wed, 27 Mar 2002 00:56:50 +0000 (+0000) Subject: lilypond-1.3.134 X-Git-Tag: release/1.5.59~894 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7792880f1cbf8f1a878a9f3184fa874bae06d81d;p=lilypond.git lilypond-1.3.134 --- diff --git a/scm/interface-description.scm b/scm/interface-description.scm index d6571b3a80..8087d3e8b3 100644 --- a/scm/interface-description.scm +++ b/scm/interface-description.scm @@ -15,14 +15,15 @@ ;;; and `objects'. +(define all-interfaces '()) + (define (lily-interface symbol description props) - (list symbol - description - props + (set! all-interfaces (acons symbol (list symbol + description + props) all-interfaces) ) ) - (define (grob-description name . interfaces) (let* ((ifs (cons general-grob-interface interfaces)) (props (map caddr ifs)) @@ -39,273 +40,269 @@ ; (cons 'properties prop-typep-pairs) ))) -(define general-grob-interface - (lily-interface - 'general-grob-interface - "All grobs support this" - '( - X-offset-callbacks - Y-offset-callbacks - X-extent-callback - Y-extent-callback - font-relative-size - extra-offset - interfaces - dependencies - no-spacing-rods - extra-extent-X - extra-extent-Y - minimum-extent-X - minimum-extent-Y - origin - transparent - )) - ) -(define beam-interface - (lily-interface - 'beam-interface - "A beam. +(lily-interface + 'general-grob-interface + "All grobs support this" + '( + X-offset-callbacks + Y-offset-callbacks + X-extent-callback + Y-extent-callback + molecule-callback + font-relative-size + extra-offset + interfaces + dependencies + no-spacing-rods + extra-extent-X + extra-extent-Y + minimum-extent-X + minimum-extent-Y + origin + transparent + )) + + +(lily-interface + 'beam-interface + "A beam. #'thickness= weight of beams, in staffspace " - '(auto-knee-gap - staff-position - height - flag-width-function - damping - default-neutral-direction - thickness - space-function - beamed-stem-shorten - height-quants - vertical-position-quant-function - damping - outer-stem-length-limit - slope-limit - auto-knee-gap - ) + '(auto-knee-gap + staff-position + height + flag-width-function + damping + default-neutral-direction + thickness + space-function + beamed-stem-shorten + height-quants + vertical-position-quant-function + damping + outer-stem-length-limit + slope-limit + auto-knee-gap + ) + ) + + +(lily-interface + 'clef-interface + "A clef sign" + '( + non-default + full-size-change + glyph )) -(define clef-interface - (lily-interface - 'clef-interface - "A clef sign" - '( - non-default - full-size-change - glyph - )) - ) -(define axis-group-interface - (lily-interface - 'axis-group-interface - "a group of coupled grobs" - '( - axes - ))) -(define note-column-interface - (lily-interface - 'note-column-interface - "Stem and noteheads combined" - '( - horizontal-shift - force-hshift - )) - ) +(lily-interface + 'axis-group-interface + "a group of coupled grobs" + '( + axes + )) -(define stem-interface - (lily-interface - 'stem-interface - "A stem" - '( - thickness - beamed-lengths - beamed-minimum-lengths - stem-centered - lengths - beam - stem-shorten - duration-log - beaming - default-neutral-direction - stem-end-position - support-head - heads - direction - stem-length - style - flag-style - dir-forced - ))) +(lily-interface + 'note-column-interface + "Stem and noteheads combined" + '( + horizontal-shift + force-hshift + )) -(define slur-interface - (lily-interface - 'slur-interface - "A slur" - '( - de-uglify-parameters - details - attachment - direction + +(lily-interface + 'stem-interface + "A stem" + '( + thickness + beamed-lengths + beamed-minimum-lengths + stem-centered + lengths + beam + stem-shorten + duration-log + beaming + default-neutral-direction + stem-end-position + support-head + heads + direction + stem-length + style + flag-style + dir-forced + )) + + + +(lily-interface + 'slur-interface + "A slur" + '( + de-uglify-parameters + details + attachment + direction attachment-offset - beautiful - y-free - control-points - extremity-rules - extremity-offset-alist - thickness - dashed + beautiful + y-free + control-points + extremity-rules + extremity-offset-alist + thickness + dashed - ) ) - ) + ) -(define side-position-interface - (lily-interface - 'side-position-interface - "Position a victim object (this one) next to other objects (the support). + + +(lily-interface + 'side-position-interface + "Position a victim object (this one) next to other objects (the support). #'direction = where to put the victim object (left or right?) " - '( + '( side-support direction-source - direction - side-relative-direction - minimum-space - padding - self-alignment-X - self-alignment-Y - - ) - )) + direction + side-relative-direction + minimum-space + padding + self-alignment-X + self-alignment-Y + + ) + ) + + +(lily-interface + 'accidentals-interface + "Accidentals" + '( + left-padding + right-padding + )) -(define accidentals-interface - (lily-interface - 'accidentals-interface - "Accidentals" - '( - left-padding - right-padding - ) - )) -(define line-of-score-interface - (lily-interface - 'line-of-score-interface - "Super grob, parent of all: + +(lily-interface + 'line-of-score-interface + "Super grob, parent of all: The columns of a score that form one line. The toplevel grob. Any grob has a Line_of_score as both X and Y reference point. The Paper_score contains one grob of this type. Control enters the Grob dependency calculation from this single Line_of_score object." - '( - between-system-string - spacing-procedure - before-line-breaking-callback - after-line-breaking-callback - all-elements - columns - ))) - -(define note-head-interface - (lily-interface - 'note-head-interface - "Note head" - '( - style attachment-angle - ) + '( + between-system-string + spacing-procedure + before-line-breaking-callback + after-line-breaking-callback + all-elements + columns )) -(define note-name-interface - (lily-interface - 'note-name-interface - "Note name" - '( - style - ) + +(lily-interface + 'note-head-interface + "Note head" + '( + style attachment-angle note-character + )) + + +(lily-interface + 'note-name-interface + "Note name" + '( + style + )) + + + +(lily-interface + 'rhythmic-head-interface + "Note head or rest" + '( + dot + stem + duration-log )) -(define rhythmic-head-interface - (lily-interface - 'rhythmic-head-interface - "Note head or rest" - '( - dot - stem - duration-log - ))) +(lily-interface + 'rest-interface + "a rest" + '(style )) + + +(lily-interface + 'tuplet-bracket-interface + "A bracket with a number in the middle, used for tuplets." + '( + beams + columns + number-gap + delta-y + tuplet-bracket-visibility + tuplet-number-visibility + parallel-beam + thick + )) -(define rest-interface - (lily-interface - 'rest-interface - "a rest" - '(style ))) -(define tuplet-bracket-interface - (lily-interface - 'tuplet-bracket-interface - "A bracket with a number in the middle, used for tuplets." - '( - beams - columns - number-gap - delta-y - tuplet-bracket-visibility - tuplet-number-visibility - parallel-beam - thick - ) -)) +(lily-interface + 'align-interface + " Order grobs top to bottom/left to right/right to left etc." + '( + stacking-dir + align-dir + threshold + alignment-done + center-element + elements + axes + )) -(define align-interface - (lily-interface - 'align-interface - " Order grobs top to bottom/left to right/right to left etc." - '( - stacking-dir - align-dir - threshold - alignment-done - center-element - elements - axes - ))) - -(define aligned-interface - (lily-interface - 'aligned-interface - "read by align-interface" - '( - minimum-space - extra-space - ))) -(define break-aligned-interface - (lily-interface - 'break-aligned-interface - "Items that are aligned in prefatory matter" - '( - break-align-symbol - visibility-lambda - breakable - ))) +(lily-interface + 'aligned-interface + "read by align-interface" + '( + minimum-space + extra-space + )) -(define chord-name-interface - (lily-interface - 'chord-name-interface - "generate a chord name" - '( pitches inversion bass))) -(define time-signature-interface - (lily-interface - 'time-signature-interface - "A time signature, in different styles. +(lily-interface + 'break-aligned-interface + "Items that are aligned in prefatory matter" + '( + break-align-symbol + visibility-lambda + breakable + )) + + +(lily-interface + 'chord-name-interface + "generate a chord name" + '( pitches inversion bass)) + + +(lily-interface + 'time-signature-interface + "A time signature, in different styles. The following values for 'style are are recognized: @table @samp @@ -332,12 +329,12 @@ object." See also the test-file @file{input/test/time.ly}. " - '(fraction style ))) + '(fraction style )) -(define bar-line-interface - (lily-interface - 'bar-line-interface - "Bar line. + +(lily-interface + 'bar-line-interface + "Bar line. This is a request to print a special bar symbol. It replaces the regular bar symbol with a special @@ -367,41 +364,39 @@ If @var{bartype} is set to @code{\"empty\"} then nothing is printed, but a line break is allowed at that spot. " - '( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function ))) + '( barsize-procedure kern thin-kern hair-thickness thick-thickness glyph bar-size break-glyph-function )) -(define hairpin-interface - (lily-interface - 'hairpin-interface - "hairpin crescendo. + +(lily-interface + 'hairpin-interface + "hairpin crescendo. padding -- horizontal padding. This is useful if a crescendo is set next to a text like `mf' " - '( grow-direction thickness height padding ) - )) + '( grow-direction thickness height padding + )) -(define arpeggio-interface - (lily-interface - 'arpeggio-interface - "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads." - '(stems) - ) - ) -(define note-collision-interface - (lily-interface - 'note-collision-interface - "An object that handles collisions between notes with different +(lily-interface + 'arpeggio-interface + "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads." + '(stems)) + + + +(lily-interface + 'note-collision-interface + "An object that handles collisions between notes with different stem directions and horizontal shifts. Most of the interesting properties are to be set in @ref{note-column-interface}" - '(merge-differently-dotted note-width) - )) + '(merge-differently-dotted note-width)) -(define custos-interface - (lily-interface - 'custos-interface - "A custos is a staff context symbol that appears at the end of a + +(lily-interface + 'custos-interface + "A custos is a staff context symbol that appears at the end of a staff line with monophonic musical contents (i.e. with a single voice). It anticipates the pitch of the first note of the following line and thus helps the player or singer to manage line breaks @@ -415,112 +410,109 @@ properties are to be set in @ref{note-column-interface}" [TODO: add to glossary]" - '(style) -) - ) + '(style)) + + -(define dot-interface (lily-interface 'dots-interface "The dots to go with a notehead/rest. A separate interface, since they - are a party in collision resolution. - #'direction is the Direction to handle staff-line collisions in." - '(direction dot-count) +are a party in collision resolution. +#'direction is the Direction to handle staff-line collisions in." + '(direction dot-count)) - )) -(define font-interface (lily-interface 'font-interface "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)" '(font-style font-series font-shape font-family font-name font-point-size font-relative-size) - )) + ) + -(define text-interface (lily-interface 'text-interface "A scheme markup text" - '(text align baseline-skip lookup raise kern magnify))) + '(text align baseline-skip lookup raise kern magnify)) + -(define dot-column-interface (lily-interface 'dot-column-interface "Interface that groups dots so they form a column" '( ) - )) + ) + -(define dynamic-interface (lily-interface 'dynamic-interface "Any kind of loudness sign" '() - )) + ) + -(define finger-interface (lily-interface 'finger-interface "A fingering instruction" '() - )) + ) + -(define separation-spanner-interface (lily-interface 'separation-spanner-interface "Spanner that containing @code{separation-item-interface} grobs to calculate rods" '() - )) -(define text-script-interface + ) + (lily-interface 'text-script-interface "Any text script" '() - )) + ) + -(define grace-alignment-interface (lily-interface 'grace-alignment-interface "put grace notes in line" '( horizontal-space ) - )) + ) + -(define hara-kiri-group-interface (lily-interface 'hara-kiri-group-interface " As Vertical_group_spanner, but keep track of interesting items. If - we don't contain any interesting items after linebreaking, then - gracefully commit suicide. Objective: don't disgrace Lily by - typesetting empty lines in orchestral scores." +we don't contain any interesting items after linebreaking, then +gracefully commit suicide. Objective: don't disgrace Lily by +typesetting empty lines in orchestral scores." '( items-worth-living ) -)) +) + -(define line-spanner-interface (lily-interface 'line-spanner-interface "Generic line drawn between two objects, eg. for use with glissandi. gap is measured in staff-spaces. " - '(gap dash-period dash-length line-thickness type ) + '(gap dash-period dash-length line-thickness type )) -(define lyric-hyphen-interface + (lily-interface 'lyric-hyphen-interface "A centred hyphen is a simple line between lyrics used to divide syllables. The length of the hyphen line should stretch based on the - size of the gap between syllables." +size of the gap between syllables." - '( thickness height minimum-length word-space ) + '( thickness height minimum-length word-space )) -(define key-signature-interface + (lily-interface 'key-signature-interface "A group of accidentals." @@ -528,50 +520,48 @@ syllables. The length of the hyphen line should stretch based on the c0-position old-accidentals new-accidentals - ))) + )) + -(define lyric-extender-interface (lily-interface 'lyric-extender-interface "The extender is a simple line at the baseline of the lyric - that helps show the length of a melissima (tied/slurred note)." +that helps show the length of a melissima (tied/slurred note)." '( word-space height right-trim-amount - ))) + )) + -(define lyric-syllable-interface (lily-interface 'lyric-syllable-interface "a single piece of lyrics" '( word-space - ))) + )) + -(define mark-interface (lily-interface 'mark-interface "a rehearsal mark" '( - ))) + )) + -(define multi-measure-rest-interface (lily-interface 'multi-measure-rest-interface "A rest that spans a whole number of measures. For typesetting the numbers, fields from font-interface may be used. padding is the space between number and rest. Measured in staffspace. - + " - '( columns expand-limit minimum-width padding ) + '( columns expand-limit minimum-width padding)) - )) -(define paper-column-interface (lily-interface 'paper-column-interface "" @@ -581,9 +571,8 @@ stem-spacing-correction before-grace-spacing-factor when bounded-by-me dir-list shortest-playing-duration shortest-starter-duration contains-grace extra-space stretch-distance )) - ) -(define spaceable-element-interface + (lily-interface 'spaceable-element-interface "An grob (generally a Paper_column) that takes part in the @@ -592,9 +581,9 @@ spacing problem. " minimum-distances ideal-distances dir-list - ))) + )) + -(define rest-collision-interface (lily-interface 'rest-collision-interface "Move around ordinary rests (not multi-measure-rests) to avoid @@ -603,36 +592,36 @@ conflicts." maximum-rest-count minimum-distance elements - ))) + )) + -(define script-interface (lily-interface 'script-interface "" '( script-priority - ))) + )) + -(define script-column-interface (lily-interface 'script-column-interface "An interface that sorts scripts according to their @code{script-priority}" - '( ))) + '( )) + -(define spacing-spanner-interface (lily-interface 'spacing-spanner-interface " SPACE = arithmetic_multiplier * ( C + log2 (TIME) )) The space taken by a note is determined by the formula - + where TIME is the amount of time a note occupies. The value of C is chosen such that the smallest space within a measure is arithmetic_basicspace: - C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) +C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) The smallest space is the one following the shortest note in the measure, or the space following a hypothetical 1/8 note. Typically @@ -641,28 +630,28 @@ takes about two noteheads of space (ie, is followed by a notehead of space): @example - 2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) )) +2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) )) - @{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @} - @{ assuming: SHORTEST <= 1/8 @} +@{ using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) @} +@{ assuming: SHORTEST <= 1/8 @} - = arithmetic_multiplier * - ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) ) += arithmetic_multiplier * +( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) ) - = arithmetic_multiplier * arithmetic_basicspace += arithmetic_multiplier * arithmetic_basicspace - @{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @} +@{ choose: arithmetic_multiplier = 1.0*quartwidth (why?) @} - = quartwidth * arithmetic_basicspace += quartwidth * arithmetic_basicspace - => +=> - arithmetic_basicspace = 2/1 = 2 +arithmetic_basicspace = 2/1 = 2 If you want to space your music wider, use something like: - arithmetic_basicspace = 4.; +arithmetic_basicspace = 4.; @end example" '( @@ -670,9 +659,22 @@ If you want to space your music wider, use something like: arithmetic-basicspace arithmetic-multiplier - ))) + )) + + + (lily-interface + 'staff-symbol-referencer-interface + + "Object whose Y position is meaning with reference to a staff +symbol. Objects that have this interface should include +Staff_symbol_referencer::callback in their Y-offset-callback. +" + '( + staff-symbol + staff-position + )) + -(define staff-symbol-interface (lily-interface 'staff-symbol-interface "This spanner draws the lines of a staff. The middle line is @@ -681,43 +683,43 @@ position 0." staff-space line-count invisible-staff - ))) + )) + -(define stem-tremolo-interface (lily-interface 'stem-tremolo-interface "" '( stem beam-width beam-thickness beam-space-function - ))) + )) + -(define separation-item-interface (lily-interface 'separation-item-interface "Item that computes widths to generate spacing rods. Calc dimensions for the Separating_group_spanner; this has to be - an item to get dependencies correct. It can't be an grob_group - since these usually are in a different X_group +an item to get dependencies correct. It can't be an grob_group +since these usually are in a different X_group " '( elements - ))) + )) + -(define sustain-pedal-interface (lily-interface 'sustain-pedal-interface "" '( - ))) -(define system-start-delimiter-interface + )) + (lily-interface 'system-start-delimiter-interface "#'style can be bar-line, bracket or brace" '(bar-line-collapse-height brace-collapse-height bracket-collapse-height thickness arch-height arch-angle arch-thick - arch-width bracket-thick glyph ))) + arch-width bracket-thick glyph )) + -(define text-spanner-interface (lily-interface 'text-spanner-interface "generic text spanner" @@ -728,10 +730,9 @@ Calc dimensions for the Separating_group_spanner; this has to be edge-height edge-text type - ) )) -(define tie-interface + (lily-interface 'tie-interface "A tie connecting two noteheads. @@ -746,18 +747,18 @@ direction = Forced direction for all ties" x-gap direction minimum-length - ))) + )) + -(define tie-column-interface (lily-interface 'tie-column-interface "that sets tie directions in a tied chord" - '(direction) + '(direction )) -(define volta-bracket-interface + (lily-interface 'volta-bracket-interface "Volta bracket with number" @@ -765,15 +766,21 @@ direction = Forced direction for all ties" bars thickness height - ))) + )) + -(define span-bar-interface (lily-interface 'span-bar-interface "A bar line that spans other barlines (typically used to get cross-staff barlines." '( - ))) + )) + + +(eval (cons + 'begin + (map (lambda (x) (list 'define (car x) (list 'quote (cdr x)))) + all-interfaces))) -;(define urg-miss-last-interface ) +(define interface-names (map (lambda (x) (symbol->string (car x))) all-interfaces))