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")
178 (define note-name-interface
183 (property-description 'style symbol? "symbol that sets note name style")
188 (define rhythmic-head-interface
190 'rhythmic-head-interface
193 (property-description 'dot ly-element? "reference to Dots object.")
194 (property-description 'stem ly-element? "pointer to Stem object")
195 (property-description 'duration-log integer? "2-log of the notehead duration")
198 (define rest-interface
203 (property-description 'style string? "string specifying glyph style"))))
205 (define tuplet-bracket-interface
207 'tuplet-bracket-interface
208 "A bracket with a number in the middle"
210 (property-description 'beams list? "list of beam ptrs.")
211 (property-description 'columns list? " list of note-columns.")
212 (property-description 'number-gap number? "")
213 (property-description 'delta-y number? "")
214 (property-description 'thick number? "")
219 (define align-interface
222 " Order elements top to bottom/left to right/right to left etc."
224 (property-description 'stacking-dir dir? "stack contents of elements in which direction ?")
225 (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")
226 (property-description 'threshold pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
227 (property-description 'alignment-done boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)")
228 (property-description 'center-element ly-element? "element which will be at the
229 center of the group after aligning (when using
230 Align_interface::center_on_element). The center element should have
231 this object as a reference point.")
232 (property-description 'elements list? "to be aligned elements ")
233 (property-description 'axes list? "list of axis numbers. Should contain only one number.")
236 (define aligned-interface
239 "read by align-interface"
241 (property-description 'minimum-space pair? "(cons LEFT RIGHT)")
242 (property-description 'extra-space pair? "(cons LEFT RIGHT)")
245 (define break-aligned-interface
247 'break-aligned-interface
248 "Items that are aligned in prefatory matter"
250 (property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
251 (property-description 'visibility-lambda procedure? "")
252 (property-description 'breakable boolean? "")
255 (define chord-name-interface
257 'chord-name-interface
261 (define time-signature-interface
263 'time-signature-interface
264 "A time signature, in different styles"
266 (property-description 'fraction pair? "")
267 (property-description 'style string? "")
270 (define bar-line-interface
275 (property-description 'barsize-procedure procedure? "")
276 (property-description 'kern number? "")
277 (property-description 'thin-kern number? "")
278 (property-description 'hair-thickness number? "")
279 (property-description 'thick-thickness number? "")
280 (property-description 'glyph string? "")
281 (property-description 'bar-size number? "")
282 (property-description 'break-glyph-function procedure? "")
288 (define text-spanner-interface
290 'text-spanner-interface
291 "generic text spanner"
293 (property-description 'dash-period number? "")
294 (property-description 'dash-length number? "")
295 (property-description 'line-thickness number? "")
296 (property-description 'edge-height pair? "(leftheight . rightheight)")
297 (property-description 'edge-text pair? "(lefttext . righttext)")
298 (property-description 'text-style string? "") ; SYMBOL!!?
299 (property-description 'type string? "line, dashed-line or dotted-line") ; SYMBOL!!?
303 (define hairpin-interface
308 (property-description 'grow-direction dir? "")
309 (property-description 'thickness number? "")
310 (property-description 'height number? "")
314 (define arpeggio-interface
319 (property-description 'stems list? "list of stem objects, corresponding to the notes that the arp has to be before.")
324 (define note-collision-interface
326 'note-collision-interface
329 (property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.")
331 (define dot-interface
334 "The dots to go with a notehead/rest. A separate interface, since they
335 are a party in collision resolution."
337 (property-description 'dot-count integer? "number of dots")
340 (define text-interface
345 (property-description 'text string? "")
346 (property-description 'style string? "")
350 (define dot-column-interface
352 'dot-column-interface
357 (define dynamic-interface
360 "Any kind of loudness sign"
365 (define finger-interface
368 "Any kind of loudness sign"
372 (define separation-spanner-interface
374 'separation-spanner-interface
378 (define text-script-interface
380 'text-script-interface
385 (define grace-alignment-interface
387 'grace-alignment-interface
388 "put grace notes in line"
390 (property-description 'horizontal-space number? "amount of space to add after a note (in staff-space)")
394 (define hara-kiri-group-interface
396 'hara-kiri-group-interface
400 (define lyric-hyphen-interface
402 'lyric-hyphen-interface
403 "A centred hyphen is a simple line between lyrics used to divide
404 syllables. The length of the hyphen line should stretch based on the
405 size of the gap between syllables."
408 (property-description 'thickness number? "thickness of line (in stafflinethickness)")
409 (property-description 'height number? "vertical offset (in staffspace)")
411 (property-description 'minimum-length number? "try to make the hyphens at least this long. Also works as a scaling parameter for the length")
412 (property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics)")
415 (define key-signature-interface
417 'key-signature-interface
418 "A group of accidentals."
420 (property-description 'c0-position integer? "integer indicating the position of central C?")
421 (property-description 'old-accidentals list? "list of (pitch, accidental) pairs")
422 (property-description 'new-accidentals list? "list of (pitch, accidental) pairs")
425 (define lyric-extender-interface
427 'lyric-extender-interface
428 "The extender is a simple line at the baseline of the lyric
429 that helps show the length of a melissima (tied/slurred note)."
431 (property-description 'word-space number? "")
432 (property-description 'height number? "in stafflinethickness")
433 (property-description 'right-trim-amount number? "")
437 (define lyric-syllable-interface
439 'lyric-syllable-interface
442 (property-description 'word-space number? "")
446 (define mark-interface
453 (define multi-measure-rest-interface
455 'multi-measure-rest-interface
459 (property-description 'columns list? "list of paper-columns")
460 (property-description 'expand-limit integer? "int : max number of measures expanded in church rests")
461 (property-description 'minimum-width number? "Real in staffspace")
462 (property-description 'padding number? "staffspace")
465 (define paper-column-interface
467 'paper-column-interface
470 (property-description 'dir-list list? "list of stem directions")
471 (property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.")
472 (property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.")
473 (property-description 'contains-grace boolean? "Used to widen entries for grace notes.")
474 (property-description 'extra-space pair? "pair of distances")
475 (property-description 'stretch-distance pair? "pair of distances")
478 (define spaceable-element-interface
480 'spaceable-element-interface
483 (property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs)")
484 (property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs")
485 (property-description 'dir-list list? "list of stem directions.")
488 (define rest-collision-interface
490 'rest-collision-interface
493 (property-description 'maximum-rest-count integer? "")
494 (property-description 'minimum-distance number? "")
497 (define script-interface
502 (property-description 'script-priority number? "")
505 (define script-column-interface
507 'script-column-interface
512 (define spacing-spanner-interface
514 'spacing-spanner-interface
517 (property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
520 (define staff-symbol-interface
522 'staff-symbol-interface
523 "This spanner draws the lines of a staff. The middle line is
526 (property-description 'staff-space number? "")
527 (property-description 'line-count integer? "")
530 (define stem-tremolo-interface
532 'stem-tremolo-interface
535 (property-description 'stem ly-element? "pointer to the stem object.")
536 (property-description 'beam-width number? "")
537 (property-description 'beam-thickness number? "")
538 (property-description 'beam-space-function procedure? "")
541 (define separation-item-interface
543 'separation-item-interface
548 (define sustain-pedal-interface
550 'sustain-pedal-interface
554 (define system-start-delimiter
556 'system-start-delimiter
559 (property-description 'collapse-height number? "")
560 (property-description 'thickness number? "")
561 (property-description 'arch-height number? "")
562 (property-description 'arch-angle number? "")
563 (property-description 'arch-thick number? "")
564 (property-description 'arch-width number? "")
565 (property-description 'bracket-thick number? "")
566 (property-description 'bracket-width number? "")
569 (define text-script-interface
571 'text-script-interface
577 (define tie-interface
582 (property-description 'staffline-clearance number? "")
583 (property-description 'heads pair? "pair of element pointers, pointing to the two heads of the tie. ")
584 (property-description 'details list? "")
585 (property-description 'thickness number? "")
586 (property-description 'x-gap number? "")
587 (property-description 'minimum-length number? "")
592 (define tie-column-interface
594 'tie-column-interface
599 (define volta-bracket-interface
601 'volta-bracket-interface
602 "Volta bracket with number"
604 (property-description 'bars list? "list of barline ptrs.")
605 (property-description 'thickness number? "in stafflinethickness")
606 (property-description 'height number? "in staffspace ")
609 (define span-bar-interface