2 ; should include default value?
4 ;;; ::::::: should generate documentation for score elements from here.
6 (define (property-description symbol type? description)
7 (list symbol type? description))
9 (define (lily-interface symbol description props)
16 (define (merge-interfaces ifs)
18 (apply append (map car ifs))
19 (apply append (map cadr ifs))
20 (apply append (map caddr ifs))
23 (define (element-description name . interfaces)
24 (let ((merged (merge-interfaces interfaces)))
25 (list (cons 'separator "\n\n\n") ;easy printing.
27 (cons 'interfaces (car merged))
28 ; (cons 'interface-descriptions (cadr merged))
29 ;; description of the element itself?
30 (cons 'properties (caddr merged))
35 (define general-element-interface
37 'general-element-interface
38 "All elements support this"
39 (list (property-description 'X-offset-callbacks list? "")
40 (property-description 'Y-offset-callbacks list? "")
41 (property-description 'X-extent-callback procedure? "")
42 (property-description 'Y-extent-callback procedure? "")
43 (property-description 'font-size integer? "")
47 (define beam-interface
52 (property-description 'y-position number? "position of left edge")
53 (property-description 'height number? "dy")
54 (property-description 'flag-width-function procedure? "")
55 (property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams ")
56 (property-description 'default-neutral-direction dir? "which
57 direction to choose if we're in the middle of the staff ")
58 (property-description 'thickness number? "weight of beams, in staffspace")
59 (property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace)")
60 (property-description 'beamed-stem-shorten number? "")
61 (property-description 'height-quants number? "")
62 (property-description 'vertical-position-quant-function procedure? "")
63 (property-description 'dir-function procedure? "")
64 (property-description 'damping number? "damping factor.")
65 (property-description 'outer-stem-length-limit number? "catch
66 suspect beam slopes, set slope to zero if outer stem is lengthened
67 more than this (in staffspace)")
68 (property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
76 (define clef-interface
81 (property-description 'non-default boolean? "not set because of existence of a bar?")
82 (property-description 'change boolean? "is this a change clef (smaller size)?")
83 (property-description 'glyph string? "a string determining what glyph is typeset")
87 (define axis-group-interface
90 "a group of coupled elements"
92 (property-description 'axes list? "list of axis (number) in which this group works")
95 (define note-column-interface
97 'note-column-interface
98 "Stem and noteheads combined"
100 (property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.")
101 (property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.")
102 (property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count.")
106 (define stem-interface
111 (property-description 'thickness number? "")
112 (property-description 'beamed-lengths list? "")
113 (property-description 'beamed-minimum-lengths list? "")
114 (property-description 'lengths list? "")
115 (property-description 'stem-shorten list? "")
116 (property-description 'default-neutral-direction dir? "")
117 (property-description 'direction dir? "")
118 (property-description 'stem-length number? "")
119 (property-description 'style string? "") ; symbol!?
120 (property-description 'flag-style string? "") ; symbol!?
121 (property-description 'X-offset-callbacks list? "")
125 (define slur-interface
130 (property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.")
131 (property-description 'details list? "alist containing contaning a few magic constants.")
132 (property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end")
133 (property-description 'direction dir? "up or down?")
134 (property-description 'y-free number? "? ")
135 (property-description 'control-points list? "")
136 (property-description 'extremity-rules list? "")
137 (property-description 'extremity-offset-alist list? "")
138 (property-description 'thickness list? "")
139 (property-description 'dash number? "number representing the length of the dashes.")
144 (define side-position-interface
146 'side-position-interface
147 "put an element next to another one."
149 (property-description 'direction dir? "where to put the victim object (left or right?)")
150 (property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
151 (property-description 'minimum-space number? "minimum distance that the victim should move (after padding)")
152 (property-description 'padding number? "add this much extra space between victim and support")
153 (property-description 'self-alignment-X number? "real number: -1 = left aligned, 0 = center, 1 right-aligned in X direction. Set to an element pointer, if you want that element to be the center. ")
154 (property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis")
159 (define accidentals-interface
161 'accidentals-interface
164 (property-description 'left-padding number? "space left of accs")
165 (property-description 'right-padding number? "space right of accs")
169 (define note-head-interface
174 (property-description 'style symbol? "symbol that sets note head style")
179 (define rhythmic-head-interface
181 'rhythmic-head-interface
184 (property-description 'dot ly-element? "reference to Dots object.")
185 (property-description 'stem ly-element? "pointer to Stem object")
186 (property-description 'duration-log integer? "2-log of the notehead duration")
189 (define rest-interface
194 (property-description 'style string? "string specifying glyph style"))))
196 (define tuplet-bracket-interface
198 'tuplet-bracket-interface
199 "A bracket with a number in the middle"
201 (property-description 'beams list? "list of beam ptrs.")
202 (property-description 'columns list? " list of note-columns.")
203 (property-description 'number-gap number? "")
204 (property-description 'delta-y number? "")
205 (property-description 'thick number? "")
210 (define align-interface
213 " Order elements top to bottom/left to right/right to left etc."
215 (property-description 'stacking-dir dir? "stack contents of elements in which direction ?")
216 (property-description 'align-dir dir? "Which side to align? -1: left side, 0: centered around center-element if not nil, or around center of width), 1: right side")
217 (property-description 'threshold pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
218 (property-description 'alignment-done boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)")
219 (property-description 'center-element ly-element? "element which will be at the
220 center of the group after aligning (when using
221 Align_interface::center_on_element). The center element should have
222 this object as a reference point.")
223 (property-description 'elements list? "to be aligned elements ")
224 (property-description 'axes list? "list of axis numbers. Should contain only one number.")
227 (define aligned-interface
230 "read by align-interface"
232 (property-description 'minimum-space pair? "(cons LEFT RIGHT)")
233 (property-description 'extra-space pair? "(cons LEFT RIGHT)")
236 (define break-aligned-interface
238 'break-aligned-interface
239 "Items that are aligned in prefatory matter"
241 (property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
242 (property-description 'visibility-lambda procedure? "")
243 (property-description 'breakable boolean? "")
246 (define chord-name-interface
248 'chord-name-interface
252 (define time-signature-interface
254 'time-signature-interface
255 "A time signature, in different styles"
257 (property-description 'fraction pair? "")
258 (property-description 'style string? "")
261 (define bar-line-interface
266 (property-description 'barsize-procedure procedure? "")
267 (property-description 'kern number? "")
268 (property-description 'thin-kern number? "")
269 (property-description 'hair-thickness number? "")
270 (property-description 'thick-thickness number? "")
271 (property-description 'glyph string? "")
272 (property-description 'bar-size number? "")
273 (property-description 'break-glyph-function procedure? "")
279 (define text-spanner-interface
281 'text-spanner-interface
282 "generic text spanner"
284 (property-description 'dash-period number? "")
285 (property-description 'dash-length number? "")
286 (property-description 'line-thickness number? "")
287 (property-description 'edge-height pair? "(leftheight . rightheight)")
288 (property-description 'edge-text pair? "(lefttext . righttext)")
289 (property-description 'text-style string? "") ; SYMBOL!!?
290 (property-description 'type string? "line, dashed-line or dotted-line") ; SYMBOL!!?
294 (define hairpin-interface
299 (property-description 'grow-direction dir? "")
300 (property-description 'thickness number? "")
301 (property-description 'height number? "")
305 (define arpeggio-interface
310 (property-description 'stems list? "list of stem objects, corresponding to the notes that the arp has to be before.")
315 (define note-collision-interface
317 'note-collision-interface
320 (property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.")
322 (define dot-interface
325 "The dots to go with a notehead/rest. A separate interface, since they
326 are a party in collision resolution."
328 (property-description 'dot-count integer? "number of dots")
331 (define text-interface
336 (property-description 'text string? "")
337 (property-description 'style string? "")
341 (define dot-column-interface
343 'dot-column-interface
348 (define dynamic-interface
351 "Any kind of loudness sign"
356 (define finger-interface
359 "Any kind of loudness sign"
363 (define separation-spanner-interface
365 'separation-spanner-interface
369 (define text-script-interface
371 'text-script-interface
376 (define grace-alignment-interface
378 'grace-alignment-interface
379 "put grace notes in line"
381 (property-description 'horizontal-space number? "amount of space to add after a note (in staff-space)")
385 (define hara-kiri-group-interface
387 'hara-kiri-group-interface
391 (define lyric-hyphen-interface
393 'lyric-hyphen-interface
394 "A centred hyphen is a simple line between lyrics used to divide
395 syllables. The length of the hyphen line should stretch based on the
396 size of the gap between syllables."
399 (property-description 'thickness number? "thickness of line (in stafflinethickness)")
400 (property-description 'height number? "vertical offset (in staffspace)")
402 (property-description 'minimum-length number? "try to make the hyphens at least this long. Also works as a scaling parameter for the length")
403 (property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics)")
406 (define key-signature-interface
408 'key-signature-interface
409 "A group of accidentals."
411 (property-description 'c0-position integer? "integer indicating the position of central C?")
412 (property-description 'old-accidentals list? "list of (pitch, accidental) pairs")
413 (property-description 'new-accidentals list? "list of (pitch, accidental) pairs")
416 (define lyric-extender-interface
418 'lyric-extender-interface
419 "The extender is a simple line at the baseline of the lyric
420 that helps show the length of a melissima (tied/slurred note)."
422 (property-description 'word-space number? "")
423 (property-description 'height number? "in stafflinethickness")
424 (property-description 'right-trim-amount number? "")
428 (define lyric-syllable-interface
430 'lyric-syllable-interface
433 (property-description 'word-space number? "")
437 (define mark-interface
444 (define multi-measure-rest-interface
446 'multi-measure-rest-interface
450 (property-description 'columns list? "list of paper-columns")
451 (property-description 'expand-limit integer? "int : max number of measures expanded in church rests")
452 (property-description 'minimum-width number? "Real in staffspace")
453 (property-description 'padding number? "staffspace")
456 (define paper-column-interface
458 'paper-column-interface
461 (property-description 'dir-list list? "list of stem directions")
462 (property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.")
463 (property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.")
464 (property-description 'contains-grace boolean? "Used to widen entries for grace notes.")
465 (property-description 'extra-space pair? "pair of distances")
466 (property-description 'stretch-distance pair? "pair of distances")
469 (define spaceable-element-interface
471 'spaceable-element-interface
474 (property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs)")
475 (property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs")
476 (property-description 'dir-list list? "list of stem directions.")
479 (define rest-collision-interface
481 'rest-collision-interface
484 (property-description 'maximum-rest-count integer? "")
485 (property-description 'minimum-distance number? "")
488 (define script-interface
493 (property-description 'script-priority number? "")
496 (define script-column-interface
498 'script-column-interface
503 (define spacing-spanner-interface
505 'spacing-spanner-interface
508 (property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
511 (define staff-symbol-interface
513 'staff-symbol-interface
514 "This spanner draws the lines of a staff. The middle line is
517 (property-description 'staff-space number? "")
518 (property-description 'line-count integer? "")
521 (define stem-tremolo-interface
523 'stem-tremolo-interface
526 (property-description 'stem ly-element? "pointer to the stem object.")
527 (property-description 'beam-width number? "")
528 (property-description 'beam-thickness number? "")
529 (property-description 'beam-space-function procedure? "")
532 (define separation-item-interface
534 'separation-item-interface
539 (define sustain-pedal-interface
541 'sustain-pedal-interface
545 (define system-start-delimiter
547 'system-start-delimiter
550 (property-description 'collapse-height number? "")
551 (property-description 'thickness number? "")
552 (property-description 'arch-height number? "")
553 (property-description 'arch-angle number? "")
554 (property-description 'arch-thick number? "")
555 (property-description 'arch-width number? "")
556 (property-description 'bracket-thick number? "")
557 (property-description 'bracket-width number? "")
560 (define text-script-interface
562 'text-script-interface
568 (define tie-interface
573 (property-description 'staffline-clearance number? "")
574 (property-description 'heads pair? "pair of element pointers, pointing to the two heads of the tie. ")
575 (property-description 'details list? "")
576 (property-description 'thickness number? "")
577 (property-description 'x-gap number? "")
578 (property-description 'minimum-length number? "")
583 (define tie-column-interface
585 'tie-column-interface
590 (define volta-bracket-interface
592 'volta-bracket-interface
593 "Volta bracket with number"
595 (property-description 'bars list? "list of barline ptrs.")
596 (property-description 'thickness number? "in stafflinethickness")
597 (property-description 'height number? "in staffspace ")
600 (define span-bar-interface