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