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