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