]> git.donarmstrong.com Git - lilypond.git/blob - scm/interface.scm
release: 1.3.103
[lilypond.git] / scm / interface.scm
1
2 ; should include default value?
3
4 ;;; ::::::: should generate documentation for score elements from here.
5
6 (define (elt-property-description symbol type? description)
7   (list symbol type? description))
8   
9 (define (lily-interface symbol description props)
10   (list symbol
11         description
12         props
13         )
14   )
15
16 (define (boolean-or-symbol? x) (or boolean? x) (or symbol? x))
17
18 (define (uniqued-alist  alist acc)
19   (if (null? alist) acc
20       (if (assoc (caar alist) acc)
21           (uniqued-alist (cdr alist) acc)
22           (uniqued-alist (cdr alist) (cons (car alist) acc)
23   ))))
24
25 (define (element-description name . interfaces)
26   (let* ((ifs (cons general-element-interface interfaces))
27          (props (map caddr ifs))
28          (prop-typep-pairs (map (lambda (x) (cons (car x) (cadr x)))
29                                         (apply append props)))
30          (syms (map car ifs))
31         )
32     (list (cons 'separator "\n\n\n")    ;easy printing.
33           (cons 'name name)
34           (cons 'interfaces syms)
35           (cons 'interface-descriptions ifs)
36           ; (cons 'interface-descriptions (cadr merged))
37           ;; description of the element itself?
38           (cons 'properties prop-typep-pairs)
39   )))
40
41
42 (define general-element-interface
43   (lily-interface
44    'general-element-interface
45    "All elements support this"
46    (list
47     (elt-property-description 'X-offset-callbacks list? "list of functions, each taking an element and axis argument. The function determine the position relative to this element's parent. The last one in the list is called first")
48     (elt-property-description 'Y-offset-callbacks list? "see <code> X-offset-callbacks</code>")
49     (elt-property-description 'X-extent-callback procedure? "procedure taking an element and axis argument, returning a number-pair. The return value is the extent of the element.")
50     (elt-property-description 'Y-extent-callback procedure? "see <code> X-extent-callback </code>")
51     (elt-property-description 'font-relative-size integer? "")
52     (elt-property-description 'extra-offset number-pair? "pair of reals (a cons) forcing an extra offset   before outputting")
53     (elt-property-description 'interfaces  list? "list of symbols indicating the interfaces supported by this object. Is initialized from the <code>meta</code> field.")
54     (elt-property-description 'dependencies list? "list of score-element pointers that indicate who to compute first for certain global passes")
55     (elt-property-description 'no-spacing-rods boolean? "read from elements: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM)")
56     (elt-property-description 'extra-extent-X number-pair? "enlarge in X dimension by this much, measured in staff space")
57     (elt-property-description 'extra-extent-Y number-pair? "see <code>extra-extent-Y</code>")
58     (elt-property-description 'minimum-extent-X number-pair? "minimum size in X dimension, measured in staff space")
59     (elt-property-description 'minimum-extent-Y number-pair? "see <code>minimum-extent-Y</code>")
60     (elt-property-description 'origin ly-input-location? "location in input file of the definition")
61     (elt-property-description 'transparent boolean? "This is almost the
62 same as setting molecule-callback to #f, but this retains the
63 dimensions of this element, which means that you can erase elements
64 individually. ")
65     (elt-property-description 'molecule-callback procedure? "Function taking graphical element as argument, returning a Scheme encoded Molecule
66
67 This function can be called more than once (for instance once for
68 computing dimensions, and once for computing the output).  Therefore,
69 this function should have no side-effects on its argument.
70 Caching of computed values is permissible, and generally useful, though.
71
72 ") 
73     ))
74   )
75
76 (define beam-interface
77   (lily-interface
78    'beam-interface
79    "A beam. "
80    (list
81     (elt-property-description 'y-position number? "position of left edge")
82     (elt-property-description 'height number? "dy")
83     (elt-property-description 'flag-width-function procedure? "")
84     (elt-property-description 'damping integer? "amount of beam slope damping should beam slope be damped? 0: no, 1: yes, 100000: horizontal beams ")
85     (elt-property-description 'default-neutral-direction dir? "which
86 direction to choose if we're in the middle of the staff ")
87     (elt-property-description 'thickness number? "weight of beams, in staffspace")
88     (elt-property-description 'space-function procedure? "function of type multiplicity -> real (in staffspace)")
89     (elt-property-description 'beamed-stem-shorten number? "")
90     (elt-property-description 'height-quants number? "")
91     (elt-property-description 'vertical-position-quant-function procedure? "")
92     (elt-property-description 'dir-function procedure? "")
93     (elt-property-description 'damping number? "damping factor.")
94     (elt-property-description 'outer-stem-length-limit number? "catch
95 suspect beam slopes, set slope to zero if outer stem is lengthened
96 more than this (in staffspace)")
97     (elt-property-description 'slope-limit number? "set slope to zero if slope is running away steeper than this.")
98     )
99 ))
100
101
102
103 ;;;;;;;;;;;;;;;;;;;;
104
105 (define clef-interface
106   (lily-interface
107    'clef-interface
108    "A clef sign"
109    (list
110     (elt-property-description 'non-default boolean? "not set because of existence of a bar?")
111     (elt-property-description 'change boolean? "is this a change clef (smaller size)?")
112     (elt-property-description 'glyph string? "a string determining what glyph is typeset")
113     ))
114   )
115
116 (define axis-group-interface
117   (lily-interface
118    'axis-group-interface
119    "a group of coupled elements"
120    (list
121     (elt-property-description 'axes list? "list of axis (number) in which this group works")
122    )))
123
124 (define note-column-interface
125   (lily-interface
126    'note-column-interface
127    "Stem and noteheads combined"
128    (list
129     (elt-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting.")
130     (elt-property-description 'force-hshift number? "amount of collision_note_width that overides automatic collision settings.")
131     (elt-property-description 'merge-differently-dotted boolean? "merge black noteheads with differing dot count in collisions.
132 <p>
133 Merge noteheads in collisions, even if they have a different number of
134 dots. This normal notation for polyphonic guitar music.
135
136 ")
137     ))
138   )
139
140 (define stem-interface
141   (lily-interface
142    'stem-interface
143    "A stem"
144    (list
145     (elt-property-description 'thickness number? "thickness, measured in stafflinethickness")
146     (elt-property-description 'beamed-lengths list? "list of stem lengths given beam multiplicity ")
147     (elt-property-description 'beamed-minimum-lengths list? "list of minimum stem lengths given beam multiplicity")
148     (elt-property-description 'stem-centered boolean? "Center stems on note heads. Useful for mensural notation")
149     (elt-property-description 'lengths list? "Stem length given multiplicity of flag")
150     (elt-property-description 'beam ly-element? "pointer to the beam, if applicable")
151     (elt-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity")
152     (elt-property-description 'duration-log integer? "log of the duration, ie. 0=whole note, 1 = half note, etc.")
153     (elt-property-description 'beaming number-pair? "number of beams extending to left and right")
154     (elt-property-description 'default-neutral-direction dir? "Where to go if we're in the middle of the staff")
155     (elt-property-description 'stem-end-position number? "Where does the stem end (the end is opposite to the support-head")
156     (elt-property-description 'support-head ly-element? "the note head at
157 one end of the stem")
158     (elt-property-description 'heads list? "list of note heads")
159     (elt-property-description 'direction dir? "up or down")
160     (elt-property-description 'stem-length number? "length of stem")
161     (elt-property-description 'style string? "") ; symbol!?
162     (elt-property-description 'flag-style string? "") ; symbol!?
163     (elt-property-description 'dir-forced boolean? "set if direction has been forced; read by Beam.")
164     )))
165
166
167 (define slur-interface
168   (lily-interface
169    'slur-interface
170    "A slur"
171    (list
172     (elt-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.")
173     (elt-property-description 'details list? "alist containing contaning a few magic constants.")
174     (elt-property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end")
175     (elt-property-description 'direction dir? "up or down?")
176    (elt-property-description 'attachment-offset pair? "cons of offsets, '(LEFT-offset . RIGHT-offset).  This offset is added to the attachments to prevent ugly slurs.")
177      (elt-property-description 'beautiful number? "number that dictates when a slur should be de-uglyfied.  It correlates with the enclosed area between noteheads and slurs.  A value of 0.1 yields only undisturbed slurs, a value of 5 will tolerate quite high blown slurs.")
178      (elt-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems")
179      (elt-property-description 'control-points list? "[internal] control points of bezier curve")
180      (elt-property-description 'extremity-rules  list? "an alist (procedure slur dir) -> attachment to determine the attachment (see above).  If procedure returns #t, attachment is used.  Otherwise, the next procedure is tried.")
181      (elt-property-description 'extremity-offset-alist list? "an alist (attachment stem-dir*dir slur-dir*dir) -> offset.  The offset adds to the centre of the notehead, or stem.")
182      (elt-property-description 'thickness list? "The thickness[stafflinethickness] of slur in the centre.")
183      (elt-property-description 'dashed number? "[FIXME: use dash-period/dash length; see text-spanner] number representing the length of the dashes.")
184
185     )
186    )
187   )
188
189 (define side-position-interface
190   (lily-interface
191    'side-position-interface
192    "Position a victim object (this one) next to other objects (the support)."
193    (list
194    (elt-property-description 'side-support list? "the support, a list of score elements")
195    (elt-property-description 'direction-source ly-element? "in case side-relative-direction is set, which element  to get the direction from ")
196     (elt-property-description 'direction dir? "where to put the victim object (left or right?)")
197     (elt-property-description 'side-relative-direction dir? "if set: get the direction from a different object, and multiply by this.")
198     (elt-property-description 'minimum-space number? "minimum distance that the victim should move (after padding)")
199     (elt-property-description 'padding number? "add this much extra space between victim and support")
200     (elt-property-description 'self-alignment-X number? "real number: -1 =
201 left aligned, 0 = center, 1 right-aligned in X direction. <p> Set to
202 an element pointer, if you want that element to be the center.  In
203 this case, the center element should have this object as a reference
204 point.
205 ")
206     (elt-property-description 'self-alignment-Y number? "like self-alignment-X but for Y axis")
207     
208     )
209   ))
210
211 (define accidentals-interface
212   (lily-interface
213    'accidentals-interface
214    "Accidentals"
215    (list
216     (elt-property-description 'left-padding number? "space left of accs")
217     (elt-property-description 'right-padding number? "space right of accs")     
218     )
219    ))
220
221 (define line-of-score-interface
222   (lily-interface
223    'line-of-score-interface
224    "Super element, parent of all:
225 <p>
226    The columns of a score that form one line.  The toplevel element.
227    Any element has a Line_of_score as both X and Y reference
228    point. The Paper_score contains one element of this type. Control
229    enters the Score_element dependency calculation from this single
230    Line_of_score object."
231    (list
232     (elt-property-description 'between-system-string string? "string
233  to dump between two systems. Useful for forcing pagebreaks")
234     (elt-property-description 'spacing-procedure procedure? "procedure taking
235 graphical element as argument. This is called after before-line-breaking-callback, but before the actual line breaking itself.  Return value is ignored")
236     (elt-property-description 'before-line-breaking-callback procedure?
237                           "Procedure taking graphical element as argument.
238 This procedure is called (using dependency resolution) before line breaking, but after generating discretionary items. Return value is ignored")
239     (elt-property-description 'after-line-breaking-callback procedure?
240                           "Procedure taking graphical element as argument.
241 This procedure is called (using dependency resolution) after line breaking. Return value is ignored")
242     (elt-property-description 'all-elements list? "list of all score elements in this line. Needed for protecting elements from GC.")
243     (elt-property-description 'columns list? "list of all paper columns")
244     )))
245
246 (define note-head-interface
247   (lily-interface
248    'note-head-interface
249    "Note head"
250    (list
251     (elt-property-description 'style symbol? "symbol that sets note head style")
252     )
253    ))
254
255 (define note-name-interface
256   (lily-interface
257    'note-name-interface
258    "Note name"
259    (list
260     (elt-property-description 'style symbol? "symbol that sets note name style")
261     )
262    ))
263
264
265 (define rhythmic-head-interface
266   (lily-interface
267    'rhythmic-head-interface
268    "Note head or rest"
269    (list
270     (elt-property-description 'dot ly-element? "reference to Dots object.")
271     (elt-property-description 'stem ly-element? "pointer to Stem object")
272     (elt-property-description 'duration-log integer? "2-log of the notehead duration")
273     )))
274
275 (define rest-interface
276   (lily-interface
277    'rest-interface
278    "a rest"
279    (list
280     (elt-property-description 'style string? "string specifying glyph style"))))
281
282 (define tuplet-bracket-interface
283   (lily-interface
284    'tuplet-bracket-interface
285    "A bracket with a number in the middle, used for tuplets." 
286    (list
287     (elt-property-description 'beams list? "list of beam ptrs.")
288     (elt-property-description 'columns list? " list of note-columns.")
289     (elt-property-description 'number-gap number? "")
290     (elt-property-description 'delta-y number? "amount of ascension")
291     (elt-property-description 'tuplet-bracket-visibility boolean-or-symbol? "
292 This controls the visibility of the tuplet bracket.
293 Setting it to false will prevent printing of the
294 bracket. Setting the property to #'if-no-beam will make it
295 print only if there is no beam associated with this tuplet bracket.")
296     (elt-property-description 'tuplet-number-visibility boolean-or-symbol? "
297 Like <code>tuplet-bracket-visibility</code>, but for the number.")
298     (elt-property-description 'parallel-beam boolean? "internal: true if there is a beam just as wide as the bracket ")
299     (elt-property-description 'thick number? "thickness, in stafflinethickness")
300     )
301 ))
302
303
304 (define align-interface
305   (lily-interface
306    'align-interface
307    " Order elements top to bottom/left to right/right to left etc."
308    (list
309     (elt-property-description 'stacking-dir  dir? "stack contents of elements in which direction ?")
310     (elt-property-description 'align-dir  dir? "Which side to align? -1: left side, 0: around center of width, 1: right side")
311     (elt-property-description 'threshold  number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace")
312     (elt-property-description 'alignment-done  boolean? "boolean to administrate whether we've done the alignment already (to ensure that the process is done only once)")
313     (elt-property-description 'center-element ly-element? "element which will be at the
314 center of the group after aligning (when using
315 Align_interface::center_on_element). ")
316     (elt-property-description 'elements  list? "to be aligned elements ")
317     (elt-property-description 'axes  list? "list of axis numbers. Should contain only one number.")
318     )))    
319
320 (define aligned-interface
321   (lily-interface
322    'aligned-interface
323    "read by align-interface"
324    (list
325     (elt-property-description 'minimum-space number-pair? "(cons LEFT RIGHT)")
326     (elt-property-description 'extra-space number-pair? "(cons LEFT RIGHT)")
327     )))
328
329 (define break-aligned-interface
330   (lily-interface
331    'break-aligned-interface
332    "Items that are aligned in prefatory matter"
333    (list
334     (elt-property-description 'break-align-symbol symbol? "the index in the spacing table (symbol) of the to be aligned item.")
335     (elt-property-description 'visibility-lambda procedure? "a function that takes the break direction and returns a  cons of booleans containing (TRANSPARENT . EMPTY)")
336     (elt-property-description 'breakable boolean? "boolean indicating if this is a breakable item (clef, barline, key sig, etc.)")
337     )))
338
339 (define chord-name-interface
340   (lily-interface
341    'chord-name-interface
342    "generate a chord name"
343    (list
344     (elt-property-description 'pitches list? "list of musical-pitch")
345     (elt-property-description 'inversion list? " musical-pitch, optional")
346     (elt-property-description 'bass list? " musical-pitch, optional")
347    )))
348
349 (define time-signature-interface
350   (lily-interface
351    'time-signature-interface
352    "A time signature, in different styles"
353    (list
354     (elt-property-description 'fraction number-pair? "")
355     (elt-property-description 'style string? "")
356     )))
357
358 (define bar-line-interface
359   (lily-interface
360    'bar-line-interface
361    "Bar line"
362    (list
363     (elt-property-description 'barsize-procedure procedure? "how to compute the size of a bar line")
364     (elt-property-description 'kern number? "space after a thick line")
365     (elt-property-description 'thin-kern number? "space after a hair-line")
366     (elt-property-description 'hair-thickness number? "thickness, measured in stafflinethickness")
367     (elt-property-description 'thick-thickness number? "thickness, measured in stafflinethickness")
368     (elt-property-description 'glyph string? "what kind barline? A concatenation of |, : and .")
369     (elt-property-description 'bar-size number? "")
370     (elt-property-description 'break-glyph-function procedure? "function taking glyph and break-direction, returning the glyph at a line break")
371    )))
372
373
374
375
376 (define hairpin-interface
377   (lily-interface
378    'hairpin-interface
379    "hairpin crescendo"
380    (list
381     (elt-property-description 'grow-direction dir? "crescendo or decrescendo?")
382     (elt-property-description 'thickness number? "thickness, measured in stafflinethickness")
383     (elt-property-description 'height number? "height, measured in staffspace in ")
384     )))
385
386 (define arpeggio-interface
387   (lily-interface
388    'arpeggio-interface
389    "arpeggio"
390    (list
391     (elt-property-description 'stems list? "list of stem objects, corresponding to the notes that the arpeggio has to be before.")
392     )
393    )
394   )
395
396 (define note-collision-interface
397   (lily-interface
398    'note-collision-interface
399    "note collision"
400    (list
401     (elt-property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.")
402     )   )  )
403
404
405 (define custos-interface
406   (lily-interface
407    'custos-interface
408    "A custos is a staff context symbol that appears at the end of a
409   staff line with monophonic musical contents (i.e. with a single
410   voice).  It anticipates the pitch of the first note of the following
411   line and thus helps the player or singer to manage line breaks
412   during performance, thus enhancing readability of a score.
413
414   Custodes were frequently used in music notation until the 16th
415   century.  There were different appearences for different notation
416   styles.  Nowadays, they have survived only in special forms of
417   musical notation such as via the editio vaticana dating back to the
418   beginning of the 20th century.
419
420 [TODO: add to glossary]"
421
422    (list
423     (elt-property-description 'style string? "a string determining what glyph is 
424 typeset. Current choices are mensural, 
425 hufnagel, vaticana and medicaea [TODO: should use symbol] ")
426     ))
427   )
428
429
430
431 (define dot-interface
432   (lily-interface
433    'dots-interface
434    "The dots to go with a notehead/rest.  A separate interface, since they
435   are a party in collision resolution."
436    (list
437     (elt-property-description 'direction dir? "Direction to handle staff-line collisions in.")
438     (elt-property-description 'dot-count integer? "number of dots")
439     )))
440
441 (define font-interface
442   (lily-interface
443    'font-interface
444    "Any symbol that is typeset through fixed sets of glyphs (ie. fonts)"
445    (list
446     (elt-property-description 'font-style symbol? "a precooked set of font definitions, eg. finger volta timesig mark script large Large dynamic")
447     (elt-property-description 'font-series symbol? "partial font definition: medium, bold")
448     (elt-property-description 'font-shape symbol?  "partial font definition: upright or italic")
449     (elt-property-description 'font-family symbol? "partial font definition: music roman braces dynamic math ...")
450     (elt-property-description 'font-name symbol? "partial font definition: base name of font file FIXME: should override other partials")
451     (elt-property-description 'font-point-size number? "partial font definition: exact font size in points FIXME: should override font-relative-size")
452     (elt-property-description 'font-relative-size number? "partial font definition: the relative size, 0 is style-sheet's normal size, -1 is smaller, +1 is bigger")
453     )))
454
455
456 (define text-interface
457   (lily-interface
458    'text-interface
459    "A scheme markup text"
460    (list
461     (elt-property-description 'text (lambda (x) (or (string? x) (list? x))) "
462 Scheme markup text.  It is defined as follows:
463 <p>
464
465 TEXT : STRING | (MARKUP SENTENCE)<br>
466 MARKUP: PROPERTY | ABBREV<br>
467 SENTENCE: TEXT | SENTENCE TEXT<br>
468 PROPERTY: (key . value)<br>
469 ABBREV: rows lines roman music bold italic named super sub text, or any font-style
470 <p>
471
472 So, TEXT is either a string, or a list of which the CAR is a MARKUP.
473 MARKUP is either a CONS: an element property '(key . value) or a symbol:
474 a predefined abbreviation for a list of element properties.
475 <p>
476
477 The following abbreviations are currently defined:
478 <dl>
479 <dt>rows<dd> horizontal mode: set all text on one line (default)
480 <dt>lines<dd> vertical mode: set every text on new line
481 <dt>roman<dd> select roman font
482 <dt>music<dd> select feta font
483 <dt>bold<dd> select bold series
484 <dt>italic<dd> select italic shape
485 <dt>named<dd> lookup by character name
486 <dt>text<dd> plain text lookup (by character value)
487 <dt>super<dd> superscript
488 <dt>sub<dd> subscript
489 <dt> any font-style<dd> finger volta timesig mmrest mark script large Large dynamic
490 </dl>
491 " )
492     ;; Should move this somewhere else?  
493     (elt-property-description 'align number? "the alignment of the text, 0 is horizontal, 1 is vertical")
494     (elt-property-description 'lookup symbol? "lookup method: 'value for plain text, 'name for character-name")
495     (elt-property-description 'raise number? "height for text to be raised (a negative value lowers the text")
496     (elt-property-description 'kern number? "amount of extra white space to add before text.  This is `relative'(?) to the current alignment.")
497     (elt-property-description 'magnify number? "the magnification factor.  FIXME: doesn't work for feta fonts")
498     )))
499
500 (define dot-column-interface
501   (lily-interface
502    'dot-column-interface
503    "Interface that groups dots so they form a column"
504    (list
505     )))
506
507 (define dynamic-interface
508   (lily-interface
509    'dynamic-interface
510    "Any kind of loudness sign"
511    '()
512     ))
513
514
515 (define finger-interface
516   (lily-interface
517    'finger-interface
518    "A fingering instruction"
519    '()
520     ))
521
522 (define separation-spanner-interface
523   (lily-interface
524    'separation-spanner-interface
525    "Spanner that containing <code>separation-item-interface</code> elements to calculate rods"
526    '()
527   ))
528 (define text-script-interface
529   (lily-interface
530    'text-script-interface
531    "Any text script"
532    '()
533     ))
534
535 (define grace-alignment-interface
536   (lily-interface
537    'grace-alignment-interface
538    "put grace notes in line"
539    (list
540     (elt-property-description 'horizontal-space number? "amount of space to add after a note (in staff-space)")
541     )
542    ))
543
544 (define hara-kiri-group-interface
545   (lily-interface
546    'hara-kiri-group-interface
547    "  As Vertical_group_spanner, but keep track of interesting items.  If
548   we don't contain any interesting items after linebreaking, then
549   gracefully commit suicide.  Objective: don't disgrace Lily by
550   typesetting empty lines in orchestral scores."
551    (list
552     (elt-property-description 'items-worth-living list? "list of interesting items. If empty in a particular system, clear that system.")
553
554
555     )))
556
557 (define lyric-hyphen-interface
558   (lily-interface
559    'lyric-hyphen-interface
560    "A centred hyphen is a simple line between lyrics used to divide
561 syllables.   The length of the hyphen line should stretch based on the
562   size of the gap between syllables."
563    (list
564     
565     (elt-property-description 'thickness number? "thickness of line (in stafflinethickness)")
566     (elt-property-description 'height number? "vertical offset  (in staffspace)")
567
568     (elt-property-description 'minimum-length number? "try to make the hyphens at least this long. Also works as a scaling parameter for the length")
569     (elt-property-description 'word-space number? "elongate left by this much (FIXME: cumbersome semantics)")
570     )))
571
572 (define key-signature-interface
573   (lily-interface
574    'key-signature-interface
575    "A group of  accidentals."
576    (list
577     (elt-property-description 'c0-position  integer? "integer indicating the position of central C")
578     (elt-property-description 'old-accidentals  list? "list of (pitch, accidental) pairs")
579     (elt-property-description 'new-accidentals  list? "list of (pitch, accidental) pairs")
580     )))
581
582 (define lyric-extender-interface
583   (lily-interface
584    'lyric-extender-interface
585    "The extender is a simple line at the baseline of the lyric
586   that helps show the length of a melissima (tied/slurred note)."
587    (list
588     (elt-property-description 'word-space  number? "")
589     (elt-property-description 'height  number? "in stafflinethickness")
590     (elt-property-description 'right-trim-amount  number? "")
591     )))
592
593
594 (define lyric-syllable-interface
595   (lily-interface
596    'lyric-syllable-interface
597    "a single piece of lyrics"
598    (list
599     (elt-property-description 'word-space  number? "")
600     )))
601
602
603 (define mark-interface
604   (lily-interface
605    'mark-interface
606    "a rehearsal mark"
607    (list
608     )))
609
610 (define multi-measure-rest-interface
611   (lily-interface
612    'multi-measure-rest-interface
613    "A rest that spans a whole number of measures.  For typesetting the
614 numbers, fields from font-interface may be used. 
615 "
616    (list
617     
618     (elt-property-description 'columns  list? "list of paper-columns")
619     (elt-property-description 'expand-limit  integer? "maximum number of measures expanded in church rests")
620     (elt-property-description 'minimum-width number? "minimum-width of rest symbol, in staffspace")
621     (elt-property-description 'padding  number? "padding between number and rest. Measured in staffspace.")
622     )))
623
624 (define paper-column-interface
625   (lily-interface
626    'paper-column-interface
627    ""
628    (list
629     (elt-property-description 'column-space-strength number? "relative strength of space following breakable columns (eg. prefatory matter)")
630     (elt-property-description 'before-musical-spacing-factor number?
631 "space before musical columns (eg. taken by accidentals) get this much
632 stretched when they follow a musical column, in absence of grace
633 notes.  0.0 means no extra space (accidentals are ignored)")
634     (elt-property-description 'stem-spacing-correction number? "optical correction amount.")
635     (elt-property-description 'before-grace-spacing-factor number? " stretch space this much if there are grace notes before the column")
636     (elt-property-description 'when moment? "when does this column happen?")
637     (elt-property-description 'bounded-by-me list? "list of spanners that have this
638 column as start/begin point. Only columns that have elements or act as bounds are spaced.")
639     (elt-property-description 'dir-list  list? "list of stem directions")
640     (elt-property-description 'shortest-playing-duration  moment? "duration of the shortest playing in that column.")
641     (elt-property-description 'shortest-starter-duration  moment? "duration of the shortest notes that starts exactly in this column.")
642     (elt-property-description 'contains-grace  boolean? "Used to widen entries for grace notes.")
643     (elt-property-description 'extra-space  number-pair? "pair of distances")
644     (elt-property-description 'stretch-distance number-pair? "pair of distances")
645     )))
646
647 (define spaceable-element-interface
648   (lily-interface
649    'spaceable-element-interface
650    "An element (generally a Paper_column) that takes part in the
651 spacing problem. "
652    (list
653      (elt-property-description 'minimum-distances list? "list of rods (ie. (OBJ . DIST) pairs)")
654      (elt-property-description 'ideal-distances  list? "(OBJ . (DIST . STRENGTH)) pairs")
655      (elt-property-description 'dir-list list? "list of stem directions, needed for optical spacing correction.")
656      )))
657
658 (define rest-collision-interface
659   (lily-interface
660    'rest-collision-interface
661    "Move around ordinary rests (not multi-measure-rests) to avoid
662 conflicts."
663    (list
664     (elt-property-description 'maximum-rest-count integer? "kill off rests so we don't more than this number left.")
665     (elt-property-description 'minimum-distance number? "minimum distance between notes and rests.")
666     (elt-property-description 'elements list? "list of elements (NoteColumn,
667 generally) participating in the collision. The
668 <code>rest-collision</code> property in <code>elements</code> is set
669 to a pointer to the collision")
670     )))
671
672 (define script-interface
673   (lily-interface
674    'script-interface
675    ""
676    (list
677     (elt-property-description 'script-priority number? "A sorting key that determines in what order a script is within a stack of scripts")
678     )))
679
680 (define script-column-interface
681   (lily-interface
682    'script-column-interface
683    "An interface that sorts scripts according to their <code>script-priority</code>"
684    (list )))
685
686
687 (define spacing-spanner-interface
688   (lily-interface
689    'spacing-spanner-interface
690    ""
691    (list
692     (elt-property-description 'maximum-duration-for-spacing moment? "space as if a duration of this type is available in this measure.")
693     (elt-property-description 'arithmetic-basicspace number? "The space taken by a note is determined by the formula 
694
695    SPACE = arithmetic_multiplier * ( C + log2 (TIME) ))
696
697 where TIME is the amount of time a note occupies.  The value of C is
698 chosen such that the smallest space within a measure is
699 arithmetic_basicspace:
700
701   C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) 
702
703 The smallest space is the one following the shortest note in the
704 measure, or the space following a hypothetical 1/8 note.  Typically
705 arithmetic_basicspace is set to a value so that the shortest note
706 takes about two noteheads of space (ie, is followed by a notehead of
707 space):
708
709    2*quartwidth = arithmetic_multiplier * ( C + log2 (SHORTEST) ))
710
711    { using: C = arithmetic_basicspace - log2 (mininum (SHORTEST, 1/8)) }
712    { assuming: SHORTEST <= 1/8 }
713
714                = arithmetic_multiplier *
715                ( arithmetic_basicspace - log2 (SHORTEST) + log2 (SHORTEST) )
716
717                = arithmetic_multiplier * arithmetic_basicspace
718
719    { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
720
721                = quartwidth * arithmetic_basicspace
722
723    =>          
724
725    arithmetic_basicspace = 2/1 = 2
726
727 If you want to space your music wider, use something like:
728
729    arithmetic_basicspace = 4.;
730
731 ")
732     (elt-property-description 'arithmetic-multiplier number? "see arithmetic-basicspace")    
733     
734     )))
735
736 (define staff-symbol-interface
737   (lily-interface
738    'staff-symbol-interface
739    "This spanner draws the lines of a staff.  The middle line is
740 position 0."
741    (list
742     (elt-property-description 'staff-space number? "Amount of line leading relative to global staffspace")
743     (elt-property-description 'line-count integer? "Number of staff lines")
744     )))
745
746 (define stem-tremolo-interface
747   (lily-interface
748    'stem-tremolo-interface
749    ""
750    (list
751     (elt-property-description 'stem ly-element? "pointer to the stem object.")
752     (elt-property-description 'beam-width number? "width of the tremolo sign")
753     (elt-property-description 'beam-thickness number? "thickness, measured in staffspace")
754     (elt-property-description 'beam-space-function procedure? "function returning space given multiplicity")
755     )))
756
757 (define separation-item-interface
758   (lily-interface
759    'separation-item-interface
760    "Item that computes widths to generate spacing rods.
761 <p>
762 Calc dimensions for the Separating_group_spanner; this has to be
763    an item to get dependencies correct.  It can't be an element_group
764    since these usually are in a different X_group
765 "
766    (list
767     (elt-property-description 'elements list? " -- list of items.")
768      )))
769
770 (define sustain-pedal-interface
771   (lily-interface
772    'sustain-pedal-interface
773    ""
774    (list
775     )))
776 (define system-start-delimiter
777   (lily-interface
778    'system-start-delimiter
779    ""
780    (list
781     (elt-property-description 'collapse-height number? "")
782     (elt-property-description 'thickness number? "thickness, measured in stafflinethickness")
783
784     ; Should collapse into (bracket . ((height . ) ... ))
785     ;
786     (elt-property-description 'arch-height number? "")
787     (elt-property-description 'arch-angle number? "")
788     (elt-property-description 'arch-thick number? "")
789     (elt-property-description 'arch-width number? "")
790     (elt-property-description 'bracket-thick number? "")
791     (elt-property-description 'bracket-width number? "")
792     (elt-property-description 'glyph symbol? "bar-line, bracket or brace")
793     )))
794
795 (define text-spanner-interface
796   (lily-interface
797    'text-spanner-interface
798    "generic text spanner"
799    (list
800     (elt-property-description 'dash-period  number? "the length of one dash + white space")
801     (elt-property-description 'dash-length number? "the length of a dash")
802     (elt-property-description 'line-thickness number? "the thickness[stafflinethickness] of the line")
803     (elt-property-description 'edge-height pair? "a cons that specifies the heights of the vertical egdes '(LEFT-height . RIGHT-height)")
804     (elt-property-description 'edge-text pair? "a cons that specifies the texts to be set at the edges '(LEFT-text . RIGHT-text)")
805     (elt-property-description 'type string? "one of: line, dashed-line or dotted-line") ; SYMBOL!!?    
806     )
807 ))
808
809 (define text-script-interface
810   (lily-interface
811    'text-script-interface
812    ""
813    (list
814     
815     )))
816
817
818 (define tie-interface
819   (lily-interface
820    'tie-interface
821    "A tie connecting two noteheads."
822    (list
823     (elt-property-description 'staffline-clearance number? "don't get closer than this to stafflines.")
824     (elt-property-description 'control-points list? "List of 4 offsets (number-pairs) controlling the tie shape")
825     (elt-property-description 'heads pair? "pair of element pointers, pointing to the two heads of the  tie. ")
826     (elt-property-description 'details list? "alist of parameters for the curve shape")
827     (elt-property-description 'thickness number? "thickness, measured in stafflinethickness")
828     (elt-property-description 'x-gap number? "horizontal gap between notehead and tie")
829     (elt-property-description 'direction dir? "up or down?")    
830     (elt-property-description 'minimum-length number? "minimum length in staffspace")
831     )))
832
833
834
835 (define tie-column-interface
836   (lily-interface
837    'tie-column-interface
838    "that sets tie directions in a tied chord"
839    (list
840     (elt-property-description 'direction dir? "Forced direction for all ties") 
841     )))
842
843 (define volta-bracket-interface
844   (lily-interface
845    'volta-bracket-interface
846    "Volta bracket with number"
847    (list
848     (elt-property-description 'bars  list? "list of barline ptrs.")
849     (elt-property-description 'thickness  number? "thickness, measured in stafflinethickness")
850     (elt-property-description 'height  number? "in staffspace ")
851     )))
852
853 (define span-bar-interface
854   (lily-interface
855    'span-bar-interface
856    ""
857    (list
858     )))
859