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