]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-music-types.scm
Merge branch 'lilypond/translation' into staging
[lilypond.git] / scm / define-music-types.scm
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; LilyPond is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
18
19 ; for define-safe-public when byte-compiling using Guile V2
20 (use-modules (scm safe-utility-defs))
21
22 ;; TODO: should link back into user manual.
23
24 (define-public music-descriptions
25   `(
26     (AbsoluteDynamicEvent
27      . ((description . "Create a dynamic mark.
28
29 Syntax: @var{note}@code{\\x}, where @code{\\x} is a dynamic mark like
30 @code{\\ppp} or @code{\\sfz}.  A complete list is in file
31 @file{ly/@/dynamic-scripts-init.ly}.")
32         (types . (general-music post-event event dynamic-event absolute-dynamic-event))
33         ))
34
35     (AlternativeEvent
36      . ((description . "Create a alternative event.")
37         (types . (general-music event alternative-event))
38         ))
39
40     (AnnotateOutputEvent
41      . ((description . "Print an annotation of an output element.")
42         (types . (general-music event annotate-output-event))
43         ))
44
45     (ApplyContext
46      . ((description . "Call the argument with the current context during
47 interpreting phase.")
48         (types . (general-music apply-context))
49         (iterator-ctor . ,ly:apply-context-iterator::constructor)
50         ))
51
52     (ApplyOutputEvent
53      . ((description . "Call the argument with all current grobs during
54 interpreting phase.
55
56 Syntax: @code{\\applyOutput #'@var{context} @var{func}}
57
58 Arguments to @var{func} are 1.@tie{}the grob, 2.@tie{}the originating
59 context, and 3.@tie{}the context where @var{func} is called.")
60         (types . (general-music event apply-output-event))
61         ))
62
63     (ArpeggioEvent
64      . ((description . "Make an arpeggio on this note.
65
66 Syntax: @w{@var{note}@code{-\\arpeggio}}")
67         (types . (general-music post-event arpeggio-event event))
68         ))
69
70     ;; todo: use articulation-event for slur as well.
71     ;; separate non articulation scripts
72     (ArticulationEvent
73      . ((description . "Add an articulation marking to a note.
74
75 Syntax: @var{note}@code{x}@code{y}, where @code{x} is a direction
76 (@code{^} for up or @code{_} for down), or LilyPond's choice
77 (no direction specified), and where @code{y} is an articulation
78 (such as @w{@code{-.}}, @w{@code{->}}, @code{\\tenuto}, @code{\\downbow}).
79 See the Notation Reference for details.")
80         (types . (general-music post-event event articulation-event script-event))
81         ))
82
83     (AutoChangeMusic
84      . ((description . "Used for making voices that switch between
85 piano staves automatically.")
86         (iterator-ctor . ,ly:auto-change-iterator::constructor)
87         (start-callback . ,ly:music-wrapper::start-callback)
88         (length-callback . ,ly:music-wrapper::length-callback)
89         (types . (general-music music-wrapper-music auto-change-instruction))
90         ))
91
92     (BarCheck
93      . ((description . "Check whether this music coincides with
94 the start of the measure.")
95         (types . (general-music bar-check))
96         (iterator-ctor . ,ly:bar-check-iterator::constructor)
97         ))
98
99     (BassFigureEvent
100      . ((description . "Print a bass-figure text.")
101         (types . (general-music event rhythmic-event bass-figure-event))
102         ))
103
104     (BeamEvent
105      . ((description . "Start or stop a beam.
106
107 Syntax for manual control: @code{c8-[ c c-] c8}")
108         (types . (general-music post-event event beam-event span-event))
109         ))
110
111     (BeamForbidEvent
112      . ((description . "Specify that a note may not auto-beamed.")
113         (types . (general-music post-event event beam-forbid-event))
114         ))
115
116     (BreakDynamicSpanEvent
117      . ((description . "End an alignment spanner for dynamics here.")
118         (types . (general-music post-event break-span-event break-dynamic-span-event event))
119         ))
120
121     (BendAfterEvent
122      . ((description . "A drop/@/fall/@/doit jazz articulation.")
123         (types . (general-music post-event bend-after-event event))))
124
125     (BreathingEvent
126      . ((description . "Create a @q{breath mark} or @q{comma}.
127
128 Syntax: @var{note}@code{\\breathe}")
129
130         (types . (general-music event breathing-event))
131         ))
132
133     (ClusterNoteEvent
134      . ((description . "A note that is part of a cluster.")
135         ;; not a note-event, to ensure that Note_heads_engraver doesn't eat it.
136         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
137         (types . (general-music cluster-note-event melodic-event
138                   rhythmic-event event))
139         ))
140
141     (CompletizeExtenderEvent
142      . ((description . "Used internally to signal the end of a lyrics block to
143 ensure extenders are completed correctly when a @code{Lyrics} context ends
144 before its associated @code{Voice} context.")
145         (types . (general-music completize-extender-event event))
146         ))
147
148     (ContextChange
149      . ((description . "Change staves in Piano staff.
150
151 Syntax: @code{\\change Staff = @var{new-id}}")
152         (iterator-ctor . ,ly:change-iterator::constructor)
153         (types . (general-music translator-change-instruction))
154         ))
155
156     (ContextSpeccedMusic
157      . ((description . "Interpret the argument music within a
158 specific context.")
159         (iterator-ctor . ,ly:context-specced-music-iterator::constructor)
160         (length-callback . ,ly:music-wrapper::length-callback)
161         (start-callback . ,ly:music-wrapper::start-callback)
162         (types . (context-specification general-music music-wrapper-music))
163         ))
164
165     (CrescendoEvent
166      . ((description . "Begin or end a crescendo.
167
168 Syntax: @var{note}@code{\\<} @dots{} @var{note}@code{\\!}
169
170 An alternative syntax is @var{note}@code{\\cr} @dots{}
171 @var{note}@code{\\endcr}.")
172         (types . (general-music post-event span-event span-dynamic-event crescendo-event
173                   event))
174         ))
175
176     (DecrescendoEvent
177      . ((description . "Begin or end a decrescendo.
178
179 Syntax: @var{note}@code{\\>} @dots{} @var{note}@code{\\!}
180
181 An alternative syntax is @var{note}@code{\\decr} @dots{}
182 @var{note}@code{\\enddecr}.")
183         (types . (general-music post-event span-event span-dynamic-event decrescendo-event
184                   event))
185         ))
186
187     (DoublePercentEvent
188      . ((description . "Used internally to signal double percent repeats.")
189         (types . (general-music event double-percent-event rhythmic-event))
190         ))
191
192     (EpisemaEvent
193      . ((description . "Begin or end an episema.")
194         (types . (general-music post-event span-event event episema-event))
195         ))
196
197     (Event
198      . ((description . "Atomic music event.")
199         (types . (general-music event))
200         ))
201
202     (EventChord
203      . ((description . "Internally used to group a set of events.")
204         (iterator-ctor . ,ly:event-chord-iterator::constructor)
205         (length-callback . ,ly:music-sequence::event-chord-length-callback)
206         (to-relative-callback .
207          ,ly:music-sequence::event-chord-relative-callback)
208         (types . (general-music event-chord simultaneous-music))
209         ))
210
211     (ExtenderEvent
212      . ((description . "Extend lyrics.")
213         (types . (general-music post-event extender-event event))
214         ))
215
216     (FingeringEvent
217      . ((description . "Specify what finger to use for this note.")
218         (types . (general-music post-event fingering-event event))
219         ))
220
221     (FootnoteEvent
222      . ((description . "Footnote a grob.")
223         (types . (general-music event footnote-event))
224         ))
225
226     (GlissandoEvent
227      . ((description . "Start a glissando on this note.")
228         (types . (general-music post-event glissando-event event))
229         ))
230
231     (GraceMusic
232      . ((description . "Interpret the argument as grace notes.")
233         (start-callback . ,ly:grace-music::start-callback)
234         (length . ,ZERO-MOMENT)
235         (iterator-ctor . ,ly:grace-iterator::constructor)
236         (types . (grace-music music-wrapper-music general-music))
237         ))
238
239     (HarmonicEvent
240      . ((description . "Mark a note as harmonic.")
241         (types . (general-music post-event event harmonic-event))
242         ))
243
244     (HyphenEvent
245      . ((description . "A hyphen between lyric syllables.")
246         (types . (general-music post-event hyphen-event event))
247         ))
248
249     (KeyChangeEvent
250      . ((description . "Change the key signature.
251
252 Syntax: @code{\\key} @var{name} @var{scale}")
253         (to-relative-callback . ,(lambda (x p) p))
254         (types . (general-music key-change-event event))
255         ))
256
257     (LabelEvent
258      . ((description . "Place a bookmarking label.")
259         (types . (general-music label-event event))
260         ))
261
262     (LaissezVibrerEvent
263      . ((description . "Don't damp this chord.
264
265 Syntax: @var{note}@code{\\laissezVibrer}")
266         (types . (general-music post-event event laissez-vibrer-event))
267         ))
268
269     (LigatureEvent
270      . ((description . "Start or end a ligature.")
271         (types . (general-music span-event ligature-event event))
272         ))
273
274     (LineBreakEvent
275      . ((description . "Allow, forbid or force a line break.")
276         (types . (general-music line-break-event break-event event))
277         ))
278
279     (LyricCombineMusic
280      . ((description . "Align lyrics to the start of notes.
281
282 Syntax: @code{\\lyricsto} @var{voicename} @var{lyrics}")
283         (length . ,ZERO-MOMENT)
284         (types . (general-music lyric-combine-music))
285         (iterator-ctor . ,ly:lyric-combine-music-iterator::constructor)
286         ))
287
288     (LyricEvent
289      . ((description . "A lyric syllable.  Must be entered in lyrics mode,
290 i.e., @code{\\lyrics @{ twinkle4 twinkle4 @} }.")
291         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
292         (types . (general-music rhythmic-event lyric-event event))
293         ))
294
295     (MarkEvent
296      . ((description . "Insert a rehearsal mark.
297
298 Syntax: @code{\\mark} @var{marker}
299
300 Example: @code{\\mark \"A\"}")
301         (types . (general-music mark-event event))
302         ))
303
304     (MultiMeasureRestEvent
305      . ((description . "Used internally by @code{MultiMeasureRestMusic}
306 to signal rests.")
307         (types . (general-music event rhythmic-event
308                   multi-measure-rest-event))
309         ))
310
311     (MultiMeasureRestMusic
312      . ((description . "Rests that may be compressed into Multi rests.
313
314 Syntax: @code{R2.*4} for 4 measures in 3/4 time.")
315         (iterator-ctor . ,ly:sequential-iterator::constructor)
316         (elements-callback . ,mm-rest-child-list)
317         (types . (general-music multi-measure-rest))
318         ))
319
320     (MultiMeasureTextEvent
321      . ((description . "Texts on multi measure rests.
322
323 Syntax: @code{R-\\markup @{ \\roman \"bla\" @}}
324
325 Note the explicit font switch.")
326         (types . (general-music post-event event multi-measure-text-event))
327         ))
328
329     (Music
330      . ((description . "Generic type for music expressions.")
331         (types . (general-music))
332         ))
333
334     (NoteEvent
335      . ((description . "A note.")
336         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
337         (types . (general-music event note-event rhythmic-event
338                   melodic-event))
339         ))
340
341     (NoteGroupingEvent
342      . ((description . "Start or stop grouping brackets.")
343         (types . (general-music post-event event note-grouping-event))
344         ))
345
346     (OttavaMusic
347      . ((description . "Start or stop an ottava bracket.")
348         (iterator-ctor . ,ly:sequential-iterator::constructor)
349         (elements-callback . ,make-ottava-set)
350         (types . (general-music ottava-music))
351         ))
352
353     (OverrideProperty
354      . ((description . "Extend the definition of a graphical object.
355
356 Syntax: @code{\\override} [ @var{context} @code{.} ]
357 @var{object} @var{property} @code{=} @var{value}")
358         (types . (general-music layout-instruction-event
359                   override-property-event))
360         (iterator-ctor . ,ly:push-property-iterator::constructor)
361         ))
362
363     (PageBreakEvent
364      . ((description . "Allow, forbid or force a page break.")
365         (types . (general-music break-event page-break-event event))
366         ))
367
368     (PageTurnEvent
369      . ((description . "Allow, forbid or force a page turn.")
370         (types . (general-music break-event page-turn-event event))
371         ))
372
373     (PartCombineForceEvent
374      . ((description . "Override the part-combiner's strategy.")
375         (types . (general-music part-combine-force-event event))
376         ))
377
378     (PartialSet
379      . ((description . "Create an anacrusis or upbeat (partial measure).")
380         (iterator-ctor . ,ly:partial-iterator::constructor)
381         (types . (general-music partial-set))
382         ))
383
384     (PartCombineMusic
385      . ((description . "Combine two parts on a staff, either merged or
386 as separate voices.")
387         (length-callback . ,ly:music-sequence::maximum-length-callback)
388         (start-callback . ,ly:music-sequence::minimum-start-callback)
389         (types . (general-music part-combine-music))
390         (iterator-ctor . ,ly:part-combine-iterator::constructor)
391         ))
392
393     (PercentEvent
394      . ((description . "Used internally to signal percent repeats.")
395         (types . (general-music event percent-event rhythmic-event))
396         ))
397
398     (PercentRepeatedMusic
399      . ((description . "Repeats encoded by percents and slashes.")
400         (iterator-ctor . ,ly:percent-repeat-iterator::constructor)
401         (start-callback .  ,ly:repeated-music::first-start)
402         (length-callback . ,ly:repeated-music::unfolded-music-length)
403         (types . (general-music repeated-music percent-repeated-music))
404         ))
405
406     (PesOrFlexaEvent
407      . ((description . "Within a ligature, mark the previous and the
408 following note to form a pes (if melody goes up) or a flexa (if melody
409 goes down).")
410         (types . (general-music pes-or-flexa-event event))
411         ))
412
413     (PhrasingSlurEvent
414      . ((description . "Start or end phrasing slur.
415
416 Syntax: @var{note}@code{\\(} and @var{note}@code{\\)}")
417         (spanner-id . "")
418         (types . (general-music post-event span-event event phrasing-slur-event))
419         ))
420
421     (PropertySet
422      . ((description . "Set a context property.
423
424 Syntax: @code{\\set @var{context}.@var{prop} = @var{scheme-val}}")
425         (types . (layout-instruction-event general-music))
426         (iterator-ctor . ,ly:property-iterator::constructor)
427         ))
428
429     (PropertyUnset
430      . ((description . "Restore the default setting for a context
431 property.  See @ref{PropertySet}.
432
433 Syntax: @code{\\unset @var{context}.@var{prop}}")
434         (types . (layout-instruction-event general-music))
435         (iterator-ctor . ,ly:property-unset-iterator::constructor)
436         ))
437
438     (QuoteMusic
439      . ((description . "Quote preprocessed snippets of music.")
440         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
441         (length-callback . ,ly:music-wrapper::length-callback)
442         (start-callback . ,ly:music-wrapper::start-callback)
443         (types . (general-music music-wrapper-music))
444         ))
445
446     (RelativeOctaveCheck
447      . ((description . "Check if a pitch is in the correct octave.")
448         (to-relative-callback . ,ly:relative-octave-check::relative-callback)
449         (types . (general-music relative-octave-check))
450         ))
451
452     (RelativeOctaveMusic
453      . ((description . "Music that was entered in relative octave notation.")
454         (to-relative-callback . ,ly:relative-octave-music::relative-callback)
455         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
456         (length-callback . ,ly:music-wrapper::length-callback)
457         (start-callback . ,ly:music-wrapper::start-callback)
458         (types . (music-wrapper-music general-music relative-octave-music))
459         ))
460
461     (RepeatedMusic
462      . ((description . "Repeat music in different ways.")
463         (types . (general-music repeated-music))
464         ))
465
466     (RepeatSlashEvent
467      . ((description . "Used internally to signal beat repeats.")
468         (types . (general-music event repeat-slash-event rhythmic-event))
469         ))
470
471     (RepeatTieEvent
472      . ((description . "Ties for starting a second volta bracket.")
473         (types . (general-music post-event event repeat-tie-event))
474         ))
475
476     (RestEvent
477      . ((description . "A Rest.
478
479 Syntax: @code{r4} for a quarter rest.")
480         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
481         (types . (general-music event rhythmic-event rest-event))
482         ))
483
484     (RevertProperty
485      . ((description . "The opposite of @ref{OverrideProperty}: remove a
486 previously added property from a graphical object definition.")
487         (types . (general-music layout-instruction-event))
488         (iterator-ctor . ,ly:pop-property-iterator::constructor)
489         ))
490
491     (ScriptEvent
492      . ((description . "Add an articulation mark to a note.")
493         (types . (general-music event))
494         ))
495
496     (SequentialMusic
497      . ((description . "Music expressions concatenated.
498
499 Syntax: @code{\\sequential @{ @dots{} @}} or simply @code{@{ @dots{} @}}")
500         (length-callback . ,ly:music-sequence::cumulative-length-callback)
501         (start-callback . ,ly:music-sequence::first-start-callback)
502         (elements-callback . ,(lambda (m) (ly:music-property m 'elements)))
503         (iterator-ctor . ,ly:sequential-iterator::constructor)
504         (types . (general-music sequential-music))
505         ))
506
507     (SimultaneousMusic
508      . ((description . "Music playing together.
509
510 Syntax: @code{\\simultaneous @{ @dots{} @}} or @code{<< @dots{} >>}")
511         (iterator-ctor . ,ly:simultaneous-music-iterator::constructor)
512         (start-callback . ,ly:music-sequence::minimum-start-callback)
513         (length-callback . ,ly:music-sequence::maximum-length-callback)
514         (to-relative-callback .
515          ,ly:music-sequence::simultaneous-relative-callback)
516         (types . (general-music simultaneous-music))
517         ))
518
519     (SkipEvent
520      . ((description . "Filler that takes up duration, but does not
521 print anything.
522
523 Syntax: @code{s4} for a skip equivalent to a quarter rest.")
524         (iterator-ctor . ,ly:rhythmic-music-iterator::constructor)
525         (types . (general-music event rhythmic-event skip-event))
526         ))
527
528     (SkipMusic
529      . ((description . "Filler that takes up duration, does not
530 print anything, and also does not create staves or voices implicitly.
531
532 Syntax: @code{\\skip} @var{duration}")
533         (length-callback . ,ly:music-duration-length)
534         (iterator-ctor . ,ly:simple-music-iterator::constructor)
535         (types . (general-music event rhythmic-event skip-event))
536         ))
537
538     (SlurEvent
539      . ((description . "Start or end slur.
540
541 Syntax: @var{note}@code{(} and @var{note}@code{)}")
542         (spanner-id . "")
543         (types . (general-music post-event span-event event slur-event))
544         ))
545
546     (SoloOneEvent
547      . ((description . "Print @q{Solo@tie{}1}.")
548         (part-combine-status . solo1)
549         (types . (general-music event part-combine-event solo-one-event))
550         ))
551
552     (SoloTwoEvent
553      . ((description . "Print @q{Solo@tie{}2}.")
554         (part-combine-status . solo2)
555         (types . (general-music event part-combine-event solo-two-event))
556         ))
557
558     (SostenutoEvent
559      . ((description . "Depress or release sostenuto pedal.")
560         (types . (general-music post-event event pedal-event sostenuto-event))
561         ))
562
563     (SpacingSectionEvent
564      . ((description . "Start a new spacing section.")
565         (types . (general-music event spacing-section-event))))
566
567     (SpanEvent
568      . ((description . "Event for anything that is started at a
569 different time than stopped.")
570         (types . (general-music event))
571         ))
572
573     (StaffSpanEvent
574      . ((description . "Start or stop a staff symbol.")
575         (types . (general-music event span-event staff-span-event))
576      ))
577
578     (StringNumberEvent
579      . ((description . "Specify on which string to play this note.
580
581 Syntax: @code{\\@var{number}}")
582         (types . (general-music post-event string-number-event event))
583         ))
584
585     (StrokeFingerEvent
586      . ((description . "Specify with which finger to pluck a string.
587
588 Syntax: @code{\\rightHandFinger @var{text}}")
589         (types . (general-music post-event stroke-finger-event event))
590         ))
591
592     (SustainEvent
593      . ((description . "Depress or release sustain pedal.")
594         (types . (general-music post-event event pedal-event sustain-event))
595         ))
596
597     (TempoChangeEvent
598      . ((description . "A metronome mark or tempo indication.")
599         (types . (general-music event tempo-change-event))
600         ))
601
602     (TextScriptEvent
603      . ((description . "Print text.")
604         (types . (general-music post-event script-event text-script-event event))
605         ))
606
607     (TextSpanEvent
608      . ((description . "Start a text spanner, for example, an
609 octavation.")
610         (types . (general-music post-event span-event event text-span-event))
611         ))
612
613     (TieEvent
614      . ((description . "A tie.
615
616 Syntax: @w{@var{note}@code{-~}}")
617         (types . (general-music post-event tie-event event))
618         ))
619
620     (TimeScaledMusic
621      . ((description . "Multiply durations, as in tuplets.
622
623 Syntax: @code{\\times @var{fraction} @var{music}}, e.g.,
624 @code{\\times 2/3 @{ @dots{} @}} for triplets.")
625         (length-callback . ,ly:music-wrapper::length-callback)
626         (start-callback . ,ly:music-wrapper::start-callback)
627         (iterator-ctor . ,ly:tuplet-iterator::constructor)
628         (types . (time-scaled-music music-wrapper-music general-music))
629         ))
630
631     (TimeSignatureMusic
632      . ((description . "Set a new time signature")
633         (iterator-ctor . ,ly:sequential-iterator::constructor)
634         (elements-callback . ,make-time-signature-set)
635         (types . (general-music time-signature-music))
636         ))
637
638     (TransposedMusic
639      . ((description . "Music that has been transposed.")
640         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
641         (start-callback . ,ly:music-wrapper::start-callback)
642         (length-callback . ,ly:music-wrapper::length-callback)
643         (to-relative-callback .
644          ,ly:relative-octave-music::no-relative-callback)
645         (types . (music-wrapper-music general-music transposed-music))
646         ))
647
648     (TremoloEvent
649      . ((description . "Unmeasured tremolo.")
650         (types . (general-music post-event event tremolo-event))
651         ))
652
653     (TremoloRepeatedMusic
654      . ((description . "Repeated notes denoted by tremolo beams.")
655         (iterator-ctor . ,ly:chord-tremolo-iterator::constructor)
656         (start-callback .  ,ly:repeated-music::first-start)
657         ;; the length of the repeat is handled by shifting the note logs
658         (length-callback . ,ly:repeated-music::folded-music-length)
659         (types . (general-music repeated-music tremolo-repeated-music))
660         ))
661
662     (TremoloSpanEvent
663      . ((description . "Tremolo over two stems.")
664         (types . (general-music event span-event tremolo-span-event))
665         ))
666
667     (TrillSpanEvent
668      . ((description . "Start a trill spanner.")
669         (types . (general-music post-event span-event event trill-span-event))
670         ))
671
672     (TupletSpanEvent
673      . ((description . "Used internally to signal where tuplet
674 brackets start and stop.")
675         (types . (tuplet-span-event span-event event general-music post-event))
676        ))
677
678     (UnaCordaEvent
679      . ((description . "Depress or release una-corda pedal.")
680         (types . (general-music post-event event pedal-event una-corda-event))
681         ))
682
683     (UnfoldedRepeatedMusic
684      . ((description . "Repeated music which is fully written
685 (and played) out.")
686         (iterator-ctor . ,ly:unfolded-repeat-iterator::constructor)
687         (start-callback .  ,ly:repeated-music::first-start)
688         (types . (general-music repeated-music unfolded-repeated-music))
689         (length-callback . ,ly:repeated-music::unfolded-music-length)
690         ))
691
692     (UnisonoEvent
693      . ((description . "Print @q{a@tie{}2}.")
694         (part-combine-status . unisono)
695         (types . (general-music event part-combine-event unisono-event))))
696
697     (UnrelativableMusic
698      . ((description . "Music that cannot be converted from relative
699 to absolute notation.  For example, transposed music.")
700         (to-relative-callback . ,ly:relative-octave-music::no-relative-callback)
701         (iterator-ctor . ,ly:music-wrapper-iterator::constructor)
702         (length-callback . ,ly:music-wrapper::length-callback)
703         (types . (music-wrapper-music general-music unrelativable-music))
704         ))
705
706     (VoiceSeparator
707      . ((description . "Separate polyphonic voices in simultaneous music.
708
709 Syntax: @code{\\\\}")
710         (types . (separator general-music))
711         ))
712
713     (VoltaRepeatedMusic
714      . ((description . "Repeats with alternatives placed sequentially.")
715         (iterator-ctor . ,ly:volta-repeat-iterator::constructor)
716         (elements-callback . ,make-volta-set)
717         (start-callback .  ,ly:repeated-music::first-start)
718         (length-callback . ,ly:repeated-music::volta-music-length)
719         (types . (general-music repeated-music volta-repeated-music))
720         ))
721     ))
722
723 (set! music-descriptions
724       (sort music-descriptions alist<?))
725
726 (define-public music-name-to-property-table (make-hash-table 59))
727
728 ;; init hash table,
729 ;; transport description to an object property.
730 (set!
731  music-descriptions
732  (map (lambda (x)
733         (set-object-property! (car x)
734                               'music-description
735                               (cdr (assq 'description (cdr x))))
736         (let ((lst (cdr x)))
737           (set! lst (assoc-set! lst 'name (car x)))
738           (set! lst (assq-remove! lst 'description))
739           (hashq-set! music-name-to-property-table (car x) lst)
740           (cons (car x) lst)))
741       music-descriptions))
742
743 (define-safe-public (make-music name . music-properties)
744   "Create a music object of given name, and set its properties
745 according to @code{music-properties}, a list of alternating property symbols
746 and values. E.g:
747   (make-music 'OverrideProperty
748               'symbol 'Stem
749               'grob-property 'thickness
750               'grob-value (* 2 1.5))"
751   (if (not (symbol? name))
752       (ly:error (_ "symbol expected: ~S") name))
753   (let ((props (hashq-ref music-name-to-property-table name '())))
754     (if (not (pair? props))
755         (ly:error (_ "cannot find music object: ~S") name))
756     (let ((m (ly:make-music props)))
757       (define (set-props mus-props)
758         (if (and (not (null? mus-props))
759                  (not (null? (cdr mus-props))))
760             (begin
761               (set! (ly:music-property m (car mus-props)) (cadr mus-props))
762               (set-props (cddr mus-props)))))
763       (set-props music-properties)
764       m)))
765
766 (define-public (make-repeated-music name)
767   (let* ((repeated-music (assoc-get name '(("volta" . VoltaRepeatedMusic)
768                                            ("unfold" . UnfoldedRepeatedMusic)
769                                            ("percent" . PercentRepeatedMusic)
770                                            ("tremolo" . TremoloRepeatedMusic))))
771          (repeated-music-name (if repeated-music
772                                   repeated-music
773                                   (begin
774                                     (ly:warning (_ "unknown repeat type `~S'") name)
775                                     (ly:warning (_ "See define-music-types.scm for supported repeats"))
776                                     'VoltaRepeatedMusic))))
777     (make-music repeated-music-name)))