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