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