2 (define-public music-descriptions
6 (description . "End the currently running spanners.")
7 (internal-class-name . "Event")
9 (types . (general-music event abort-event))
13 (description . "Creates a dynamic mark. Syntax: @var{note}@code{\\x},
14 where x is one of \\ppp, \\pp, \\p, \\mp, \\mf, \\f, \\ff, \\fff.")
15 (internal-class-name . "Event")
16 (types . (general-music event dynamic-event absolute-dynamic-event))
20 (description . "Call the argument with the current context during interpreting phase")
21 (internal-class-name . "Music")
22 (types . (general-music apply-context))
23 (iterator-ctor . ,Apply_context_iterator::constructor)
28 Call the argument with all current grobs during interpreting phase.
34 arguments to func are 1. the grob, 2. the originating context,
35 3. context where FUNC is called.
38 (internal-class-name . "Event")
39 (iterator-ctor . ,Output_property_music_iterator::constructor)
40 (types . (general-music layout-instruction))
44 (description . "Make an arpeggio on this note. Syntax:
45 @var{note}-@code{\\arpeggio}")
46 (internal-class-name . "Event")
47 (types . (general-music arpeggio-event event))
50 ;; todo: use articulation-event for slur as well.
51 ;; separate non articulation scripts
54 (description . "Adds an articulation marking to a note. Syntax:
55 @var{note}@code{X}@code{Y}, where X is a direction (up @code{^}, down
56 @code{_}, or LilyPond's choice (no direction specified)), and where Y
57 is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto},
58 @code{\\downbow}). See the user manual for details.")
60 (internal-class-name . "Event")
61 (types . (general-music event articulation-event script-event))
65 (description . "Used for making voices that switch between piano staves automatically.")
67 (internal-class-name . "Music_wrapper")
68 (iterator-ctor . ,Auto_change_iterator::constructor)
69 (types . (general-music music-wrapper-music auto-change-instruction))
74 "Check whether this music coincides with the start of the measure.")
75 (internal-class-name . "Music")
76 (types . (general-music bar-check))
77 (iterator-ctor . ,Bar_check_iterator::constructor)
81 (description . "Print a bass-figure text")
83 (internal-class-name . "Event")
84 (types . (general-music event rhythmic-event bass-figure-event))
88 (description . "Starts or stops a beam. Syntax for manual control:
90 (internal-class-name . "Event")
91 (types . (general-music event beam-event span-event))
95 (description . "Creates a line break. Syntax: \\break.")
97 (internal-class-name . "Event")
98 (types . (general-music break-event event))
102 (description . "Creates a `breath mark' or `comma'. Syntax:
103 @var{note}\\breathe.")
105 (internal-class-name . "Event")
106 (types . (general-music event breathing-event))
110 (description . "Used internally to signal beginning and ending of notes.")
112 (internal-class-name . "Event")
113 (types . (general-music event busy-playing-event))
117 (description . "Used internally to signal beginning of notes.")
119 (internal-class-name . "Event")
120 (types . (general-music event start-playing-event))
125 (description . "A note that is part of a cluster.")
126 (internal-class-name . "Event")
128 ; not a note-event, to ensure that Note_engraver doesn't eat it.
129 (types . (general-music cluster-note-event melodic-event rhythmic-event event))
134 (description . "Interpret the argument music within a specific context.")
135 (iterator-ctor . ,Context_specced_music_iterator::constructor)
136 (internal-class-name . "Music_wrapper")
137 (types . (context-specification general-music music-wrapper-music))
142 (description . "Begins or ends a crescendo. Syntax: @var{note}\\cr
143 ... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
144 \\endcresc. See the user manual for details.).")
146 (internal-class-name . "Event")
147 (types . (general-music dynamic-event crescendo-event event))
151 (description . "See @ref{CrescendoEvent}.")
153 (internal-class-name . "Event")
154 (types . (general-music dynamic-event decrescendo-event event))
159 (description . "Extend lyrics.")
161 (internal-class-name . "Event")
162 (types . (general-music extender-event event))
166 (description . "Specify what finger to use for this note.")
167 (internal-class-name . "Event")
168 (types . (general-music fingering-event event))
172 (description . "Start a glissando on this note.")
173 (internal-class-name . "Event")
174 (types . (general-music glissando-event event))
179 (description . "Interpret the argument as grace notes. ")
181 (internal-class-name . "Grace_music")
182 (iterator-ctor . ,Grace_iterator::constructor)
183 (types . (grace-music music-wrapper-music general-music))
187 (description . "Start or stop grouping brackets.")
188 (internal-class-name . "Event")
189 (types . (general-music event note-grouping-event))
193 (description . "A hyphen between lyric syllables.")
195 (internal-class-name . "Event")
196 (types . (general-music hyphen-event event))
201 (description . "Change the key signature. Syntax: @code{\\key } @var{name} @var{scale}.")
203 (internal-class-name . "Key_change_ev")
204 (types . (general-music key-change-event event))
209 (description . "(docme).")
211 (internal-class-name . "Event")
212 (span-type . ligature)
213 (types . (general-music span-event ligature-event event))
218 (description . "Align lyrics to the start of notes.
219 Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
221 (internal-class-name . "Lyric_combine_music")
222 (types . (general-music lyric-combine-music))
223 (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
226 (NewLyricCombineMusic
228 (description . "Align lyrics to the start of notes.
229 Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
230 (internal-class-name . "Music")
231 (length . ,(ly:make-moment 0 1))
232 (types . (general-music lyric-combine-music))
233 (iterator-ctor . ,New_lyric_combine_music_iterator::constructor)
238 (description . "A lyric syllable. Must be entered in lyrics mode, i.e.
239 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
241 (internal-class-name . "Event")
242 (types . (general-music rhythmic-event lyric-event event))
246 (description . "Insert a rehearsal mark. Syntax: @code{\\mark} @var{marker},
247 e.g. @code{\\mark \"A\"}.")
249 (internal-class-name . "Event")
250 (types . (general-music mark-event event))
254 (description . "Used internally to signal melismas")
255 (internal-class-name . "Event")
256 (types . (general-music melisma-playing-event event))
259 (MultiMeasureRestEvent
261 (description . "Rests that may be compressed into Multi rests. Syntax
262 @code{R2.*4} for 4 measures in 3/4 time. Note the capital R.")
263 (internal-class-name . "Event")
264 (types . (general-music event rhythmic-event multi-measure-rest-event))
267 (MultiMeasureTextEvent
269 (description . "Texts on mm rests. Syntax
270 @code{R-\\markup @{ \\roman \"bla\" @}}. Note the explicit font switch.")
271 (internal-class-name . "Event")
272 (types . (general-music event multi-measure-text-event))
277 (description . "Generic type for music expressions.")
279 (internal-class-name . "Music")
280 (types . (general-music))
284 (description . "A note.")
286 (internal-class-name . "Event")
287 (types . (general-music event note-event rhythmic-event melodic-event))
292 (description . "Extend the definition of a graphical object.
296 @code{\\propery Foo.Bar \\override} @var{SYMBOL} = @var{VALUE}
300 (internal-class-name . "Music")
301 (types . (general-music layout-instruction))
302 (iterator-ctor . , Push_property_iterator::constructor)
306 (description . "Combine two parts on a staff, either merged or
307 as separate voices.")
309 (internal-class-name . "Simultaneous_music")
310 (types . (general-music part-combine-music))
311 (iterator-ctor . ,New_pc_iterator::constructor)
316 (description . "Start or end phrasing slur. Syntax NOTE \\( and \\) NOTE")
317 (internal-class-name . "Event")
318 (types . (general-music span-event phrasing-slur-event))
323 (description . "Set a context property.
325 Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
326 (internal-class-name . "Music")
327 (types . (layout-instruction general-music))
328 (iterator-ctor . ,Property_iterator::constructor)
334 (description . "Remove the definition of a context @code{\\property}.")
336 (internal-class-name . "Music")
337 (types . (layout-instruction general-music))
338 (iterator-ctor . ,Property_unset_iterator::constructor)
344 (description . "Within a ligature, mark the previous and the
345 following note to form a pes (if melody goes up) or a flexa (if melody
348 (internal-class-name . "Event")
349 (types . (general-music pes-or-flexa-event event))
353 . ((description . "Check if a pitch is in the correct octave.")
354 (internal-class-name . "Relative_octave_check")
355 (types . (general-music relative-octave-check))
360 (description . "Repeat music in different ways")
362 (type . repeated-music)
363 (types . (general-music repeated-music))
368 (description . "Atomic music event.")
370 (internal-class-name . "Event")
371 (types . (general-music event))
376 (description . "A Rest. Syntax @code{r4} for a quarter rest. ")
378 (internal-class-name . "Event")
379 (types . (general-music event rhythmic-event rest-event))
383 (description . "Music expressions concatenated. Syntax \\sequential @{..@} or simply @{..@} .")
385 (internal-class-name . "Sequential_music")
386 (iterator-ctor . ,Sequential_music_iterator::constructor)
387 (types . (general-music sequential-music))
390 (MultiMeasureRestMusicGroup
392 (description . "Like sequential-music, but specifically intended
393 to group start-mmrest, skip, stop-mmrest sequence. Syntax @code{R2.*5} for 5 measures in 3/4 time.")
394 (internal-class-name . "Sequential_music")
395 (iterator-ctor . ,Sequential_music_iterator::constructor)
396 (types . (general-music sequential-music))
401 (description . "Print Solo.1")
402 (internal-class-name . "Event")
403 (part-combine-status . solo1)
404 (types . (general-music event part-combine-event))
408 (description . "Print Solo.2")
409 (internal-class-name . "Event")
410 (part-combine-status . solo2)
411 (types . (general-music event part-combine-event))
414 . ((description . "Print a2")
415 (internal-class-name . "Event")
416 (part-combine-status . unisono)
417 (types . (general-music event part-combine-event))))
421 (description . "Music playing together.
425 @code{ \\simultaneous @{ .. @}} or < .. >.")
427 (internal-class-name . "Simultaneous_music")
428 (iterator-ctor . ,Simultaneous_music_iterator::constructor)
430 (types . (general-music simultaneous-music))
435 (description . "Start or end slur. Syntax NOTE( and )NOTE")
436 (internal-class-name . "Event")
437 (types . (general-music span-event slur-event))
442 (description . "The opposite of @ref{OverrideProperty}: remove a
443 previously added property from a graphical object definition
446 (internal-class-name . "Music")
447 (types . (general-music layout-instruction))
448 (iterator-ctor . , Pop_property_iterator::constructor)
451 (OutputPropertySetMusic
453 (description . "Set grob properties in objects
454 individually. Syntax @code{\\outputproperty @var{predicate} @var{prop}
457 (internal-class-name . "Music")
458 (iterator-ctor . ,Output_property_music_iterator::constructor)
459 (types . (general-music layout-instruction))
464 (description . "Start a text spanner like 8va.....|")
465 (internal-class-name . "Event")
466 (types . (general-music span-event text-span-event))
471 (description . "Change staffs in Piano staff. Syntax @code{\\translator Staff = @var{new-id}}.")
472 (internal-class-name . "Music")
473 (iterator-ctor . , Change_iterator::constructor)
474 (types . (general-music translator-change-instruction))
479 (description . "Multiply durations, as in tuplets. Syntax @code{\\times @var{fraction} @var{music}}, e.g.
480 @code{\\times 2/3 @{ ... @}} for triplets.
482 (internal-class-name . "Time_scaled_music")
483 (iterator-ctor . ,Time_scaled_music_iterator::constructor)
484 (types . (time-scaled-music music-wrapper-music general-music))
489 (description . "Music that has been transposed.")
490 (internal-class-name . "Transposed_music")
491 (types . (music-wrapper-music general-music transposed-music))
496 (description . "Music that can not be transposed.")
498 (internal-class-name . "Untransposable_music")
499 (types . (music-wrapper-music general-music untransposable-music))
504 (description . "Music that can not be converted from relative to absolute notation.
505 For example, transposed music.")
506 (internal-class-name . "Un_relativable_music")
507 (types . (music-wrapper-music general-music unrelativable-music))
512 (description . "Music that was entered in relative octave notation.")
514 (internal-class-name . "Relative_octave_music")
515 (types . (music-wrapper-music general-music relative-octave-music))
520 (description . "Internally used to group a set of events.")
521 (internal-class-name . "Event_chord")
522 (iterator-ctor . ,Event_chord_iterator::constructor)
523 (types . (general-music event-chord simultaneous-music))
529 (description . "Add an articulation mark to a note. ")
531 (internal-class-name . "Event")
532 (types . (general-music event))
537 (description . "Filler that takes up duration, but does not print anything. This also does not create any event-accepting contexts. ")
538 (internal-class-name . "Music")
539 (length . ,ly:music-duration-length)
540 (iterator-ctor . ,Simple_music_iterator::constructor)
541 (types . (general-music event rhythmic-event skip-event))
546 (description . "Filler that takes up duration, but does not print anything.")
548 (internal-class-name . "Event")
549 (types . (general-music event rhythmic-event skip-event))
554 (description . "Event for anything that is started at a different time than stopped.")
556 (internal-class-name . "Event")
557 (types . (general-music event))
562 (description . "Depress or release sustain pedal. ")
563 (internal-class-name . "Event")
564 (types . (general-music pedal-event sustain-pedal-event))
569 (description . "Depress or release sostenuto pedal. ")
570 (internal-class-name . "Event")
571 (types . (general-music pedal-event sostenuto-pedal-event))
576 (description . "Depress or release una-corda pedal.")
577 (internal-class-name . "Event")
578 (types . (general-music pedal-event una-corda-pedal-event))
583 (description . "Specify on which string to play this note. Syntax: @code{\\@var{number}}.")
585 (internal-class-name . "Event")
586 (types . (general-music string-number-event event))
589 (MetronomeChangeEvent
591 (description . "Change tempo setting (in beats per minute).")
592 (internal-class-name . "Event")
593 (types . (general-music metronome-change-event tempo-event event))
599 (internal-class-name . "Event")
600 (types . (general-music script-event text-script-event event))
604 (description . "A tie. Entered as @var{note}-~.")
605 (internal-class-name . "Event")
606 (types . (general-music tie-event event))
610 (description . "Un measured tremolo.")
611 (internal-class-name . "Event")
612 (types . (general-music event tremolo-event))
617 (description . "Separate polyphonic voices in simultaneous music. Syntax: @code{\\\\}")
619 (internal-class-name . "Music")
620 (types . (separator general-music))
625 (iterator-ctor . ,Volta_repeat_iterator::constructor)
626 (internal-class-name . "Repeated_music")
628 (start-moment-function . ,Repeated_music::first_start)
629 (length . ,Repeated_music::volta_music_length)
630 (types . (general-music repeated-music volta-repeated-music))
633 (UnfoldedRepeatedMusic
635 (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
637 (start-moment-function . ,Repeated_music::first_start)
638 (internal-class-name . "Repeated_music")
639 (types . (general-music repeated-music unfolded-repeated-music))
640 (length . ,Repeated_music::unfolded_music_length)
642 (PercentRepeatedMusic
644 (internal-class-name . "Repeated_music")
645 (description . "Repeats encoded by percents.")
646 (iterator-ctor . ,Percent_repeat_iterator::constructor)
647 (start-moment-function . ,Repeated_music::first_start)
648 (length . ,Repeated_music::unfolded_music_length)
649 (types . (general-music repeated-music percent-repeated-music))
652 (TremoloRepeatedMusic
654 (iterator-ctor . ,Chord_tremolo_iterator::constructor)
655 (description . "Repeated notes denoted by tremolo beams.")
656 (internal-class-name . "Repeated_music")
657 (start-moment-function . ,Repeated_music::first_start)
659 ;; the length of the repeat is handled by shifting the note logs
660 (length . ,Repeated_music::folded_music_length)
661 (types . (general-music repeated-music tremolo-repeated-music))
667 (internal-class-name . "Repeated_music")
668 (description . "Repeats with alternatives placed in parallel. ")
669 (iterator-ctor . ,Folded_repeat_iterator::constructor)
670 (start-moment-function . ,Repeated_music::minimum_start)
671 (length . ,Repeated_music::folded_music_length)
672 (types . (general-music repeated-music folded-repeated-music))
676 (set! music-descriptions
677 (sort music-descriptions alist<?))
679 (define music-name-to-property-table (make-vector 59 '()))
683 ;; transport description to an object property.
687 (set-object-property! (car x)
689 (cdr (assq 'description (cdr x))))
692 (set! l (assoc-set! l 'name (car x)))
693 (set! l (assq-remove! l 'description))
694 (hashq-set! music-name-to-property-table (car x) l)
701 (define-public (make-music-by-name x)
702 (if (not (symbol? x))
703 (error (format "Not a symbol: ~a" x)))
706 (props (hashq-ref music-name-to-property-table x '()))
707 (name (if (pair? props)
708 (cdr (assoc 'internal-class-name props))
709 (error "Can not find music object" x)))
713 (ly:warn (format "Could not find music type `~a'" x)))
714 (ly:make-bare-music name props)
719 (define-public (make-repeated-music name)
724 '(("volta" . VoltaRepeatedMusic)
725 ("unfold" . UnfoldedRepeatedMusic)
726 ("percent" . PercentRepeatedMusic)
727 ("tremolo" . TremoloRepeatedMusic)
728 ("fold" . FoldedRepeatedMusic)
735 (string-append "Unknown repeat type `" name
736 "'\nSee music-types.scm for supported repeats"))
742 (make-music-by-name music-name)