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