]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-music-types.scm
*** empty log message ***
[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     (Event
164      . (
165         (description .  "Atomic music event.")
166         (types . (general-music event))
167         ))
168         
169     (EventChord
170      . (
171         (description .  "Internally used to group a set of events.")
172         (iterator-ctor . ,ly:event-chord-iterator::constructor)
173         (length-callback . ,ly:music-sequence::maximum-length-callback)
174         (to-relative-callback . ,ly:music-sequence::event-chord-relative-callback)
175         (types . (general-music event-chord simultaneous-music))
176         ))
177
178     (FingerEvent
179      . (
180         (description . "Specify what finger to use for this note.")
181         (types . (general-music fingering-event event))
182         ))
183     (BeamForbidEvent
184      . (
185         (description . "Specify that a note may not auto-beamed ")
186         (types . (general-music event beam-forbid-event))
187         ))
188     (GlissandoEvent
189      . (
190         (description .  "Start  a glissando on this note.")
191         (types . (general-music glissando-event event))
192         ))
193     
194     (GraceMusic
195      . (
196         (description .  "Interpret the argument as grace notes. ")
197         (start-callback . ,ly:grace-music::start-callback)
198         (length . ,ZERO-MOMENT)
199         (iterator-ctor . ,ly:grace-iterator::constructor)
200         (types . (grace-music music-wrapper-music general-music))
201         ))
202     (NoteGroupingEvent
203      . (
204         (description . "Start or stop grouping brackets.")
205         (types . (general-music event note-grouping-event))
206         ))
207     (HarmonicEvent
208      . (
209         (description . "Mark a note as harmonic")
210         (types . (general-music event harmonic-event))
211         ))
212     (HyphenEvent
213      . (
214         (description .  "A hyphen between lyric syllables.")
215
216         (types . (general-music hyphen-event event))
217         ))
218     
219     (KeyChangeEvent
220      . (
221         (description .  "Change the key signature. 
222
223 Syntax: @code{\\key } @var{name} @var{scale}.")
224         (to-relative-callback . ,(lambda (x p) p))
225         (types . (general-music key-change-event event))
226         ))
227     (LaissezVibrerEvent
228      . ((description . "Don't damp this chord.
229
230 Syntax: @var{note}\\laissezVibrer.")
231
232         (types . (general-music event laissez-vibrer-event))
233         ))
234     (LigatureEvent
235      . (
236         (description .  "Start or end a ligature.")
237         (span-type . ligature)
238         (types . (general-music span-event ligature-event event))
239         ))
240     (LineBreakEvent
241      . (
242         (description .  "Allow, forbid or force a line break.")
243         (types . (general-music break-event event))
244         ))
245     
246     (LyricCombineMusic
247      . (
248         (description .  "Align lyrics to the start of notes.
249
250 Syntax @var{\\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      . (
258         (description .  "A lyric syllable. Must be entered in lyrics mode, i.e.
259 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
260
261         (types . (general-music rhythmic-event lyric-event event))
262         ))
263     (MarkEvent
264      . (
265         (description .  "Insert a rehearsal mark. 
266
267 Syntax: @code{\\mark} @var{marker},
268 e.g. @code{\\mark \"A\"}.")
269
270         (types . (general-music mark-event event))
271         ))
272     (MelismaPlayingEvent
273      . (
274         (description .  "Used internally to signal melismas.")
275         (types . (general-music melisma-playing-event event))
276         ))
277     (ManualMelismaEvent
278      . (
279         (description .  "Start or stop a melisma.
280
281 Syntax: @code{c4\\melisma d\\melismaEnd}.")
282         (types . (general-music melisma-span-event event))
283         ))
284     
285     (MultiMeasureRestEvent
286      . (
287         (description . "Rests that may be compressed into Multi rests. 
288
289 Syntax
290 @code{R2.*4} for 4 measures in 3/4 time. Note the capital R.")
291         (types . (general-music event rhythmic-event multi-measure-rest-event))
292         ))
293     
294     (MultiMeasureRestMusicGroup
295      . (
296         (description .  "Like sequential-music, but specifically intended
297 to group start-mmrest, skip, stop-mmrest sequence. 
298
299 Syntax @code{R2.*5} for 5 measures in 3/4 time.")
300         (length-callback . ,ly:music-sequence::cumulative-length-callback)
301         (start-callback . ,ly:music-sequence::first-start-callback)
302         (iterator-ctor . ,ly:sequential-music-iterator::constructor)
303         (types . (general-music sequential-music))
304         ))
305     
306     (MultiMeasureTextEvent
307      . (
308         (description . "Texts on mm rests. 
309
310 Syntax
311 @code{R-\\markup @{ \\roman \"bla\" @}}. Note the explicit font switch.")
312         (types . (general-music event multi-measure-text-event))
313         ))
314
315     (Music
316      . (
317         (description .  "Generic type for music expressions.")
318
319         (types . (general-music)) 
320         ))
321     (NoteEvent
322      . (
323         (description .  "A note.")
324         (types . (general-music event note-event rhythmic-event melodic-event))
325         ))
326     
327     (OverrideProperty
328      . (
329         (description .  "Extend the definition of a graphical object.
330
331 SYNTAX
332
333 @code{\\override [ @var{Ctxt} . ] @var{Obj} @var{prop} = @var{val}}
334 ")
335         (types . (general-music layout-instruction))
336         (iterator-ctor . ,ly:push-property-iterator::constructor)
337         ))
338     (PageBreakEvent
339      . (
340         (description .  "Allow, forbid or force a page break.")
341         (types . (general-music break-event event))
342         ))
343     (PageTurnEvent
344      . (
345         (description .  "Allow, forbid or force a page turn.")
346         (types . (general-music break-event event))
347         ))
348     (PartCombineMusic
349      . (
350         (description .  "Combine two parts on a staff, either merged or
351 as separate voices.")
352         (length-callback . ,ly:music-sequence::maximum-length-callback)
353         (start-callback . ,ly:music-sequence::minimum-start-callback)
354         (types . (general-music part-combine-music))
355         (iterator-ctor . ,ly:part-combine-iterator::constructor)
356         ))
357     (PhrasingSlurEvent
358      . (
359         (description . "Start or end phrasing slur. 
360
361 Syntax NOTE \\(  and \\) NOTE")
362         (types . (general-music span-event event phrasing-slur-event))
363         ))
364     
365     (PropertySet
366      . (
367         (description .  "Set a context property.
368
369 Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
370         (types . (layout-instruction general-music))
371         (iterator-ctor . ,ly:property-iterator::constructor)
372         ))
373
374     (PropertyUnset
375      . (
376         (description .  "Remove the definition of a context @code{\\property}.")
377
378         (types . (layout-instruction general-music))
379         (iterator-ctor . ,ly:property-unset-iterator::constructor)
380         ))
381
382     (PercentEvent
383      . (
384         (description .  "Used internally to signal percent repeats.")
385         (types . (general-music event percent-event))
386         ))
387
388     (PesOrFlexaEvent
389      . (
390         (description .  "Within a ligature, mark the previous and the
391 following note to form a pes (if melody goes up) or a flexa (if melody
392 goes down).")
393
394         (types . (general-music pes-or-flexa-event event))
395         ))
396
397     (QuoteMusic
398      . (
399         (description . "Quote preprocessed snippets of music. ")
400         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
401         (length-callback . ,ly:music-wrapper::length-callback)
402         (start-callback . ,ly:music-wrapper::start-callback)
403         (types . (general-music music-wrapper-music))
404         ))
405     
406     (RelativeOctaveCheck
407      . ((description . "Check if a pitch is in the correct octave.")
408         (to-relative-callback . ,ly:relative-octave-check::relative-callback)
409         (types . (general-music relative-octave-check))
410         ))
411     
412     (RepeatedMusic
413      . (
414         (description .  "Repeat music in different ways")
415         (types . (general-music repeated-music))
416         ))
417     (RepeatTieEvent
418      . (
419         (description . "Ties for starting a second volta bracket.")
420         (types . (general-music event repeat-tie-event))
421         ))
422     (RestEvent
423      . (
424         (description .  "A Rest. 
425
426 Syntax @code{r4} for a quarter rest. ")
427
428         (types . (general-music event rhythmic-event rest-event))
429         )) 
430     (RevertProperty
431      . (
432         (description .  "The opposite of @ref{OverrideProperty}: remove a
433 previously added property from a graphical object definition
434  ")
435
436         (types . (general-music layout-instruction))
437         (iterator-ctor . ,      ly:pop-property-iterator::constructor)
438         ))
439
440     (SequentialMusic
441      . (
442         (description .  "Music expressions concatenated. 
443
444 Syntax \\sequential @{..@} or simply @{..@} .")
445
446         (length-callback . ,ly:music-sequence::cumulative-length-callback)
447         (start-callback . ,ly:music-sequence::first-start-callback)
448         (iterator-ctor . ,ly:sequential-music-iterator::constructor)
449         (types . (general-music sequential-music))
450         ))
451
452     (SoloOneEvent
453      . (
454         (description . "Print Solo.1")
455         (part-combine-status . solo1)
456         (types . (general-music event part-combine-event))
457         ))
458     (SoloTwoEvent
459      . (
460         (description . "Print Solo.2")
461         (part-combine-status . solo2)
462         (types . (general-music event part-combine-event))
463         ))
464     (UnisonoEvent
465      . ((description . "Print a2")
466         (part-combine-status . unisono)
467         (types . (general-music event part-combine-event))))
468     
469     (SimultaneousMusic
470      . (
471         (description .  "Music playing together.
472
473 SYNTAX
474
475 @code{ \\simultaneous @{ .. @}} or << .. >>.")
476
477         (iterator-ctor . ,ly:simultaneous-music-iterator::constructor)
478         (start-callback . ,ly:music-sequence::minimum-start-callback)
479         (length-callback . ,ly:music-sequence::maximum-length-callback)
480         (to-relative-callback . ,ly:music-sequence::simultaneous-relative-callback)
481         
482         (types . (general-music simultaneous-music))
483         ))
484     
485     (SlurEvent
486      . (
487         (description . "Start or end slur. 
488
489 Syntax NOTE(     and NOTE) ")
490
491         (types . (general-music span-event event slur-event))
492         ))
493     
494     (StaffSpanEvent
495      . ((description . "Start or  stop a staff symbol.")
496         (types . (general-music event span-event staff-span-event))
497      ))
498     
499     (StartPlayingEvent
500      . (
501         (description .  "Used internally to signal beginning of notes.")
502
503         (types . (general-music event start-playing-event))
504         ))
505     
506     (TextSpanEvent
507      . (
508         (description . "Start a text spanner like 8va.....|")
509         (types . (general-music span-event event text-span-event))
510         ))
511     
512     (TrillSpanEvent
513      . (
514         (description . "Start a trill spanner tr~~~")
515         (types . (general-music span-event event trill-span-event))
516         ))
517     
518     (TransposedMusic
519      . (
520         (description .  "Music that has been transposed.")
521         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
522         (start-callback . ,ly:music-wrapper::start-callback)
523         (length-callback . ,ly:music-wrapper::length-callback)
524         (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
525         (types . (music-wrapper-music general-music transposed-music))
526         ))
527
528     (TimeScaledMusic
529      . (
530         (description .  "Multiply durations, as in tuplets. 
531
532 Syntax @code{\\times @var{fraction} @var{music}}, e.g.
533 @code{\\times 2/3 @{ ... @}} for triplets.
534  ")
535         (length-callback . ,ly:music-wrapper::length-callback)
536         (start-callback . ,ly:music-wrapper::start-callback)
537         (iterator-ctor . ,ly:time-scaled-music-iterator::constructor)
538         (types . (time-scaled-music music-wrapper-music general-music))
539         ))
540
541     (TupletEvent
542      . (
543         (description .  "Used internally to signal where tuplet brackets start and stop.")
544         (types . (tuplet-spanner-event span-event event general-music))
545        ))
546
547     (UnrelativableMusic
548      . (
549         (description .  "Music that can not be converted from relative to absolute notation.
550 For example, transposed music.")
551         (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
552         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
553         (length-callback . ,ly:music-wrapper::length-callback)
554         (types . (music-wrapper-music general-music unrelativable-music))
555         ))
556
557     (RelativeOctaveMusic
558      . (
559         (description .  "Music that was entered in relative octave notation.")
560         (to-relative-callback . ,ly:relative-octave-music::relative-callback)
561         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
562         (length-callback . ,ly:music-wrapper::length-callback)
563         (start-callback . ,ly:music-wrapper::start-callback)
564         (types . (music-wrapper-music general-music relative-octave-music))
565         ))
566     (ScriptEvent
567      . (
568         (description .  "Add an articulation mark to a note. ")
569
570         (types . (general-music event))
571         ))
572
573     (SkipMusic
574      . (
575         (description .  "Filler that takes up duration, does not print anything, and also
576 does not create staffs or voices implicitly.
577
578
579
580 Syntax: @code{\\skip }@var{duration}.")
581         (length-callback . ,ly:music-duration-length)
582         (iterator-ctor . ,ly:simple-music-iterator::constructor)
583         (types . (general-music event rhythmic-event skip-event))
584         ))
585     
586     (SkipEvent
587      . (
588         (description .  "Filler that takes up duration, but does not print anything.
589
590
591
592 Syntax: @code{s}@var{duration}")
593
594         (types . (general-music event rhythmic-event skip-event))
595         ))
596
597     (SpacingSectionEvent
598      . ((description . "Start a new spacing section")
599         (types . (general-music event spacing-section-event))))
600      
601     (SpanEvent
602      . (
603         (description .  "Event for anything that is started at a different time than stopped.")
604
605         (types . (general-music event))
606         ))
607     
608     (SustainEvent
609      . (
610         (description . "Depress or release sustain pedal. ")
611         (types . (general-music event pedal-event sustain-pedal-event))
612         ))
613     
614     (SostenutoEvent
615      . (
616         (description . "Depress or release sostenuto pedal. ")
617         (types . (general-music event pedal-event sostenuto-pedal-event))
618         ))
619     
620     (UnaCordaEvent
621      . (
622         (description . "Depress or release una-corda pedal.")
623         (types . (general-music event pedal-event una-corda-pedal-event))
624         ))
625     
626     (StringNumberEvent
627      . (
628         (description .  "Specify on which string to play this note. 
629
630 Syntax: @code{\\@var{number}}.")
631
632         (types . (general-music string-number-event event))
633         )) 
634
635     (MetronomeChangeEvent
636      . (
637         (description .  "Change tempo setting (in beats per minute).")
638         (types . (general-music metronome-change-event tempo-event event))
639         ))
640     
641     (TextScriptEvent
642      . (
643         (description .  "")
644         (types . (general-music script-event text-script-event event))
645         )) 
646     (TieEvent
647      . (
648         (description .  "A tie.  Entered as @var{note}-~.")
649         (types . (general-music tie-event event))
650         ))
651     (TremoloEvent
652      . (
653         (description . "Un measured tremolo.")
654         (types . (general-music event tremolo-event))
655         ))
656     
657     (TremoloSpanEvent
658      . (
659         (description . "Tremolo over two stems")
660         (types . (general-music event span-event tremolo-span-event))
661         ))
662
663     (VoiceSeparator
664      . (
665         (description .  "Separate polyphonic voices in simultaneous music. 
666
667 Syntax: @code{\\\\}")
668
669         (types . (separator general-music))
670         ))
671
672     (VoltaRepeatedMusic
673      . (
674         (iterator-ctor . ,ly:volta-repeat-iterator::constructor)
675         (description . "")
676         (start-callback .  ,ly:repeated-music::first-start)
677         (length-callback . ,ly:repeated-music::volta-music-length)
678         (types . (general-music repeated-music volta-repeated-music))
679         ))
680     
681     (UnfoldedRepeatedMusic
682      . (
683         (iterator-ctor . ,ly:unfolded-repeat-iterator::constructor)
684         (description .  "")
685         (start-callback .  ,ly:repeated-music::first-start)
686         (types . (general-music repeated-music unfolded-repeated-music))
687         (length-callback . ,ly:repeated-music::unfolded-music-length)
688         ))
689     (PercentRepeatedMusic
690      . (
691         (description .  "Repeats encoded by percents.")
692         (iterator-ctor . ,ly:percent-repeat-iterator::constructor)
693         (start-callback .  ,ly:repeated-music::first-start)
694         (length-callback . ,ly:repeated-music::unfolded-music-length)
695         (types . (general-music repeated-music percent-repeated-music))
696         ))
697     
698     (TremoloRepeatedMusic
699      . (
700         (iterator-ctor . ,ly:chord-tremolo-iterator::constructor)
701         (description .  "Repeated notes denoted by tremolo beams.")
702         (start-callback .  ,ly:repeated-music::first-start)
703
704         ;; the length of the repeat is handled by shifting the note logs
705         (length-callback . ,ly:repeated-music::folded-music-length)
706         (types . (general-music repeated-music tremolo-repeated-music))
707         
708         ))
709     
710     (FoldedRepeatedMusic
711      . (
712         (description .  "Repeats with alternatives placed in parallel. ")
713         (iterator-ctor  . ,ly:folded-repeat-iterator::constructor)
714         (start-callback .  ,ly:repeated-music::minimum-start)
715         (length-callback . ,ly:repeated-music::folded-music-length)
716         (types . (general-music repeated-music folded-repeated-music))
717         ))
718     ))
719
720 (set! music-descriptions
721       (sort music-descriptions alist<?))
722
723 (define-public music-name-to-property-table (make-vector 59 '()))
724
725 ;; init hash table,
726 ;; transport description to an object property.
727 (set!
728  music-descriptions
729  (map (lambda (x)
730         (set-object-property! (car x)
731                               'music-description
732                               (cdr (assq 'description (cdr x))))
733         (let ((lst (cdr x)))
734           (set! lst (assoc-set! lst 'name (car x)))
735           (set! lst (assq-remove! lst 'description))
736           (hashq-set! music-name-to-property-table (car x) lst)
737           (cons (car x) lst)))
738       music-descriptions))
739
740 (define-safe-public (make-music name . music-properties)
741   "Create a music object of given name, and set its properties
742 according to `music-properties', a list of alterning property symbols
743 and values. E.g:
744   (make-music 'OverrideProperty 
745               'symbol 'Stem
746               'grob-property 'thickness
747               'grob-value (* 2 1.5))"
748   (if (not (symbol? name))
749       (ly:error (_ "symbol expected: ~S") name))
750   (let ((props (hashq-ref music-name-to-property-table name '())))
751     (if (not (pair? props))
752         (ly:error (_ "can't find music object: ~S") name))
753     (let ((m (ly:make-music props)))
754       (define (set-props mus-props)
755         (if (and (not (null? mus-props))
756                  (not (null? (cdr mus-props))))
757             (begin
758               (set! (ly:music-property m (car mus-props)) (cadr mus-props))
759               (set-props (cddr mus-props)))))
760       (set-props music-properties)
761       m)))
762
763 (define-public (make-repeated-music name)
764   (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic)
765                                ("unfold" . UnfoldedRepeatedMusic)
766                                ("percent" . PercentRepeatedMusic)
767                                ("tremolo" . TremoloRepeatedMusic)
768                                ("fold" . FoldedRepeatedMusic))))
769          (music-name (if (pair? handle)
770                          (cdr handle)
771                          (begin
772                            (ly:warning (_ "unknown repeat type `~S'") name)
773                            (ly:warning (_ "See music-types.scm for supported repeats"))
774                            'VoltaRepeatedMusic))))
775     (make-music music-name)))
776