]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-music-types.scm
Doc-fr: Learning Manual full update
[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--2009 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 Notation Reference 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{\\<} @dots{} @var{note}@code{\\!}
151
152 An alternative syntax is @var{note}@code{\\cr} @dots{}
153 @var{note}@code{\\endcr}.")
154         (types . (general-music span-event span-dynamic-event crescendo-event
155                   event))
156         ))
157
158     (DecrescendoEvent
159      . ((description . "Begin or end a decrescendo.
160
161 Syntax: @var{note}@code{\\>} @dots{} @var{note}@code{\\!}
162
163 An alternative syntax is @var{note}@code{\\decr} @dots{}
164 @var{note}@code{\\enddecr}.")
165         (types . (general-music span-event span-dynamic-event decrescendo-event
166                   event))
167         ))
168
169     (ExtenderEvent
170      . ((description . "Extend lyrics.")
171         (types . (general-music extender-event event))
172         ))
173
174     (Event
175      . ((description . "Atomic music event.")
176         (types . (general-music event))
177         ))
178
179     (EventChord
180      . ((description . "Internally used to group a set of events.")
181         (iterator-ctor . ,ly:event-chord-iterator::constructor)
182         (length-callback . ,ly:music-sequence::maximum-length-callback)
183         (to-relative-callback .
184          ,ly:music-sequence::event-chord-relative-callback)
185         (types . (general-music event-chord simultaneous-music))
186         ))
187
188     (FingeringEvent
189      . ((description . "Specify what finger to use for this note.")
190         (types . (general-music fingering-event event))
191         ))
192
193     (GlissandoEvent
194      . ((description . "Start a glissando on this note.")
195         (types . (general-music glissando-event event))
196         ))
197
198     (GraceMusic
199      . ((description . "Interpret the argument as grace notes.")
200         (start-callback . ,ly:grace-music::start-callback)
201         (length . ,ZERO-MOMENT)
202         (iterator-ctor . ,ly:grace-iterator::constructor)
203         (types . (grace-music music-wrapper-music general-music))
204         ))
205
206     (HarmonicEvent
207      . ((description . "Mark a note as harmonic.")
208         (types . (general-music event harmonic-event))
209         ))
210
211     (HyphenEvent
212      . ((description . "A hyphen between lyric syllables.")
213         (types . (general-music hyphen-event event))
214         ))
215
216     (KeyChangeEvent
217      . ((description . "Change the key signature.
218
219 Syntax: @code{\\key} @var{name} @var{scale}")
220         (to-relative-callback . ,(lambda (x p) p))
221         (types . (general-music key-change-event event))
222         ))
223
224     (LabelEvent
225      . ((description . "Place a bookmarking label.")
226         (types . (general-music label-event event))
227         ))
228
229     (LaissezVibrerEvent
230      . ((description . "Don't damp this chord.
231
232 Syntax: @var{note}@code{\\laissezVibrer}")
233         (types . (general-music event laissez-vibrer-event))
234         ))
235
236     (LigatureEvent
237      . ((description . "Start or end a ligature.")
238         (span-type . ligature)
239         (types . (general-music span-event ligature-event event))
240         ))
241
242     (LineBreakEvent
243      . ((description . "Allow, forbid or force a line break.")
244         (types . (general-music line-break-event break-event event))
245         ))
246
247     (LyricCombineMusic
248      . ((description . "Align lyrics to the start of notes.
249
250 Syntax: @code{\\lyricsto} @var{voicename} @var{lyrics}")
251         (length . ,ZERO-MOMENT)
252         (types . (general-music lyric-combine-music))
253         (iterator-ctor . ,ly:lyric-combine-music-iterator::constructor)
254         ))
255
256     (LyricEvent
257      . ((description . "A lyric syllable.  Must be entered in lyrics mode,
258 i.e., @code{\\lyrics @{ twinkle4 twinkle4 @} }.")
259         (types . (general-music rhythmic-event lyric-event event))
260         ))
261
262     (MarkEvent
263      . ((description . "Insert a rehearsal mark.
264
265 Syntax: @code{\\mark} @var{marker}
266
267 Example: @code{\\mark \"A\"}")
268         (types . (general-music mark-event event))
269         ))
270
271     (MultiMeasureRestEvent
272      . ((description . "Used internally by @code{MultiMeasureRestMusic}
273 to signal rests.")
274         (types . (general-music event rhythmic-event
275                   multi-measure-rest-event))
276         ))
277
278     (MultiMeasureRestMusic
279      . ((description . "Rests that may be compressed into Multi rests.
280
281 Syntax: @code{R2.*4} for 4 measures in 3/4 time.")
282         (iterator-ctor . ,ly:sequential-iterator::constructor)
283         (elements-callback . ,mm-rest-child-list)
284         (types . (general-music multi-measure-rest))
285         ))
286
287     (MultiMeasureTextEvent
288      . ((description . "Texts on multi measure rests.
289
290 Syntax: @code{R-\\markup @{ \\roman \"bla\" @}}
291
292 Note the explicit font switch.")
293         (types . (general-music event multi-measure-text-event))
294         ))
295
296     (Music
297      . ((description . "Generic type for music expressions.")
298         (types . (general-music))
299         ))
300
301     (NoteEvent
302      . ((description . "A note.")
303         (types . (general-music event note-event rhythmic-event
304                   melodic-event))
305         ))
306
307     (NoteGroupingEvent
308      . ((description . "Start or stop grouping brackets.")
309         (types . (general-music event note-grouping-event))
310         ))
311
312     (OverrideProperty
313      . ((description . "Extend the definition of a graphical object.
314
315 Syntax: @code{\\override} [ @var{context} @code{.} ]
316 @var{object} @var{property} @code{=} @var{value}")
317         (types . (general-music layout-instruction-event
318                   override-property-event))
319         (iterator-ctor . ,ly:push-property-iterator::constructor)
320         ))
321
322     (PageBreakEvent
323      . ((description . "Allow, forbid or force a page break.")
324         (types . (general-music break-event page-break-event event))
325         ))
326
327     (PageTurnEvent
328      . ((description . "Allow, forbid or force a page turn.")
329         (types . (general-music break-event page-turn-event event))
330         ))
331
332     (PartCombineMusic
333      . ((description . "Combine two parts on a staff, either merged or
334 as separate voices.")
335         (length-callback . ,ly:music-sequence::maximum-length-callback)
336         (start-callback . ,ly:music-sequence::minimum-start-callback)
337         (types . (general-music part-combine-music))
338         (iterator-ctor . ,ly:part-combine-iterator::constructor)
339         ))
340
341     (PercentEvent
342      . ((description . "Used internally to signal percent repeats.")
343         (types . (general-music event percent-event rhythmic-event))
344         ))
345
346     (PercentRepeatedMusic
347      . ((description . "Repeats encoded by percents.")
348         (iterator-ctor . ,ly:percent-repeat-iterator::constructor)
349         (start-callback .  ,ly:repeated-music::first-start)
350         (length-callback . ,ly:repeated-music::unfolded-music-length)
351         (types . (general-music repeated-music percent-repeated-music))
352         ))
353
354     (PesOrFlexaEvent
355      . ((description . "Within a ligature, mark the previous and the
356 following note to form a pes (if melody goes up) or a flexa (if melody
357 goes down).")
358         (types . (general-music pes-or-flexa-event event))
359         ))
360
361     (PhrasingSlurEvent
362      . ((description . "Start or end phrasing slur.
363
364 Syntax: @var{note}@code{\\(} and @var{note}@code{\\)}")
365         (types . (general-music span-event event phrasing-slur-event))
366         ))
367
368     (PropertySet
369      . ((description . "Set a context property.
370
371 Syntax: @code{\\set @var{context}.@var{prop} = @var{scheme-val}}")
372         (types . (layout-instruction-event general-music))
373         (iterator-ctor . ,ly:property-iterator::constructor)
374         ))
375
376     (PropertyUnset
377      . ((description . "Restore the default setting for a context
378 property.  See @ref{PropertySet}.
379
380 Syntax: @code{\\unset @var{context}.@var{prop}}")
381         (types . (layout-instruction-event general-music))
382         (iterator-ctor . ,ly:property-unset-iterator::constructor)
383         ))
384
385     (QuoteMusic
386      . ((description . "Quote preprocessed snippets of music.")
387         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
388         (length-callback . ,ly:music-wrapper::length-callback)
389         (start-callback . ,ly:music-wrapper::start-callback)
390         (types . (general-music music-wrapper-music))
391         ))
392
393     (RelativeOctaveCheck
394      . ((description . "Check if a pitch is in the correct octave.")
395         (to-relative-callback . ,ly:relative-octave-check::relative-callback)
396         (types . (general-music relative-octave-check))
397         ))
398
399     (RelativeOctaveMusic
400      . ((description . "Music that was entered in relative octave notation.")
401         (to-relative-callback . ,ly:relative-octave-music::relative-callback)
402         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
403         (length-callback . ,ly:music-wrapper::length-callback)
404         (start-callback . ,ly:music-wrapper::start-callback)
405         (types . (music-wrapper-music general-music relative-octave-music))
406         ))
407
408     (RepeatTieEvent
409      . ((description . "Ties for starting a second volta bracket.")
410         (types . (general-music event repeat-tie-event))
411         ))
412
413     (RepeatedMusic
414      . ((description . "Repeat music in different ways.")
415         (types . (general-music repeated-music))
416         ))
417
418     (RestEvent
419      . ((description . "A Rest.
420
421 Syntax: @code{r4} for a quarter rest.")
422         (types . (general-music event rhythmic-event rest-event))
423         ))
424
425     (RevertProperty
426      . ((description . "The opposite of @ref{OverrideProperty}: remove a
427 previously added property from a graphical object definition.")
428         (types . (general-music layout-instruction-event))
429         (iterator-ctor . ,ly:pop-property-iterator::constructor)
430         ))
431
432     (ScriptEvent
433      . ((description . "Add an articulation mark to a note.")
434         (types . (general-music event))
435         ))
436
437     (SequentialMusic
438      . ((description . "Music expressions concatenated.
439
440 Syntax: @code{\\sequential @{ @dots{} @}} or simply @code{@{ @dots{} @}}")
441         (length-callback . ,ly:music-sequence::cumulative-length-callback)
442         (start-callback . ,ly:music-sequence::first-start-callback)
443         (elements-callback . ,(lambda (m) (ly:music-property m 'elements)))
444         (iterator-ctor . ,ly:sequential-iterator::constructor)
445         (types . (general-music sequential-music))
446         ))
447
448     (SimultaneousMusic
449      . ((description . "Music playing together.
450
451 Syntax: @code{\\simultaneous @{ @dots{} @}} or @code{<< @dots{} >>}")
452         (iterator-ctor . ,ly:simultaneous-music-iterator::constructor)
453         (start-callback . ,ly:music-sequence::minimum-start-callback)
454         (length-callback . ,ly:music-sequence::maximum-length-callback)
455         (to-relative-callback .
456          ,ly:music-sequence::simultaneous-relative-callback)
457         (types . (general-music simultaneous-music))
458         ))
459
460     (SkipEvent
461      . ((description . "Filler that takes up duration, but does not
462 print anything.
463
464 Syntax: @code{s4} for a skip equivalent to a quarter rest.")
465         (types . (general-music event rhythmic-event skip-event))
466         ))
467
468     (SkipMusic
469      . ((description . "Filler that takes up duration, does not
470 print anything, and also does not create staves or voices implicitly.
471
472 Syntax: @code{\\skip} @var{duration}")
473         (length-callback . ,ly:music-duration-length)
474         (iterator-ctor . ,ly:simple-music-iterator::constructor)
475         (types . (general-music event rhythmic-event skip-event))
476         ))
477
478     (SlurEvent
479      . ((description . "Start or end slur.
480
481 Syntax: @var{note}@code{(} and @var{note}@code{)}")
482         (types . (general-music span-event event slur-event))
483         ))
484
485     (SoloOneEvent
486      . ((description . "Print @q{Solo@tie{}1}.")
487         (part-combine-status . solo1)
488         (types . (general-music event part-combine-event solo-one-event))
489         ))
490
491     (SoloTwoEvent
492      . ((description . "Print @q{Solo@tie{}2}.")
493         (part-combine-status . solo2)
494         (types . (general-music event part-combine-event solo-two-event))
495         ))
496
497     (SostenutoEvent
498      . ((description . "Depress or release sostenuto pedal.")
499         (types . (general-music event pedal-event sostenuto-event))
500         ))
501
502     (SpacingSectionEvent
503      . ((description . "Start a new spacing section.")
504         (types . (general-music event spacing-section-event))))
505
506     (SpanEvent
507      . ((description . "Event for anything that is started at a
508 different time than stopped.")
509         (types . (general-music event))
510         ))
511
512     (StaffSpanEvent
513      . ((description . "Start or stop a staff symbol.")
514         (types . (general-music event span-event staff-span-event))
515      ))
516
517     (StringNumberEvent
518      . ((description . "Specify on which string to play this note.
519
520 Syntax: @code{\\@var{number}}")
521         (types . (general-music string-number-event event))
522         ))
523
524     (StrokeFingerEvent
525      . ((description . "Specify with which finger to pluck a string.
526
527 Syntax: @code{\\rightHandFinger @var{text}}")
528         (types . (general-music stroke-finger-event event))
529         ))
530
531     (SustainEvent
532      . ((description . "Depress or release sustain pedal.")
533         (types . (general-music event pedal-event sustain-event))
534         ))
535
536     (TextScriptEvent
537      . ((description . "Print text.")
538         (types . (general-music script-event text-script-event event))
539         ))
540
541     (TextSpanEvent
542      . ((description . "Start a text spanner, for example, an
543 octavation.")
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.")
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 alternating 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          (music-name (if (pair? handle)
698                          (cdr handle)
699                          (begin
700                            (ly:warning (_ "unknown repeat type `~S'") name)
701                            (ly:warning (_ "See define-music-types.scm for supported repeats"))
702                            'VoltaRepeatedMusic))))
703     (make-music music-name)))