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