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