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:
91 (internal-class-name . "Event")
92 (types . (general-music event beam-event span-event))
96 (description . "Starts or stops a beam. Syntax for manual control:
98 (internal-class-name . "Event")
99 (types . (general-music event new-beam-event span-event))
103 (description . "Creates a line break. Syntax: \\break.")
105 (internal-class-name . "Event")
106 (types . (general-music break-event event))
110 (description . "Creates a `breath mark' or `comma'. Syntax:
111 @var{note}\\breathe.")
113 (internal-class-name . "Event")
114 (types . (general-music event breathing-event))
118 (description . "Used internally to signal beginning and ending of notes.")
120 (internal-class-name . "Event")
121 (types . (general-music event busy-playing-event))
126 (description . "A note that is part of a cluster.")
127 (internal-class-name . "Event")
129 ; not a note-event, to ensure that Note_engraver doesn't eat it.
130 (types . (general-music cluster-note-event melodic-event rhythmic-event event))
135 (description . "Interpret the argument music within a specific context.")
136 (iterator-ctor . ,Context_specced_music_iterator::constructor)
137 (internal-class-name . "Music_wrapper")
138 (types . (context-specification general-music music-wrapper-music))
143 (description . "Begins or ends a crescendo. Syntax: @var{note}\\cr
144 ... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
145 \\endcresc. See the user manual for details.).")
147 (internal-class-name . "Event")
148 (types . (general-music dynamic-event crescendo-event event))
152 (description . "See @ref{CrescendoEvent}.")
154 (internal-class-name . "Event")
155 (types . (general-music dynamic-event decrescendo-event event))
160 (description . "Extend lyrics.")
162 (internal-class-name . "Event")
163 (types . (general-music extender-event event))
167 (description . "Specify what finger to use for this note.")
168 (internal-class-name . "Event")
169 (types . (general-music fingering-event event))
173 (description . "Start a glissando on this note.")
174 (internal-class-name . "Event")
175 (types . (general-music glissando-event event))
180 (description . "Interpret the argument as grace notes. ")
182 (internal-class-name . "Grace_music")
183 (iterator-ctor . ,Grace_iterator::constructor)
184 (types . (grace-music music-wrapper-music general-music))
188 (description . "Start or stop grouping brackets.")
189 (internal-class-name . "Event")
190 (types . (general-music event note-grouping-event))
194 (description . "A hyphen between lyric syllables.")
196 (internal-class-name . "Event")
197 (types . (general-music hyphen-event event))
202 (description . "Change the key signature. Syntax: @code{\\key } @var{name} @var{scale}.")
204 (internal-class-name . "Key_change_ev")
205 (types . (general-music key-change-event event))
210 (description . "(docme).")
212 (internal-class-name . "Event")
213 (span-type . ligature)
214 (types . (general-music span-event ligature-event event))
219 (description . "Align lyrics to the start of notes.
220 Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
222 (internal-class-name . "Lyric_combine_music")
223 (types . (general-music lyric-combine-music))
224 (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
229 (description . "A lyric syllable. Must be entered in lyrics mode, i.e.
230 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
232 (internal-class-name . "Event")
233 (types . (general-music rhythmic-event lyric-event event))
237 (description . "Insert a rehearsal mark. Syntax: @code{\mark} @var{marker},
238 e.g. @code{\\mark \"A\"}.")
240 (internal-class-name . "Event")
241 (types . (general-music mark-event event))
245 (description . "Used internally to signal melismas")
246 (internal-class-name . "Event")
247 (types . (general-music melisma-playing-event event))
250 (MultiMeasureRestEvent
252 (description . "Rests that may be compressed into Multi rests. Syntax
253 @code{R2.*4} for 4 measures in 3/4 time. Note the capital R.")
254 (internal-class-name . "Event")
255 (types . (general-music event span-event multi-measure-rest-event))
258 (MultiMeasureTextEvent
260 (description . "Texts on mm rests. Syntax
261 @code{R-\\markup @{ \\roman \"bla\" @}}. Note the explicit font switch.")
262 (internal-class-name . "Event")
263 (types . (general-music event multi-measure-text-event))
268 (description . "Generic type for music expressions.")
270 (internal-class-name . "Music")
271 (types . (general-music))
275 (description . "A note.")
277 (internal-class-name . "Event")
278 (types . (general-music event note-event rhythmic-event melodic-event))
283 (description . "Extend the definition of a graphical object.
287 @code{\\propery Foo.Bar \\override} @var{SYMBOL} = @var{VALUE}
291 (internal-class-name . "Music")
292 (types . (general-music layout-instruction))
293 (iterator-ctor . , Push_property_iterator::constructor)
298 (description . "Combine two parts on a staff, either merged or
299 as separate voices.")
301 (internal-class-name . "Simultaneous_music")
302 (types . (general-music part-combine-music))
303 (iterator-ctor . ,Part_combine_music_iterator::constructor)
308 (description . "Start or end phrasing slur. Syntax NOTE \\( and \\) NOTE")
309 (internal-class-name . "Event")
310 (types . (general-music span-event phrasing-slur-event))
315 (description . "Set a context property.
317 Syntax: @code{\property @var{context}.@var{prop} = @var{scheme-val}}.")
318 (internal-class-name . "Music")
319 (types . (layout-instruction general-music))
320 (iterator-ctor . ,Property_iterator::constructor)
326 (description . "Remove the definition of a context @code{\property}.")
328 (internal-class-name . "Music")
329 (types . (layout-instruction general-music))
330 (iterator-ctor . ,Property_unset_iterator::constructor)
336 (description . "Within a ligature, mark the previous and the
337 following note to form a pes (if melody goes up) or a flexa (if melody
340 (internal-class-name . "Event")
341 (types . (general-music pes-or-flexa-event event))
346 (description . "Repeat music in different ways")
348 (type . repeated-music)
349 (types . (general-music repeated-music))
354 (description . "Atomic music event.")
356 (internal-class-name . "Event")
357 (types . (general-music event))
362 (description . "A Rest. Syntax @code{r4} for a quarter rest. ")
364 (internal-class-name . "Event")
365 (types . (general-music event rhythmic-event rest-event))
369 (description . "Music expressions concatenated. Syntax \\sequential @{..@} or simply @{..@} .")
371 (internal-class-name . "Sequential_music")
372 (iterator-ctor . ,Sequential_music_iterator::constructor)
373 (types . (general-music sequential-music))
376 (MultiMeasureRestMusicGroup
378 (description . "Like sequential-music, but specifically intended
379 to group start-mmrest, skip, stop-mmrest sequence. Syntax @code{R2.*5} for 5 measures in 3/4 time.")
380 (internal-class-name . "Sequential_music")
381 (iterator-ctor . ,Sequential_music_iterator::constructor)
382 (types . (general-music sequential-music))
387 (description . "Music playing together.
391 @code{ \\simultaneous @{ .. @}} or < .. >.")
393 (internal-class-name . "Simultaneous_music")
394 (iterator-ctor . ,Simultaneous_music_iterator::constructor)
396 (types . (general-music simultaneous-music))
401 (description . "Start or end slur. Syntax NOTE( and )NOTE")
402 (internal-class-name . "Event")
403 (types . (general-music span-event slur-event))
408 (description . "The opposite of @ref{OverrideProperty}: remove a
409 previously added property from a graphical object definition
412 (internal-class-name . "Music")
413 (types . (general-music layout-instruction))
414 (iterator-ctor . , Pop_property_iterator::constructor)
417 (OutputPropertySetMusic
419 (description . "Set grob properties in objects
420 individually. Syntax @code{\\outputproperty @var{predicate} @var{prop}
423 (internal-class-name . "Music")
424 (iterator-ctor . ,Output_property_music_iterator::constructor)
425 (types . (general-music layout-instruction))
430 (description . "Start a text spanner like 8va.....|")
431 (internal-class-name . "Event")
432 (types . (general-music span-event text-span-event))
437 (description . "Change staffs in Piano staff. Syntax @code{\\translator Staff = @var{new-id}}.")
438 (internal-class-name . "Music")
439 (iterator-ctor . , Change_iterator::constructor)
440 (types . (general-music translator-change-instruction))
445 (description . "Multiply durations, as in tuplets. Syntax @code{\\times @var{fraction} @var{music}}, e.g.
446 @code{\\times 2/3 @{ ... @}} for triplets.
448 (internal-class-name . "Time_scaled_music")
449 (iterator-ctor . ,Time_scaled_music_iterator::constructor)
450 (types . (time-scaled-music music-wrapper-music general-music))
455 (description . "Music that has been transposed.")
456 (internal-class-name . "Transposed_music")
457 (types . (music-wrapper-music general-music transposed-music))
462 (description . "Music that can not be transposed.")
464 (internal-class-name . "Untransposable_music")
465 (types . (music-wrapper-music general-music untransposable-music))
470 (description . "Music that can not be converted from relative to absolute notation.
471 For example, transposed music.")
472 (internal-class-name . "Un_relativable_music")
473 (types . (music-wrapper-music general-music unrelativable-music))
478 (description . "Music that was entered in relative octave notation.")
480 (internal-class-name . "Relative_octave_music")
481 (types . (music-wrapper-music general-music relative-octave-music))
486 (description . "Internally used to group a set of events.")
488 (internal-class-name . "Simultaneous_music")
489 (iterator-ctor . ,Event_chord_iterator::constructor)
490 (types . (general-music event-chord simultaneous-music))
496 (description . "Add an articulation mark to a note. ")
498 (internal-class-name . "Event")
499 (types . (general-music event))
504 (description . "Filler that takes up duration, but does not print anything.")
506 (internal-class-name . "Event")
507 (types . (general-music event rhythmic-event skip-event))
512 (description . "Event for anything that is started at a different time than stopped.")
514 (internal-class-name . "Event")
515 (types . (general-music event))
520 (description . "Depress or release sustain pedal. ")
521 (internal-class-name . "Event")
522 (types . (general-music pedal-event sustain-pedal-event))
527 (description . "Depress or release sostenuto pedal. ")
528 (internal-class-name . "Event")
529 (types . (general-music pedal-event sostenuto-pedal-event))
534 (description . "Depress or release una-corda pedal.")
535 (internal-class-name . "Event")
536 (types . (general-music pedal-event una-corda-pedal-event))
541 (description . "Specify on which string to play this note. Syntax: @code{\\@var{number}}.")
543 (internal-class-name . "Event")
544 (types . (general-music string-number-event event))
547 (MetronomeChangeEvent
549 (description . "Change tempo setting (in beats per minute).")
550 (internal-class-name . "Event")
551 (types . (general-music metronome-change-event tempo-event event))
557 (internal-class-name . "Event")
558 (types . (general-music script-event text-script-event event))
562 (description . "A tie. Entered as @code{~}.")
563 (internal-class-name . "Event")
564 (types . (general-music tie-event event))
568 (description . "A tie. Entered as @var{note}-~.")
569 (internal-class-name . "Event")
570 (types . (general-music new-tie-event event))
574 (description . "Un measured tremolo.")
575 (internal-class-name . "Event")
576 (types . (general-music event tremolo-event))
581 (description . "Separate polyphonic voices in simultaneous music. Syntax: @code{\\\\}")
583 (internal-class-name . "Music")
584 (types . (separator general-music))
589 (iterator-ctor . ,Volta_repeat_iterator::constructor)
590 (internal-class-name . "Repeated_music")
592 (start-moment-function . ,Repeated_music::first_start)
593 (length . ,Repeated_music::volta_music_length)
594 (types . (general-music repeated-music volta-repeated-music))
597 (UnfoldedRepeatedMusic
599 (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
601 (start-moment-function . ,Repeated_music::first_start)
602 (internal-class-name . "Repeated_music")
603 (types . (general-music repeated-music unfolded-repeated-music))
604 (length . ,Repeated_music::unfolded_music_length)
606 (PercentRepeatedMusic
608 (internal-class-name . "Repeated_music")
609 (description . "Repeats encoded by percents.")
610 (iterator-ctor . ,Percent_repeat_iterator::constructor)
611 (start-moment-function . ,Repeated_music::first_start)
612 (length . ,Repeated_music::unfolded_music_length)
613 (types . (general-music repeated-music percent-repeated-music))
616 (TremoloRepeatedMusic
618 (iterator-ctor . ,Chord_tremolo_iterator::constructor)
619 (description . "Repeated notes denoted by tremolo beams.")
620 (internal-class-name . "Repeated_music")
621 (start-moment-function . ,Repeated_music::first_start)
623 ;; the length of the repeat is handled by shifting the note logs
624 (length . ,Repeated_music::folded_music_length)
625 (types . (general-music repeated-music tremolo-repeated-music))
631 (internal-class-name . "Repeated_music")
632 (description . "Repeats with alternatives placed in parallel. ")
633 (iterator-ctor . ,Folded_repeat_iterator::constructor)
634 (start-moment-function . ,Repeated_music::minimum_start)
635 (length . ,Repeated_music::folded_music_length)
636 (types . (general-music repeated-music folded-repeated-music))
640 (set! music-descriptions
641 (sort music-descriptions alist<?))
643 (define music-name-to-property-table (make-vector 59 '()))
647 ;; transport description to an object property.
651 (set-object-property! (car x)
653 (cdr (assq 'description (cdr x))))
656 (set! l (assoc-set! l 'name (car x)))
657 (set! l (assq-remove! l 'description))
658 (hashq-set! music-name-to-property-table (car x) l)
665 (define-public (make-music-by-name x)
666 (if (not (symbol? x))
667 (error (format "Not a symbol: ~a" x)))
670 (props (hashq-ref music-name-to-property-table x '()))
671 (name (if (pair? props)
672 (cdr (assoc 'internal-class-name props))
673 (error "Can not find music object" x)))
677 (ly:warn (format "Could not find music type `~a'" x)))
678 (ly:make-bare-music name props)
683 (define-public (make-repeated-music name)
688 '(("volta" . VoltaRepeatedMusic)
689 ("unfold" . UnfoldedRepeatedMusic)
690 ("percent" . PercentRepeatedMusic)
691 ("tremolo" . TremoloRepeatedMusic)
692 ("fold" . FoldedRepeatedMusic)
699 (string-append "Unknown repeat type `" name
700 "'\nSee music-types.scm for supported repeats"))
706 (make-music-by-name music-name)