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