]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-music-types.scm
Merge branch 'master' of ssh://jomand@git.sv.gnu.org/srv/git/lilypond into topic...
[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
34     (AnnotateOutputEvent
35      . ((description . "Print an annotation of an output element.")
36         (types . (general-music event annotate-output-event))
37         ))
38         
39     (ApplyContext
40      . (
41         (description . "Call the argument with the current context during interpreting phase")
42         (types . (general-music apply-context))
43         (iterator-ctor . ,ly:apply-context-iterator::constructor)
44         ))
45     
46     (ApplyOutputEvent
47      . (
48         (description . "
49 Call the argument with all current grobs during interpreting phase.
50
51 Syntax
52
53 \\applyOutput #'Context FUNC
54
55 arguments to func are 1. the grob, 2. the originating context,
56 3. context where FUNC is called.
57
58 ")
59         (types . (general-music event apply-output-event))
60         ))
61     (ArpeggioEvent 
62      . (
63         (description .  "Make an arpeggio on this note.
64
65 Syntax:
66 @var{note}-@code{\\arpeggio}")
67         (types . (general-music arpeggio-event event))
68         ))
69
70     ;; todo: use articulation-event for slur as well.
71     ;; separate non articulation scripts  
72     (ArticulationEvent
73      . (
74         (description .  "Adds an articulation marking to a note.  
75
76 Syntax:
77 @var{note}@code{X}@code{Y}, where X is a direction (up @code{^}, down
78 @code{_}, or LilyPond's choice (no direction specified)), and where Y
79 is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto},
80 @code{\\downbow}).  See the user manual for details.")
81
82         (types . (general-music event articulation-event script-event))
83         )) 
84     (AutoChangeMusic
85      . (
86         (description .  "Used for making voices that switch between piano staves automatically.")
87         (iterator-ctor . ,ly:auto-change-iterator::constructor)
88         (start-callback . ,ly:music-wrapper::start-callback)
89         (length-callback . ,ly:music-wrapper::length-callback)
90         (types . (general-music music-wrapper-music auto-change-instruction))
91         ))
92     (BarCheck
93      . (
94         (description .
95                      "Check whether this music coincides with the start of the measure.")
96         (types . (general-music bar-check))
97         (iterator-ctor . ,ly:bar-check-iterator::constructor)
98         ))
99     (BassFigureEvent
100      . (
101         (description .  "Print a bass-figure text")
102
103         (types . (general-music event rhythmic-event bass-figure-event))
104         ))
105     
106     (BeamEvent
107      . (
108         (description .  "Starts or stops a beam.  
109
110 Syntax for manual control:
111 c8-[ c c-] c8")
112         (types . (general-music event beam-event span-event))
113         ))
114     (BendAfterEvent
115      . ((description . "A drop/fall/doit jazz articulation")
116         (types . (general-music bend-after-event event))))
117
118     (BreathingEvent
119      . (
120         (description .  "Creates a `breath mark' or `comma'.  
121
122 Syntax:
123 @var{note}\\breathe.")
124
125         (types . (general-music event breathing-event))
126         )) 
127     (ContextChange
128      . (
129         (description .  "Change staves in Piano staff. 
130
131 Syntax @code{\\translator Staff = @var{new-id}}.")
132         (iterator-ctor . , ly:change-iterator::constructor)
133         (types . (general-music translator-change-instruction))
134         ))
135
136     (ClusterNoteEvent
137      . ((description .  "A note that is part of a cluster.")
138
139         ;; not a note-event, to ensure that Note_engraver doesn't eat it. 
140         (types . (general-music cluster-note-event melodic-event rhythmic-event event))
141         ))
142     
143     (ContextSpeccedMusic
144      . (
145         (description .  "Interpret the argument music within a specific context.")
146         (iterator-ctor . ,ly:context-specced-music-iterator::constructor)
147         (length-callback . ,ly:music-wrapper::length-callback)
148         (start-callback . ,ly:music-wrapper::start-callback)
149         (types . (context-specification general-music music-wrapper-music))
150         ))
151     
152     (CrescendoEvent
153      . (
154         (description .  "Begins or ends a crescendo.  
155
156 Syntax: @var{note}\\cr
157 ... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
158 \\endcresc.  See the user manual for details.).")
159
160         (types . (general-music span-event span-dynamic-event crescendo-event event))
161         )) 
162     (DecrescendoEvent
163      . (
164         (description .  "See @ref{CrescendoEvent}.")
165
166         (types . (general-music span-event span-dynamic-event decrescendo-event event))
167         ))
168     
169     (ExtenderEvent
170      . (
171         (description .  "Extend lyrics.")
172
173         (types . (general-music extender-event event))
174         ))
175
176     (Event
177      . (
178         (description .  "Atomic music event.")
179         (types . (general-music event))
180         ))
181         
182     (EventChord
183      . (
184         (description .  "Internally used to group a set of events.")
185         (iterator-ctor . ,ly:event-chord-iterator::constructor)
186         (length-callback . ,ly:music-sequence::maximum-length-callback)
187         (to-relative-callback . ,ly:music-sequence::event-chord-relative-callback)
188         (types . (general-music event-chord simultaneous-music))
189         ))
190
191     
192     (FingeringEvent
193      . (
194         (description . "Specify what finger to use for this note.")
195         (types . (general-music fingering-event event))
196         ))
197     (BeamForbidEvent
198      . (
199         (description . "Specify that a note may not auto-beamed ")
200         (types . (general-music event beam-forbid-event))
201         ))
202     (GlissandoEvent
203      . (
204         (description .  "Start  a glissando on this note.")
205         (types . (general-music glissando-event event))
206         ))
207     
208     (GraceMusic
209      . (
210         (description .  "Interpret the argument as grace notes. ")
211         (start-callback . ,ly:grace-music::start-callback)
212         (length . ,ZERO-MOMENT)
213         (iterator-ctor . ,ly:grace-iterator::constructor)
214         (types . (grace-music music-wrapper-music general-music))
215         ))
216     (NoteGroupingEvent
217      . (
218         (description . "Start or stop grouping brackets.")
219         (types . (general-music event note-grouping-event))
220         ))
221     (HarmonicEvent
222      . (
223         (description . "Mark a note as harmonic")
224         (types . (general-music event harmonic-event))
225         ))
226     (HyphenEvent
227      . (
228         (description .  "A hyphen between lyric syllables.")
229
230         (types . (general-music hyphen-event event))
231         ))
232     
233     (KeyChangeEvent
234      . (
235         (description .  "Change the key signature. 
236
237 Syntax: @code{\\key } @var{name} @var{scale}.")
238         (to-relative-callback . ,(lambda (x p) p))
239         (types . (general-music key-change-event event))
240         ))
241     (LabelEvent
242      . ((description . "Place a bookmarking label")
243         (types . (general-music label-event event))))
244     (LaissezVibrerEvent
245      . ((description . "Don't damp this chord.
246
247 Syntax: @var{note}\\laissezVibrer.")
248
249         (types . (general-music event laissez-vibrer-event))
250         ))
251     (LigatureEvent
252      . (
253         (description .  "Start or end a ligature.")
254         (span-type . ligature)
255         (types . (general-music span-event ligature-event event))
256         ))
257     (LineBreakEvent
258      . (
259         (description .  "Allow, forbid or force a line break.")
260         (types . (general-music line-break-event break-event event))
261         ))
262     
263     (LyricCombineMusic
264      . (
265         (description .  "Align lyrics to the start of notes.
266
267 Syntax @var{\\lyricsto }@var{voicename} @var{lyrics}.")
268         (length . ,ZERO-MOMENT)
269         (types . (general-music lyric-combine-music))
270         (iterator-ctor . ,ly:lyric-combine-music-iterator::constructor)
271         ))
272
273     (LyricEvent
274      . (
275         (description .  "A lyric syllable. Must be entered in lyrics mode, i.e.
276 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
277
278         (types . (general-music rhythmic-event lyric-event event))
279         ))
280     (MarkEvent
281      . (
282         (description .  "Insert a rehearsal mark. 
283
284 Syntax: @code{\\mark} @var{marker},
285 e.g. @code{\\mark \"A\"}.")
286
287         (types . (general-music mark-event event))
288         ))
289     (MultiMeasureRestMusic
290      . (
291         (description . "Rests that may be compressed into Multi rests. 
292
293 Syntax
294 @code{R2.*4} for 4 measures in 3/4 time.")
295         (iterator-ctor . ,ly:sequential-iterator::constructor)
296         (elements-callback . ,mm-rest-child-list)
297         (types . (general-music multi-measure-rest))
298         ))
299
300     (MultiMeasureRestEvent
301      . (
302         (description . "Used internally by MultiMeasureRestMusic to signal rests")
303         (types . (general-music event rhythmic-event multi-measure-rest-event))
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-event override-property-event))
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 page-break-event event))
342         ))
343     (PageTurnEvent
344      . (
345         (description .  "Allow, forbid or force a page turn.")
346         (types . (general-music break-event page-turn-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-event 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-event 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 rhythmic-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-event))
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         (elements-callback . ,(lambda (m) (ly:music-property m 'elements)))
449         (iterator-ctor . ,ly:sequential-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 solo-one-event))
458         ))
459     (SoloTwoEvent
460      . (
461         (description . "Print Solo.2")
462         (part-combine-status . solo2)
463         (types . (general-music event part-combine-event solo-two-event))
464         ))
465     (UnisonoEvent
466      . ((description . "Print a2")
467         (part-combine-status . unisono)
468         (types . (general-music event part-combine-event unisono-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     (TextSpanEvent
501      . (
502         (description . "Start a text spanner like 8va.....|")
503         (types . (general-music span-event event text-span-event))
504         ))
505     
506     (TrillSpanEvent
507      . (
508         (description . "Start a trill spanner tr~~~")
509         (types . (general-music span-event event trill-span-event))
510         ))
511     
512     (TransposedMusic
513      . (
514         (description .  "Music that has been transposed.")
515         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
516         (start-callback . ,ly:music-wrapper::start-callback)
517         (length-callback . ,ly:music-wrapper::length-callback)
518         (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
519         (types . (music-wrapper-music general-music transposed-music))
520         ))
521
522     (TimeScaledMusic
523      . (
524         (description .  "Multiply durations, as in tuplets. 
525
526 Syntax @code{\\times @var{fraction} @var{music}}, e.g.
527 @code{\\times 2/3 @{ ... @}} for triplets.
528  ")
529         (length-callback . ,ly:music-wrapper::length-callback)
530         (start-callback . ,ly:music-wrapper::start-callback)
531         (iterator-ctor . ,ly:time-scaled-music-iterator::constructor)
532         (types . (time-scaled-music music-wrapper-music general-music))
533         ))
534
535     (TupletSpanEvent
536      . (
537         (description .  "Used internally to signal where tuplet brackets start and stop.")
538         (types . (tuplet-span-event span-event event general-music))
539        ))
540
541     (UnrelativableMusic
542      . (
543         (description .  "Music that can not be converted from relative to absolute notation.
544 For example, transposed music.")
545         (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
546         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
547         (length-callback . ,ly:music-wrapper::length-callback)
548         (types . (music-wrapper-music general-music unrelativable-music))
549         ))
550
551     (RelativeOctaveMusic
552      . (
553         (description .  "Music that was entered in relative octave notation.")
554         (to-relative-callback . ,ly:relative-octave-music::relative-callback)
555         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
556         (length-callback . ,ly:music-wrapper::length-callback)
557         (start-callback . ,ly:music-wrapper::start-callback)
558         (types . (music-wrapper-music general-music relative-octave-music))
559         ))
560     (ScriptEvent
561      . (
562         (description .  "Add an articulation mark to a note. ")
563
564         (types . (general-music event))
565         ))
566
567     (SkipMusic
568      . (
569         (description .  "Filler that takes up duration, does not print anything, and also
570 does not create staves or voices implicitly.
571
572
573
574 Syntax: @code{\\skip }@var{duration}.")
575         (length-callback . ,ly:music-duration-length)
576         (iterator-ctor . ,ly:simple-music-iterator::constructor)
577         (types . (general-music event rhythmic-event skip-event))
578         ))
579     
580     (SkipEvent
581      . (
582         (description .  "Filler that takes up duration, but does not print anything.
583
584
585
586 Syntax: @code{s}@var{duration}")
587
588         (types . (general-music event rhythmic-event skip-event))
589         ))
590
591     (SpacingSectionEvent
592      . ((description . "Start a new spacing section")
593         (types . (general-music event spacing-section-event))))
594      
595     (SpanEvent
596      . (
597         (description .  "Event for anything that is started at a different time than stopped.")
598
599         (types . (general-music event))
600         ))
601     
602     (SustainEvent
603      . (
604         (description . "Depress or release sustain pedal. ")
605         (types . (general-music event pedal-event sustain-event))
606         ))
607     
608     (SostenutoEvent
609      . (
610         (description . "Depress or release sostenuto pedal. ")
611         (types . (general-music event pedal-event sostenuto-event))
612         ))
613     
614     (UnaCordaEvent
615      . (
616         (description . "Depress or release una-corda pedal.")
617         (types . (general-music event pedal-event una-corda-event))
618         ))
619     
620     (StringNumberEvent
621      . (
622         (description .  "Specify on which string to play this note. 
623
624 Syntax: @code{\\@var{number}}.")
625
626         (types . (general-music string-number-event event))
627         )) 
628
629     (StrokeFingerEvent
630      . (
631         (description .  "Specify with which finger to pluck a string. 
632
633 Syntax: @code{\\rightHandFinger @var{text}}.")
634
635         (types . (general-music stroke-finger-event event))
636         )) 
637     
638     (TextScriptEvent
639      . (
640         (description .  "")
641         (types . (general-music script-event text-script-event event))
642         )) 
643     (TieEvent
644      . (
645         (description .  "A tie.  Entered as @var{note}-~.")
646         (types . (general-music tie-event event))
647         ))
648     (TremoloEvent
649      . (
650         (description . "Un measured tremolo.")
651         (types . (general-music event tremolo-event))
652         ))
653     
654     (TremoloSpanEvent
655      . (
656         (description . "Tremolo over two stems")
657         (types . (general-music event span-event tremolo-span-event))
658         ))
659
660     (VoiceSeparator
661      . (
662         (description .  "Separate polyphonic voices in simultaneous music. 
663
664 Syntax: @code{\\\\}")
665
666         (types . (separator general-music))
667         ))
668
669     (VoltaRepeatedMusic
670      . (
671         (iterator-ctor . ,ly:volta-repeat-iterator::constructor)
672         (description . "")
673         (start-callback .  ,ly:repeated-music::first-start)
674         (length-callback . ,ly:repeated-music::volta-music-length)
675         (types . (general-music repeated-music volta-repeated-music))
676         ))
677     
678     (UnfoldedRepeatedMusic
679      . (
680         (iterator-ctor . ,ly:unfolded-repeat-iterator::constructor)
681         (description .  "")
682         (start-callback .  ,ly:repeated-music::first-start)
683         (types . (general-music repeated-music unfolded-repeated-music))
684         (length-callback . ,ly:repeated-music::unfolded-music-length)
685         ))
686     (PercentRepeatedMusic
687      . (
688         (description .  "Repeats encoded by percents.")
689         (iterator-ctor . ,ly:percent-repeat-iterator::constructor)
690         (start-callback .  ,ly:repeated-music::first-start)
691         (length-callback . ,ly:repeated-music::unfolded-music-length)
692         (types . (general-music repeated-music percent-repeated-music))
693         ))
694     
695     (TremoloRepeatedMusic
696      . (
697         (iterator-ctor . ,ly:chord-tremolo-iterator::constructor)
698         (description .  "Repeated notes denoted by tremolo beams.")
699         (start-callback .  ,ly:repeated-music::first-start)
700
701         ;; the length of the repeat is handled by shifting the note logs
702         (length-callback . ,ly:repeated-music::folded-music-length)
703         (types . (general-music repeated-music tremolo-repeated-music))
704         
705         ))
706     
707     (FoldedRepeatedMusic
708      . (
709         (description .  "Repeats with alternatives placed in parallel. ")
710         (iterator-ctor  . ,ly:folded-repeat-iterator::constructor)
711         (start-callback .  ,ly:repeated-music::minimum-start)
712         (length-callback . ,ly:repeated-music::folded-music-length)
713         (types . (general-music repeated-music folded-repeated-music))
714         ))
715     ))
716
717 (set! music-descriptions
718       (sort music-descriptions alist<?))
719
720 (define-public music-name-to-property-table (make-vector 59 '()))
721
722 ;; init hash table,
723 ;; transport description to an object property.
724 (set!
725  music-descriptions
726  (map (lambda (x)
727         (set-object-property! (car x)
728                               'music-description
729                               (cdr (assq 'description (cdr x))))
730         (let ((lst (cdr x)))
731           (set! lst (assoc-set! lst 'name (car x)))
732           (set! lst (assq-remove! lst 'description))
733           (hashq-set! music-name-to-property-table (car x) lst)
734           (cons (car x) lst)))
735       music-descriptions))
736
737 (define-safe-public (make-music name . music-properties)
738   "Create a music object of given name, and set its properties
739 according to `music-properties', a list of alterning property symbols
740 and values. E.g:
741   (make-music 'OverrideProperty 
742               'symbol 'Stem
743               'grob-property 'thickness
744               'grob-value (* 2 1.5))"
745   (if (not (symbol? name))
746       (ly:error (_ "symbol expected: ~S") name))
747   (let ((props (hashq-ref music-name-to-property-table name '())))
748     (if (not (pair? props))
749         (ly:error (_ "cannot find music object: ~S") name))
750     (let ((m (ly:make-music props)))
751       (define (set-props mus-props)
752         (if (and (not (null? mus-props))
753                  (not (null? (cdr mus-props))))
754             (begin
755               (set! (ly:music-property m (car mus-props)) (cadr mus-props))
756               (set-props (cddr mus-props)))))
757       (set-props music-properties)
758       m)))
759
760 (define-public (make-repeated-music name)
761   (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic)
762                                ("unfold" . UnfoldedRepeatedMusic)
763                                ("percent" . PercentRepeatedMusic)
764                                ("tremolo" . TremoloRepeatedMusic)
765                                ("fold" . FoldedRepeatedMusic))))
766          (music-name (if (pair? handle)
767                          (cdr handle)
768                          (begin
769                            (ly:warning (_ "unknown repeat type `~S'") name)
770                            (ly:warning (_ "See music-types.scm for supported repeats"))
771                            'VoltaRepeatedMusic))))
772     (make-music music-name)))
773