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)
17 (define (merge-interfaces ifs)
19 (apply append (map car ifs))
20 (apply append (map cadr ifs))
21 (apply append (map caddr ifs))
24 (define (uniqued-alist alist acc)
26 (if (assoc (caar alist) acc)
27 (uniqued-alist (cdr alist) acc)
28 (uniqued-alist (cdr alist) (cons (car alist) acc)
31 (define (element-description name . interfaces)
32 (let* ((ifs (cons general-element-interface interfaces))
33 (props (map caddr ifs))
36 (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 element itself?
42 (cons 'properties (apply append props))
46 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
50 (define general-element-interface
52 'general-element-interface
53 "All elements support this"
54 (list (property-description 'X-offset-callbacks list? "")
55 (property-description 'Y-offset-callbacks list? "")
56 (property-description 'X-extent-callback procedure? "")
57 (property-description 'Y-extent-callback procedure? "")
58 (property-description 'font-size integer? "")
62 (define beam-interface
67 (property-description 'y-position number? "position of left edge")
68 (property-description 'height number? "dy")
69 (property-description 'flag-width-function procedure? "")
70 (property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams ")
71 (property-description 'default-neutral-direction dir? "which
72 direction to choose if we're in the middle of the staff ")
73 (property-description 'thickness number? "weight of beams, in staffspace")
74 (property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace)")
75 (property-description 'beamed-stem-shorten number? "")
76 (property-description 'height-quants number? "")
77 (property-description 'vertical-position-quant-function procedure? "")
78 (property-description 'dir-function procedure? "")
79 (property-description 'damping number? "damping factor.")
80 (property-description 'outer-stem-length-limit number? "catch
81 suspect beam slopes, set slope to zero if outer stem is lengthened
82 more than this (in staffspace)")
83 (property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
91 (define clef-interface
96 (property-description 'non-default boolean? "not set because of existence of a bar?")
97 (property-description 'change boolean? "is this a change clef (smaller size)?")
98 (property-description 'glyph string? "a string determining what glyph is typeset")
102 (define axis-group-interface
104 'axis-group-interface
105 "a group of coupled elements"
107 (property-description 'axes list? "list of axis (number) in which this group works")
110 (define note-column-interface
112 'note-column-interface
113 "Stem and noteheads combined"
115 (property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.")
116 (property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.")
117 (property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count.")
121 (define stem-interface
126 (property-description 'thickness number? "")
127 (property-description 'beamed-lengths list? "")
128 (property-description 'beamed-minimum-lengths list? "")
129 (property-description 'lengths list? "")
130 (property-description 'stem-shorten list? "")
131 (property-description 'default-neutral-direction dir? "")
132 (property-description 'direction dir? "")
133 (property-description 'stem-length number? "")
134 (property-description 'style string? "") ; symbol!?
135 (property-description 'flag-style string? "") ; symbol!?
136 (property-description 'X-offset-callbacks list? "")
140 (define slur-interface
145 (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.")
146 (property-description 'details list? "alist containing contaning a few magic constants.")
147 (property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end")
148 (property-description 'direction dir? "up or down?")
149 (property-description 'y-free number? "? ")
150 (property-description 'control-points list? "")
151 (property-description 'extremity-rules list? "")
152 (property-description 'extremity-offset-alist list? "")
153 (property-description 'thickness list? "")
154 (property-description 'dash number? "number representing the length of the dashes.")
159 (define side-position-interface
161 'side-position-interface
162 "put an element next to another one."
164 (property-description 'direction dir? "where to put the victim object (left or right?)")
165 (property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
166 (property-description 'minimum-space number? "minimum distance that the victim should move (after padding)")
167 (property-description 'padding number? "add this much extra space between victim and support")
168 (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. ")
169 (property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis")
174 (define accidentals-interface
176 'accidentals-interface
179 (property-description 'left-padding number? "space left of accs")
180 (property-description 'right-padding number? "space right of accs")
184 (define note-head-interface
189 (property-description 'style symbol? "symbol that sets note head style")
193 (define note-name-interface
198 (property-description 'style symbol? "symbol that sets note name style")
203 (define rhythmic-head-interface
205 'rhythmic-head-interface
208 (property-description 'dot ly-element? "reference to Dots object.")
209 (property-description 'stem ly-element? "pointer to Stem object")
210 (property-description 'duration-log integer? "2-log of the notehead duration")
213 (define rest-interface
218 (property-description 'style string? "string specifying glyph style"))))
220 (define tuplet-bracket-interface
222 'tuplet-bracket-interface
223 "A bracket with a number in the middle"
225 (property-description 'beams list? "list of beam ptrs.")
226 (property-description 'columns list? " list of note-columns.")
227 (property-description 'number-gap number? "")
228 (property-description 'delta-y number? "")
229 (property-description 'thick number? "")
234 (define align-interface
237 " Order elements top to bottom/left to right/right to left etc."
239 (property-description 'stacking-dir dir? "stack contents of elements in which direction ?")
240 (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")
241 (property-description 'threshold pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
242 (property-description 'alignment-done boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)")
243 (property-description 'center-element ly-element? "element which will be at the
244 center of the group after aligning (when using
245 Align_interface::center_on_element). The center element should have
246 this object as a reference point.")
247 (property-description 'elements list? "to be aligned elements ")
248 (property-description 'axes list? "list of axis numbers. Should contain only one number.")
251 (define aligned-interface
254 "read by align-interface"
256 (property-description 'minimum-space pair? "(cons LEFT RIGHT)")
257 (property-description 'extra-space pair? "(cons LEFT RIGHT)")
260 (define break-aligned-interface
262 'break-aligned-interface
263 "Items that are aligned in prefatory matter"
265 (property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
266 (property-description 'visibility-lambda procedure? "")
267 (property-description 'breakable boolean? "")
270 (define chord-name-interface
272 'chord-name-interface
276 (define time-signature-interface
278 'time-signature-interface
279 "A time signature, in different styles"
281 (property-description 'fraction pair? "")
282 (property-description 'style string? "")
285 (define bar-line-interface
290 (property-description 'barsize-procedure procedure? "")
291 (property-description 'kern number? "")
292 (property-description 'thin-kern number? "")
293 (property-description 'hair-thickness number? "")
294 (property-description 'thick-thickness number? "")
295 (property-description 'glyph string? "")
296 (property-description 'bar-size number? "")
297 (property-description 'break-glyph-function procedure? "")
303 (define text-spanner-interface
305 'text-spanner-interface
306 "generic text spanner"
308 (property-description 'dash-period number? "")
309 (property-description 'dash-length number? "")
310 (property-description 'line-thickness number? "")
311 (property-description 'edge-height pair? "(leftheight . rightheight)")
312 (property-description 'edge-text pair? "(lefttext . righttext)")
313 (property-description 'text-style string? "") ; SYMBOL!!?
314 (property-description 'type string? "line, dashed-line or dotted-line") ; SYMBOL!!?
318 (define hairpin-interface
323 (property-description 'grow-direction dir? "")
324 (property-description 'thickness number? "")
325 (property-description 'height number? "")
329 (define arpeggio-interface
334 (property-description 'stems list? "list of stem objects, corresponding to the notes that the arp has to be before.")
339 (define note-collision-interface
341 'note-collision-interface
344 (property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.")
346 (define dot-interface
349 "The dots to go with a notehead/rest. A separate interface, since they
350 are a party in collision resolution."
352 (property-description 'dot-count integer? "number of dots")
355 (define text-interface
360 (property-description 'text string? "")
361 (property-description 'style string? "")
365 (define dot-column-interface
367 'dot-column-interface
372 (define dynamic-interface
375 "Any kind of loudness sign"
380 (define finger-interface
383 "Any kind of loudness sign"
387 (define separation-spanner-interface
389 'separation-spanner-interface
393 (define text-script-interface
395 'text-script-interface
400 (define grace-alignment-interface
402 'grace-alignment-interface
403 "put grace notes in line"
405 (property-description 'horizontal-space number? "amount of space to add after a note (in staff-space)")
409 (define hara-kiri-group-interface
411 'hara-kiri-group-interface
415 (define lyric-hyphen-interface
417 'lyric-hyphen-interface
418 "A centred hyphen is a simple line between lyrics used to divide
419 syllables. The length of the hyphen line should stretch based on the
420 size of the gap between syllables."
423 (property-description 'thickness number? "thickness of line (in stafflinethickness)")
424 (property-description 'height number? "vertical offset (in staffspace)")
426 (property-description 'minimum-length number? "try to make the hyphens at least this long. Also works as a scaling parameter for the length")
427 (property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics)")
430 (define key-signature-interface
432 'key-signature-interface
433 "A group of accidentals."
435 (property-description 'c0-position integer? "integer indicating the position of central C?")
436 (property-description 'old-accidentals list? "list of (pitch, accidental) pairs")
437 (property-description 'new-accidentals list? "list of (pitch, accidental) pairs")
440 (define lyric-extender-interface
442 'lyric-extender-interface
443 "The extender is a simple line at the baseline of the lyric
444 that helps show the length of a melissima (tied/slurred note)."
446 (property-description 'word-space number? "")
447 (property-description 'height number? "in stafflinethickness")
448 (property-description 'right-trim-amount number? "")
452 (define lyric-syllable-interface
454 'lyric-syllable-interface
457 (property-description 'word-space number? "")
461 (define mark-interface
468 (define multi-measure-rest-interface
470 'multi-measure-rest-interface
474 (property-description 'columns list? "list of paper-columns")
475 (property-description 'expand-limit integer? "int : max number of measures expanded in church rests")
476 (property-description 'minimum-width number? "Real in staffspace")
477 (property-description 'padding number? "staffspace")
480 (define paper-column-interface
482 'paper-column-interface
485 (property-description 'dir-list list? "list of stem directions")
486 (property-description 'shortest-playing-duration moment? "duration of the shortest playing in that column.")
487 (property-description 'shortest-starter-duration moment? "duration of the shortest notes that starts exactly in this column.")
488 (property-description 'contains-grace boolean? "Used to widen entries for grace notes.")
489 (property-description 'extra-space pair? "pair of distances")
490 (property-description 'stretch-distance pair? "pair of distances")
493 (define spaceable-element-interface
495 'spaceable-element-interface
498 (property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs)")
499 (property-description 'ideal-distances list? "(OBJ . (DIST . STRENGTH)) pairs")
500 (property-description 'dir-list list? "list of stem directions.")
503 (define rest-collision-interface
505 'rest-collision-interface
508 (property-description 'maximum-rest-count integer? "")
509 (property-description 'minimum-distance number? "")
512 (define script-interface
517 (property-description 'script-priority number? "")
520 (define script-column-interface
522 'script-column-interface
527 (define spacing-spanner-interface
529 'spacing-spanner-interface
532 (property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
535 (define staff-symbol-interface
537 'staff-symbol-interface
538 "This spanner draws the lines of a staff. The middle line is
541 (property-description 'staff-space number? "")
542 (property-description 'line-count integer? "")
545 (define stem-tremolo-interface
547 'stem-tremolo-interface
550 (property-description 'stem ly-element? "pointer to the stem object.")
551 (property-description 'beam-width number? "")
552 (property-description 'beam-thickness number? "")
553 (property-description 'beam-space-function procedure? "")
556 (define separation-item-interface
558 'separation-item-interface
563 (define sustain-pedal-interface
565 'sustain-pedal-interface
569 (define system-start-delimiter
571 'system-start-delimiter
574 (property-description 'collapse-height number? "")
575 (property-description 'thickness number? "")
576 (property-description 'arch-height number? "")
577 (property-description 'arch-angle number? "")
578 (property-description 'arch-thick number? "")
579 (property-description 'arch-width number? "")
580 (property-description 'bracket-thick number? "")
581 (property-description 'bracket-width number? "")
584 (define text-script-interface
586 'text-script-interface
592 (define tie-interface
597 (property-description 'staffline-clearance number? "")
598 (property-description 'heads pair? "pair of element pointers, pointing to the two heads of the tie. ")
599 (property-description 'details list? "")
600 (property-description 'thickness number? "")
601 (property-description 'x-gap number? "")
602 (property-description 'minimum-length number? "")
607 (define tie-column-interface
609 'tie-column-interface
614 (define volta-bracket-interface
616 'volta-bracket-interface
617 "Volta bracket with number"
619 (property-description 'bars list? "list of barline ptrs.")
620 (property-description 'thickness number? "in stafflinethickness")
621 (property-description 'height number? "in staffspace ")
624 (define span-bar-interface