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