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