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