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