]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-music-types.scm
Add '-dcrop' option to ps and svg backends
[lilypond.git] / scm / define-music-types.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 1998--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; LilyPond is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 ;; for define-safe-public when byte-compiling using Guile V2
20 (use-modules (scm safe-utility-defs))
21
22 ;; TODO: should link back into user manual.
23
24 (define-public music-descriptions
25   `(
26     (AbsoluteDynamicEvent
27      . ((description . "Create a dynamic mark.
28
29 Syntax: @var{note}@code{\\x}, where @code{\\x} is a dynamic mark like
30 @code{\\ppp} or @code{\\sfz}.  A complete list is in file
31 @file{ly/@/dynamic-scripts-init.ly}.")
32         (types . (post-event event dynamic-event absolute-dynamic-event))
33         ))
34
35     (AlternativeEvent
36      . ((description . "Create an alternative event.")
37         (types . (event alternative-event))
38         ))
39
40     (AnnotateOutputEvent
41      . ((description . "Print an annotation of an output element.")
42         (types . (event annotate-output-event post-event))
43         ))
44
45     (ApplyContext
46      . ((description . "Call the argument with the current context during
47 interpreting phase.")
48         (types . (apply-context))
49         (iterator-ctor . ,ly:apply-context-iterator::constructor)
50         ))
51
52     (ApplyOutputEvent
53      . ((description . "Call the argument with all current grobs during
54 interpreting phase.
55
56 Syntax: @code{\\applyOutput #'@var{context} @var{func}}
57
58 Arguments to @var{func} are 1.@tie{}the grob, 2.@tie{}the originating
59 context, and 3.@tie{}the context where @var{func} is called.")
60         (types . (event apply-output-event))
61         ))
62
63     (ArpeggioEvent
64      . ((description . "Make an arpeggio on this note.
65
66 Syntax: @w{@var{note}@code{-\\arpeggio}}")
67         (types . (post-event arpeggio-event event))
68         ))
69
70     ;; todo: use articulation-event for slur as well.
71     ;; separate non articulation scripts
72     (ArticulationEvent
73      . ((description . "Add an articulation marking to a note.
74
75 Syntax: @var{note}@code{x}@code{y}, where @code{x} is a direction\
76 \n(@code{^} for up or @code{_} for down), or LilyPond's choice\
77 \n(no direction specified), and where @code{y} is an articulation\
78 \n(such as @w{@code{-.}}, @w{@code{->}}, @code{\\tenuto}, @code{\\downbow}).
79 See the Notation Reference for details.")
80         (types . (post-event event articulation-event script-event))
81         ))
82
83     (AutoChangeMusic
84      . ((description . "Used for making voices that switch between
85 piano staves automatically.")
86         (iterator-ctor . ,ly:auto-change-iterator::constructor)
87         (start-callback . ,ly:music-wrapper::start-callback)
88         (length-callback . ,ly:music-wrapper::length-callback)
89         (types . (music-wrapper-music auto-change-instruction))
90         ))
91
92     (BarCheck
93      . ((description . "Check whether this music coincides with
94 the start of the measure.")
95         (types . (bar-check))
96         (iterator-ctor . ,ly:bar-check-iterator::constructor)
97         ))
98
99     (BassFigureEvent
100      . ((description . "Print a bass-figure text.")
101         (types . (event rhythmic-event bass-figure-event))
102         ))
103
104     (BeamEvent
105      . ((description . "Start or stop a beam.
106
107 Syntax for manual control: @code{c8-[ c c-] c8}")
108         (types . (post-event event beam-event span-event))
109         ))
110
111     (BeamForbidEvent
112      . ((description . "Specify that a note may not auto-beamed.")
113         (types . (post-event event beam-forbid-event))
114         ))
115
116     (BreakDynamicSpanEvent
117      . ((description . "End an alignment spanner for dynamics here.")
118         (types . (post-event break-span-event break-dynamic-span-event event))
119         ))
120
121     (BendAfterEvent
122      . ((description . "A drop/@/fall/@/doit jazz articulation.")
123         (types . (post-event bend-after-event event))))
124
125     (BreathingEvent
126      . ((description . "Create a @q{breath mark} or @q{comma}.
127
128 Syntax: @var{note}@code{\\breathe}")
129
130         (types . (event breathing-event))
131         (midi-length . ,breathe::midi-length)))
132
133     (ClusterNoteEvent
134      . ((description . "A note that is part of a cluster.")
135         ;; not a note-event, to ensure that Note_heads_engraver doesn't eat it.
136         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
137         (types . (cluster-note-event melodic-event rhythmic-event event))
138         ))
139
140     (CompletizeExtenderEvent
141      . ((description . "Used internally to signal the end of a lyrics block to
142 ensure extenders are completed correctly when a @code{Lyrics} context ends
143 before its associated @code{Voice} context.")
144         (types . (completize-extender-event event))
145         ))
146
147     (ContextChange
148      . ((description . "Change staves in Piano staff.
149
150 Syntax: @code{\\change Staff = @var{new-id}}")
151         (iterator-ctor . ,ly:change-iterator::constructor)
152         (types . (translator-change-instruction))
153         ))
154
155     (ContextSpeccedMusic
156      . ((description . "Interpret the argument music within a
157 specific context.")
158         (iterator-ctor . ,ly:context-specced-music-iterator::constructor)
159         (length-callback . ,ly:music-wrapper::length-callback)
160         (start-callback . ,ly:music-wrapper::start-callback)
161         (types . (context-specification music-wrapper-music))
162         ))
163
164     (CrescendoEvent
165      . ((description . "Begin or end a crescendo.
166
167 Syntax: @var{note}@code{\\<} @dots{} @var{note}@code{\\!}
168
169 An alternative syntax is @var{note}@code{\\cr} @dots{}
170 @var{note}@code{\\endcr}.")
171         (types . (post-event span-event span-dynamic-event crescendo-event
172                              event))
173         ))
174
175     (DecrescendoEvent
176      . ((description . "Begin or end a decrescendo.
177
178 Syntax: @var{note}@code{\\>} @dots{} @var{note}@code{\\!}
179
180 An alternative syntax is @var{note}@code{\\decr} @dots{}
181 @var{note}@code{\\enddecr}.")
182         (types . (post-event span-event span-dynamic-event decrescendo-event
183                              event))
184         ))
185
186     (DoublePercentEvent
187      . ((description . "Used internally to signal double percent repeats.")
188         (types . (event double-percent-event rhythmic-event))
189         ))
190
191     (EpisemaEvent
192      . ((description . "Begin or end an episema.")
193         (types . (post-event span-event event episema-event))
194         ))
195
196     (Event
197      . ((description . "Atomic music event.")
198         (types . (event))
199         ))
200
201     (EventChord
202      . ((description . "Explicitly entered chords.
203
204 When iterated, @code{elements} are converted to events at the current
205 timestep, followed by any @code{articulations}.  Per-chord postevents
206 attached by the parser just follow any rhythmic events in
207 @code{elements} instead of utilizing @code{articulations}.
208
209 An unexpanded chord repetition @samp{q} is recognizable by having its
210 duration stored in @code{duration}.")
211         (iterator-ctor . ,ly:event-chord-iterator::constructor)
212         (length-callback . ,ly:music-sequence::event-chord-length-callback)
213         (to-relative-callback .
214                               ,ly:music-sequence::event-chord-relative-callback)
215         (types . (event-chord simultaneous-music))
216         ))
217
218     (ExtenderEvent
219      . ((description . "Extend lyrics.")
220         (types . (post-event extender-event event))
221         ))
222
223     (FingeringEvent
224      . ((description . "Specify what finger to use for this note.")
225         (types . (post-event fingering-event event))
226         ))
227
228     (FootnoteEvent
229      . ((description . "Footnote a grob.")
230         (types . (event footnote-event))
231         ))
232
233     (GlissandoEvent
234      . ((description . "Start a glissando on this note.")
235         (types . (post-event glissando-event event))
236         ))
237
238     (GraceMusic
239      . ((description . "Interpret the argument as grace notes.")
240         (start-callback . ,ly:grace-music::start-callback)
241         (length . ,ZERO-MOMENT)
242         (iterator-ctor . ,ly:grace-iterator::constructor)
243         (types . (grace-music music-wrapper-music))
244         ))
245
246     (HarmonicEvent
247      . ((description . "Mark a note as harmonic.")
248         (types . (post-event event harmonic-event))
249         ))
250
251     (HyphenEvent
252      . ((description . "A hyphen between lyric syllables.")
253         (types . (post-event hyphen-event event))
254         ))
255
256     (KeyChangeEvent
257      . ((description . "Change the key signature.
258
259 Syntax: @code{\\key} @var{name} @var{scale}")
260         (to-relative-callback . ,(lambda (x p) p))
261         (types . (key-change-event event))
262         ))
263
264     (LabelEvent
265      . ((description . "Place a bookmarking label.")
266         (types . (label-event event))
267         ))
268
269     (LaissezVibrerEvent
270      . ((description . "Don't damp this chord.
271
272 Syntax: @var{note}@code{\\laissezVibrer}")
273         (types . (post-event event laissez-vibrer-event))
274         ))
275
276     (LigatureEvent
277      . ((description . "Start or end a ligature.")
278         (types . (span-event ligature-event event))
279         ))
280
281     (LineBreakEvent
282      . ((description . "Allow, forbid or force a line break.")
283         (types . (line-break-event break-event event))
284         ))
285
286     (LyricCombineMusic
287      . ((description . "Align lyrics to the start of notes.
288
289 Syntax: @code{\\lyricsto} @var{voicename} @var{lyrics}")
290         (length . ,ZERO-MOMENT)
291         (types . (lyric-combine-music))
292         (iterator-ctor . ,ly:lyric-combine-music-iterator::constructor)
293         ))
294
295     (LyricEvent
296      . ((description . "A lyric syllable.  Must be entered in lyrics mode,
297 i.e., @code{\\lyrics @{ twinkle4 twinkle4 @} }.")
298         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
299         (types . (rhythmic-event lyric-event event))
300         ))
301
302     (MarkEvent
303      . ((description . "Insert a rehearsal mark.
304
305 Syntax: @code{\\mark} @var{marker}
306
307 Example: @code{\\mark \"A\"}")
308         (types . (mark-event event))
309         ))
310
311     (MeasureCounterEvent
312      . ((description . "Used to signal the start and end of a measure count.")
313         (types . (measure-counter-event span-event event))
314         ))
315
316     (MultiMeasureRestEvent
317      . ((description . "Used internally by @code{MultiMeasureRestMusic}
318 to signal rests.")
319         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
320         (types . (event rhythmic-event multi-measure-rest-event))
321         ))
322
323     (MultiMeasureRestMusic
324      . ((description . "Rests that may be compressed into Multi rests.
325
326 Syntax: @code{R2.*4} for 4 measures in 3/4 time.")
327         (iterator-ctor . ,ly:sequential-iterator::constructor)
328         (elements-callback . ,mm-rest-child-list)
329         (types . (multi-measure-rest))
330         ))
331
332     (MultiMeasureTextEvent
333      . ((description . "Texts on multi measure rests.
334
335 Syntax: @code{R-\\markup @{ \\roman \"bla\" @}}
336
337 Note the explicit font switch.")
338         (types . (post-event event multi-measure-text-event))
339         ))
340
341     (Music
342      . ((description . "Generic type for music expressions.")
343         (types . ())
344         ))
345
346     (NoteEvent
347      . ((description . "A note.
348
349 Outside of chords, any events in @code{articulations} with a listener
350 are broadcast like chord articulations, the others are retained.
351
352 For iteration inside of chords, @xref{EventChord}.")
353         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
354         (types . (event note-event rhythmic-event melodic-event))
355         ))
356
357     (NoteGroupingEvent
358      . ((description . "Start or stop grouping brackets.")
359         (types . (post-event event note-grouping-event))
360         ))
361
362     (OttavaMusic
363      . ((description . "Start or stop an ottava bracket.")
364         (iterator-ctor . ,ly:sequential-iterator::constructor)
365         (elements-callback . ,make-ottava-set)
366         (types . (ottava-music))
367         ))
368
369     (OverrideProperty
370      . ((description . "Extend the definition of a graphical object.
371
372 Syntax: @code{\\override} [ @var{context} @code{.} ]
373 @var{object} @var{property} @code{=} @var{value}")
374         (types . (layout-instruction-event override-property-event))
375         (iterator-ctor . ,ly:push-property-iterator::constructor)
376         (untransposable . #t)
377         ))
378
379     (PageBreakEvent
380      . ((description . "Allow, forbid or force a page break.")
381         (types . (break-event page-break-event event))
382         ))
383
384     (PageTurnEvent
385      . ((description . "Allow, forbid or force a page turn.")
386         (types . (break-event page-turn-event event))
387         ))
388
389     (PartialSet
390      . ((description . "Create an anacrusis or upbeat (partial measure).")
391         (iterator-ctor . ,ly:partial-iterator::constructor)
392         ;; The length-callback is kind of cheesy since 'elements is
393         ;; empty.  We just use that in order to get a zero length
394         ;; for the overall timing in spite of having a non-zero
395         ;; duration field.
396         (length-callback . ,ly:music-sequence::cumulative-length-callback)
397         (types . (partial-set))
398         ))
399
400     (PartCombineMusic
401      . ((description . "Combine two parts on a staff, either merged or
402 as separate voices.")
403         (length-callback . ,ly:music-sequence::maximum-length-callback)
404         (start-callback . ,ly:music-sequence::minimum-start-callback)
405         (types . (part-combine-music))
406         (iterator-ctor . ,ly:part-combine-iterator::constructor)
407         ))
408
409     (PartCombinePartMusic
410      . ((description . "A part to be combined with other parts on a staff.")
411         (length-callback . ,ly:music-wrapper::length-callback)
412         (start-callback . ,ly:music-wrapper::start-callback)
413         (iterator-ctor . ,ly:part-combine-part-iterator::constructor)
414         (types . (part-combine-part-music music-wrapper-music))
415         ))
416
417     (PercentEvent
418      . ((description . "Used internally to signal percent repeats.")
419         (types . (event percent-event rhythmic-event))
420         ))
421
422     (PercentRepeatedMusic
423      . ((description . "Repeats encoded by percents and slashes.")
424         (iterator-ctor . ,ly:percent-repeat-iterator::constructor)
425         (start-callback .  ,ly:repeated-music::first-start)
426         (length-callback . ,ly:repeated-music::unfolded-music-length)
427         (types . (repeated-music percent-repeated-music))
428         ))
429
430     (PesOrFlexaEvent
431      . ((description . "Within a ligature, mark the previous and the
432 following note to form a pes (if melody goes up) or a flexa (if melody
433 goes down).")
434         (types . (pes-or-flexa-event event))
435         ))
436
437     (PhrasingSlurEvent
438      . ((description . "Start or end phrasing slur.
439
440 Syntax: @var{note}@code{\\(} and @var{note}@code{\\)}")
441         (types . (post-event span-event event phrasing-slur-event))
442         ))
443
444     (PostEvents
445      . ((description . "Container for several postevents.
446
447 This can be used to package several events into a single one.  Should not be seen outside of the parser.")
448         (types . (post-event post-event-wrapper))))
449
450     (PropertySet
451      . ((description . "Set a context property.
452
453 Syntax: @code{\\set @var{context}.@var{prop} = @var{scheme-val}}")
454         (types . (layout-instruction-event))
455         (iterator-ctor . ,ly:property-iterator::constructor)
456         (untransposable . #t)
457         ))
458
459     (PropertyUnset
460      . ((description . "Restore the default setting for a context
461 property.  See @ref{PropertySet}.
462
463 Syntax: @code{\\unset @var{context}.@var{prop}}")
464         (types . (layout-instruction-event))
465         (iterator-ctor . ,ly:property-unset-iterator::constructor)
466         ))
467
468     (QuoteMusic
469      . ((description . "Quote preprocessed snippets of music.")
470         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
471         (length-callback . ,ly:music-wrapper::length-callback)
472         (start-callback . ,ly:music-wrapper::start-callback)
473         (types . (music-wrapper-music))
474         ))
475
476     (RelativeOctaveCheck
477      . ((description . "Check if a pitch is in the correct octave.")
478         (to-relative-callback . ,ly:relative-octave-check::relative-callback)
479         (types . (relative-octave-check))
480         ))
481
482     (RelativeOctaveMusic
483      . ((description . "Music in which the assignment of octaves is complete.")
484         (to-relative-callback . ,ly:relative-octave-music::relative-callback)
485         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
486         (length-callback . ,ly:music-wrapper::length-callback)
487         (start-callback . ,ly:music-wrapper::start-callback)
488         (types . (music-wrapper-music relative-octave-music))
489         ))
490
491     (RepeatedMusic
492      . ((description . "Repeat music in different ways.")
493         (types . (repeated-music))
494         ))
495
496     (RepeatSlashEvent
497      . ((description . "Used internally to signal beat repeats.")
498         (types . (event repeat-slash-event rhythmic-event))
499         ))
500
501     (RepeatTieEvent
502      . ((description . "Ties for starting a second volta bracket.")
503         (types . (post-event event repeat-tie-event))
504         ))
505
506     (RestEvent
507      . ((description . "A Rest.
508
509 Syntax: @code{r4} for a quarter rest.")
510         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
511         (types . (event rhythmic-event rest-event))
512         ))
513
514     (RevertProperty
515      . ((description . "The opposite of @ref{OverrideProperty}: remove a
516 previously added property from a graphical object definition.")
517         (types . (layout-instruction-event))
518         (iterator-ctor . ,ly:pop-property-iterator::constructor)
519         ))
520
521     (ScriptEvent
522      . ((description . "Add an articulation mark to a note.")
523         (types . (event))
524         ))
525
526     (SequentialMusic
527      . ((description . "Music expressions concatenated.
528
529 Syntax: @code{\\sequential @{ @dots{} @}} or simply @code{@{ @dots{} @}}")
530         (length-callback . ,ly:music-sequence::cumulative-length-callback)
531         (start-callback . ,ly:music-sequence::first-start-callback)
532         (elements-callback . ,(lambda (m) (ly:music-property m 'elements)))
533         (iterator-ctor . ,ly:sequential-iterator::constructor)
534         (types . (sequential-music))
535         ))
536
537     (SimultaneousMusic
538      . ((description . "Music playing together.
539
540 Syntax: @code{\\simultaneous @{ @dots{} @}} or @code{<< @dots{} >>}")
541         (iterator-ctor . ,ly:simultaneous-music-iterator::constructor)
542         (start-callback . ,ly:music-sequence::minimum-start-callback)
543         (length-callback . ,ly:music-sequence::maximum-length-callback)
544         (to-relative-callback .
545                               ,ly:music-sequence::simultaneous-relative-callback)
546         (types . (simultaneous-music))
547         ))
548
549     (SkipEvent
550      . ((description . "Filler that takes up duration, but does not
551 print anything.
552
553 Syntax: @code{s4} for a skip equivalent to a quarter rest.")
554         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
555         (types . (event rhythmic-event skip-event))
556         ))
557
558     (SkipMusic
559      . ((description . "Filler that takes up duration, does not
560 print anything, and also does not create staves or voices implicitly.
561
562 Syntax: @code{\\skip} @var{duration}")
563         (length-callback . ,ly:music-duration-length)
564         (iterator-ctor . ,ly:simple-music-iterator::constructor)
565         (types . (event skip-event))
566         ))
567
568     (SlurEvent
569      . ((description . "Start or end slur.
570
571 Syntax: @var{note}@code{(} and @var{note}@code{)}")
572         (types . (post-event span-event event slur-event))
573         ))
574
575     (SoloOneEvent
576      . ((description . "Print @q{Solo@tie{}1}.")
577         (part-combine-status . solo1)
578         (types . (event part-combine-event solo-one-event))
579         ))
580
581     (SoloTwoEvent
582      . ((description . "Print @q{Solo@tie{}2}.")
583         (part-combine-status . solo2)
584         (types . (event part-combine-event solo-two-event))
585         ))
586
587     (SostenutoEvent
588      . ((description . "Depress or release sostenuto pedal.")
589         (types . (post-event event pedal-event sostenuto-event))
590         ))
591
592     (SpacingSectionEvent
593      . ((description . "Start a new spacing section.")
594         (types . (event spacing-section-event))))
595
596     (SpanEvent
597      . ((description . "Event for anything that is started at a
598 different time than stopped.")
599         (types . (event))
600         ))
601
602     (StaffSpanEvent
603      . ((description . "Start or stop a staff symbol.")
604         (types . (event span-event staff-span-event))
605         ))
606
607     (StringNumberEvent
608      . ((description . "Specify on which string to play this note.
609
610 Syntax: @code{\\@var{number}}")
611         (types . (post-event string-number-event event))
612         ))
613
614     (StrokeFingerEvent
615      . ((description . "Specify with which finger to pluck a string.
616
617 Syntax: @code{\\rightHandFinger @var{text}}")
618         (types . (post-event stroke-finger-event event))
619         ))
620
621     (SustainEvent
622      . ((description . "Depress or release sustain pedal.")
623         (types . (post-event event pedal-event sustain-event))
624         ))
625
626     (TempoChangeEvent
627      . ((description . "A metronome mark or tempo indication.")
628         (types . (event tempo-change-event))
629         ))
630
631     (TextScriptEvent
632      . ((description . "Print text.")
633         (types . (post-event script-event text-script-event event))
634         ))
635
636     (TextSpanEvent
637      . ((description . "Start a text spanner, for example, an
638 octavation.")
639         (types . (post-event span-event event text-span-event))
640         ))
641
642     (TieEvent
643      . ((description . "A tie.
644
645 Syntax: @w{@var{note}@code{-~}}")
646         (types . (post-event tie-event event))
647         ))
648
649     (TimeScaledMusic
650      . ((description . "Multiply durations, as in tuplets.
651
652 Syntax: @code{\\times @var{fraction} @var{music}}, e.g.,
653 @code{\\times 2/3 @{ @dots{} @}} for triplets.")
654         (length-callback . ,ly:music-wrapper::length-callback)
655         (start-callback . ,ly:music-wrapper::start-callback)
656         (iterator-ctor . ,ly:tuplet-iterator::constructor)
657         (types . (time-scaled-music music-wrapper-music))
658         ))
659
660     (TimeSignatureMusic
661      . ((description . "Set a new time signature")
662         (iterator-ctor . ,ly:sequential-iterator::constructor)
663         (elements-callback . ,make-time-signature-set)
664         (types . (time-signature-music))
665         ))
666
667     (TimeSignatureEvent
668      . ((description . "An event created when setting a new time signature")
669         (types . (event time-signature-event))
670         ))
671
672     (TransposedMusic
673      . ((description . "Music that has been transposed.")
674         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
675         (start-callback . ,ly:music-wrapper::start-callback)
676         (length-callback . ,ly:music-wrapper::length-callback)
677         (to-relative-callback .
678                               ,ly:relative-octave-music::no-relative-callback)
679         (types . (music-wrapper-music transposed-music))
680         ))
681
682     (TremoloEvent
683      . ((description . "Unmeasured tremolo.")
684         (types . (post-event event tremolo-event))
685         ))
686
687     (TremoloRepeatedMusic
688      . ((description . "Repeated notes denoted by tremolo beams.")
689         (iterator-ctor . ,ly:chord-tremolo-iterator::constructor)
690         (start-callback .  ,ly:repeated-music::first-start)
691         (length-callback . ,ly:repeated-music::unfolded-music-length)
692         (types . (repeated-music tremolo-repeated-music))
693         ))
694
695     (TremoloSpanEvent
696      . ((description . "Tremolo over two stems.")
697         (types . (event span-event tremolo-span-event))
698         ))
699
700     (TrillSpanEvent
701      . ((description . "Start a trill spanner.")
702         (types . (post-event span-event event trill-span-event))
703         ))
704
705     (TupletSpanEvent
706      . ((description . "Used internally to signal where tuplet
707 brackets start and stop.")
708         (types . (tuplet-span-event span-event event post-event))
709         ))
710
711     (UnaCordaEvent
712      . ((description . "Depress or release una-corda pedal.")
713         (types . (post-event event pedal-event una-corda-event))
714         ))
715
716     (UnfoldedRepeatedMusic
717      . ((description . "Repeated music which is fully written (and
718 played) out.")
719         (iterator-ctor . ,ly:sequential-iterator::constructor)
720         (elements-callback . ,make-unfolded-set)
721         (start-callback .  ,ly:repeated-music::first-start)
722         (types . (repeated-music unfolded-repeated-music))
723         (length-callback . ,ly:repeated-music::unfolded-music-length)
724         ))
725
726     (UnisonoEvent
727      . ((description . "Print @q{a@tie{}2}.")
728         (part-combine-status . unisono)
729         (types . (event part-combine-event unisono-event))))
730
731     (UnrelativableMusic
732      . ((description . "Music that cannot be converted from relative
733 to absolute notation.  For example, transposed music.")
734         (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
735         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
736         (length-callback . ,ly:music-wrapper::length-callback)
737         (start-callback . ,ly:music-wrapper::start-callback)
738         (types . (music-wrapper-music unrelativable-music))
739         ))
740
741     (VoiceSeparator
742      . ((description . "Separate polyphonic voices in simultaneous music.
743
744 Syntax: @code{\\\\}")
745         (types . (separator))
746         ))
747
748     (VoltaRepeatedMusic
749      . ((description . "Repeats with alternatives placed sequentially.")
750         (iterator-ctor . ,ly:volta-repeat-iterator::constructor)
751         (elements-callback . ,make-volta-set)
752         (start-callback .  ,ly:repeated-music::first-start)
753         (length-callback . ,ly:repeated-music::volta-music-length)
754         (types . (repeated-music volta-repeated-music))
755         ))
756     ))
757
758 (set! music-descriptions
759       (sort music-descriptions alist<?))
760
761 (define-public music-name-to-property-table (make-hash-table 59))
762
763 ;; init hash table,
764 ;; transport description to an object property.
765 (set!
766  music-descriptions
767  (map (lambda (x)
768         (set-object-property! (car x)
769                               'music-description
770                               (cdr (assq 'description (cdr x))))
771         (let ((lst (cdr x)))
772           (set! lst (assoc-set! lst 'name (car x)))
773           (set! lst (assq-remove! lst 'description))
774           (hashq-set! music-name-to-property-table (car x) lst)
775           (cons (car x) lst)))
776       music-descriptions))
777
778 (define-safe-public (make-music name . music-properties)
779   "Create a music object of given name, and set its properties
780 according to @code{music-properties}, a list of alternating property symbols
781 and values. E.g:
782 @example
783   (make-music 'OverrideProperty
784               'symbol 'Stem
785               'grob-property 'thickness
786               'grob-value (* 2 1.5))
787 @end example
788 Instead of a successive symbol and value, an entry in the list may
789 also be an alist or a music object in which case its elements,
790 respectively its @emph{mutable} property list (properties not inherent
791 to the type of the music object) will get taken.
792
793 The argument list will be interpreted left-to-right, so later entries
794 override earlier ones."
795   (if (not (symbol? name))
796       (ly:error (_ "symbol expected: ~S") name))
797   (let ((props (hashq-ref music-name-to-property-table name '())))
798     (if (not (pair? props))
799         (ly:error (_ "cannot find music object: ~S") name))
800     (let ((m (ly:make-music props)))
801       (define (alist-set-props lst)
802         (for-each (lambda (e)
803                     (set! (ly:music-property m (car e)) (cdr e)))
804                   (reverse lst)))
805       (define (set-props mus-props)
806         (if (pair? mus-props)
807             (let ((e (car mus-props))
808                   (mus-props (cdr mus-props)))
809               (cond ((symbol? e)
810                      (set! (ly:music-property m e) (car mus-props))
811                      (set-props (cdr mus-props)))
812                     ((ly:music? e)
813                      (alist-set-props (ly:music-mutable-properties e))
814                      (set-props mus-props))
815                     ((cheap-list? e)
816                      (alist-set-props e)
817                      (set-props mus-props))
818                     (else
819                      (ly:error (_ "bad make-music argument: ~S") e))))))
820       (set-props music-properties)
821       m)))