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)
27 (description . "Make an arpeggio on this note. Syntax:
28 @var{note}-@code{\\arpeggio}")
29 (internal-class-name . "Event")
30 (types . (general-music arpeggio-event event))
33 ;; todo: use articulation-event for slur as well.
34 ;; separate non articulation scripts
37 (description . "Adds an articulation marking to a note. Syntax:
38 @var{note}@code{X}@code{Y}, where X is a direction (up @code{^}, down
39 @code{_}, or Lilypond's choice (no direction specified)), and where Y
40 is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto},
41 @code{\\downbow}). See the user manual for details.")
43 (internal-class-name . "Event")
44 (types . (general-music event articulation-event script-event))
48 (description . "Used for making voices that switch between piano staves automatically.")
50 (internal-class-name . "Music_wrapper")
51 (iterator-ctor . ,Auto_change_iterator::constructor)
52 (types . (general-music music-wrapper-music auto-change-instruction))
57 "Check whether this music coincides with the start of the measure.")
58 (internal-class-name . "Music")
59 (types . (general-music bar-check))
60 (iterator-ctor . ,Bar_check_iterator::constructor)
64 (description . "Print a bass-figure text")
66 (internal-class-name . "Event")
67 (types . (general-music event rhythmic-event bass-figure-event))
71 (description . "Starts or stops a beam. Syntax for manual control:
74 (internal-class-name . "Event")
75 (types . (general-music event beam-event span-event))
79 (description . "Starts or stops a beam. Syntax for manual control:
81 (internal-class-name . "Event")
82 (types . (general-music event new-beam-event span-event))
86 (description . "Creates a line break. Syntax: \\break.")
88 (internal-class-name . "Event")
89 (types . (general-music break-event event))
93 (description . "Creates a `breath mark' or `comma'. Syntax:
94 @var{note}\\breathe.")
96 (internal-class-name . "Event")
97 (types . (general-music event breathing-event))
101 (description . "Used internally to signal beginning and ending of notes.")
103 (internal-class-name . "Event")
104 (types . (general-music event busy-playing-event))
108 (description . "Begins or ends a cluster.")
109 (internal-class-name . "Event")
110 (types . (general-music cluster-event span-event event))
114 (description . "Interpret the argument music within a specific context.")
115 (iterator-ctor . ,Context_specced_music_iterator::constructor)
116 (internal-class-name . "Music_wrapper")
117 (types . (context-specification general-music music-wrapper-music))
121 (description . "Begins or ends a crescendo. Syntax: @var{note}\\cr
122 ... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and
123 \\endcresc. See the user manual for details.).")
125 (internal-class-name . "Event")
126 (types . (general-music dynamic-event crescendo-event event))
130 (description . "See @ref{CrescendoEvent}.")
132 (internal-class-name . "Event")
133 (types . (general-music dynamic-event decrescendo-event event))
138 (description . "Extend lyrics.")
140 (internal-class-name . "Event")
141 (types . (general-music extender-event event))
145 (description . "Specify what finger to use for this note.")
146 (internal-class-name . "Event")
147 (types . (general-music fingering-event event))
151 (description . "Start a glissando on this note.")
152 (internal-class-name . "Event")
153 (types . (general-music glissando-event event))
158 (description . "Interpret the argument as grace notes. ")
160 (internal-class-name . "Grace_music")
161 (iterator-ctor . ,Grace_iterator::constructor)
162 (types . (grace-music music-wrapper-music general-music))
166 (description . "Start or stop grouping brackets.")
167 (internal-class-name . "Event")
168 (types . (general-music event note-grouping-event))
172 (description . "A hyphen between lyric syllables.")
174 (internal-class-name . "Event")
175 (types . (general-music hyphen-event event))
180 (description . "Change the key signature. Syntax: @code{\\key } @var{name} @var{scale}.")
182 (internal-class-name . "Key_change_ev")
183 (types . (general-music key-change-event event))
187 (description . "(docme).")
189 (internal-class-name . "Event")
190 (span-type . ligature)
191 (types . (general-music span-event ligature-event event))
196 (description . "Align lyrics to the start of notes.
197 Syntax @var{\\addlyrics }@var{music} @var{lyrics}.")
199 (internal-class-name . "Lyric_combine_music")
200 (types . (general-music lyric-combine-music))
201 (iterator-ctor . ,Lyric_combine_music_iterator::constructor)
206 (description . "A lyric syllable. Must be entered in lyrics mode, i.e.
207 @code{\\lyrics @{ twinkle4 twinkle4 @} } .")
209 (internal-class-name . "Event")
210 (types . (general-music rhythmic-event lyric-event event))
214 (description . "Insert a rehearsal mark. Syntax: @code{\mark} @var{marker},
215 e.g. @code{\\mark \"A\"}.")
217 (internal-class-name . "Event")
218 (types . (general-music mark-event event))
222 (description . "Used internally to signal melismas")
223 (internal-class-name . "Event")
224 (types . (general-music melisma-playing-event event))
227 (MultiMeasureRestEvent
229 (description . "Rests that may be compressed into Multi rests. Syntax
230 @code{R2.*4} for 4 measures in 3/4 time. Note the capital R.")
231 (internal-class-name . "Event")
232 (types . (general-music event multi-measure-rest-event))
236 (description . "Generic type for music expressions.")
238 (internal-class-name . "Music")
239 (types . (general-music))
243 (description . "A note.")
245 (internal-class-name . "Event")
246 (types . (general-music event note-event rhythmic-event melodic-event))
251 (description . "Extend the definition of a graphical object")
253 (internal-class-name . "Music")
254 (types . (general-music layout-instruction))
255 (iterator-ctor . , Push_property_iterator::constructor)
260 (description . "Combine two parts on a staff, either merged or
261 as separate voices.")
263 (internal-class-name . "Simultaneous_music")
264 (types . (general-music part-combine-music))
265 (iterator-ctor . ,Part_combine_music_iterator::constructor)
270 (description . "Start or end phrasing slur. Syntax NOTE \\( and \\) NOTE")
271 (internal-class-name . "Event")
272 (types . (general-music span-event phrasing-slur-event))
277 (description . "Set a context property.
279 Syntax: @code{\property @var{context}.@var{prop} = @var{scheme-val}}.")
280 (internal-class-name . "Music")
281 (types . (layout-instruction general-music))
282 (iterator-ctor . ,Property_iterator::constructor)
288 (description . "Remove the definition of a context @code{\property}.")
290 (internal-class-name . "Music")
291 (types . (layout-instruction general-music))
292 (iterator-ctor . ,Property_unset_iterator::constructor)
298 (description . "(docme)")
300 (internal-class-name . "Event")
301 (types . (general-music porrectus-event event))
306 (description . "Repeat music in different ways")
308 (type . repeated-music)
309 (types . (general-music repeated-music))
314 (description . "Atomic music event.")
316 (internal-class-name . "Event")
317 (types . (general-music event))
322 (description . "A Rest. Syntax @code{r4} for a quarter rest. ")
324 (internal-class-name . "Event")
325 (types . (general-music event rhythmic-event rest-event))
329 (description . "Music expressions concatenated. Syntax \\sequential @{..@} or simply @{..@} .")
331 (internal-class-name . "Sequential_music")
332 (iterator-ctor . ,Sequential_music_iterator::constructor)
333 (types . (general-music sequential-music))
336 (MultiMeasureRestMusicGroup
338 (description . "Like sequential-music, but specifically intended
339 to group start-mmrest, skip, stop-mmrest sequence. Syntax @code{R2.*5} for 5 measures in 3/4 time.")
340 (internal-class-name . "Sequential_music")
341 (iterator-ctor . ,Sequential_music_iterator::constructor)
342 (types . (general-music sequential-music))
347 (description . "Music playing together. Syntax: \\simultaneous @{ .. @} or < .. >.")
349 (internal-class-name . "Simultaneous_music")
350 (iterator-ctor . ,Simultaneous_music_iterator::constructor)
352 (types . (general-music simultaneous-music))
356 (description . "Start or end slur. Syntax NOTE( and )NOTE")
357 (internal-class-name . "Event")
358 (types . (general-music span-event slur-event))
363 (description . "The opposite of @ref{OverrideProperty}: remove a
364 previously added property from a graphical object definition
367 (internal-class-name . "Music")
368 (types . (general-music layout-instruction))
369 (iterator-ctor . , Pop_property_iterator::constructor)
372 (OutputPropertySetMusic
374 (description . "Set grob properties in objects
375 individually. Syntax @code{\\outputproperty @var{predicate} @var{prop}
378 (internal-class-name . "Music")
379 (iterator-ctor . ,Output_property_music_iterator::constructor)
380 (types . (general-music layout-instruction))
385 (description . "Start a text spanner like 8va.....|")
386 (internal-class-name . "Event")
387 (types . (general-music span-event text-span-event))
392 (description . "Change staffs in Piano staff. Syntax @code{\\translator Staff = @var{new-id}}.")
393 (internal-class-name . "Music")
394 (iterator-ctor . , Change_iterator::constructor)
395 (types . (general-music translator-change-instruction))
400 (description . "Multiply durations, as in tuplets. Syntax @code{\\times @var{fraction} @var{music}}, e.g.
401 @code{\\times 2/3 @{ ... @}} for triplets.
403 (internal-class-name . "Time_scaled_music")
404 (iterator-ctor . ,Time_scaled_music_iterator::constructor)
405 (types . (time-scaled-music music-wrapper-music general-music))
410 (description . "Music that has been transposed.")
411 (internal-class-name . "Transposed_music")
412 (types . (music-wrapper-music general-music transposed-music))
417 (description . "Music that can not be transposed.")
419 (internal-class-name . "Untransposable_music")
420 (types . (music-wrapper-music general-music untransposable-music))
425 (description . "Music that can not be converted from relative to absolute notation.
426 For example, transposed music.")
427 (internal-class-name . "Un_relativable_music")
428 (types . (music-wrapper-music general-music unrelativable-music))
433 (description . "Music that was entered in relative octave notation.")
435 (internal-class-name . "Relative_octave_music")
436 (types . (music-wrapper-music general-music relative-octave-music))
441 (description . "Internally used to group a set of events.")
443 (internal-class-name . "Simultaneous_music")
444 (iterator-ctor . ,Event_chord_iterator::constructor)
445 (types . (general-music event-chord simultaneous-music))
451 (description . "Add an articulation mark to a note. ")
453 (internal-class-name . "Event")
454 (types . (general-music event))
459 (description . "Filler that takes up duration, but does not print anything.")
461 (internal-class-name . "Event")
462 (types . (general-music event rhythmic-event skip-event))
467 (description . "Event for anything that is started at a different time than stopped.")
469 (internal-class-name . "Event")
470 (types . (general-music event))
475 (description . "Depress or release sustain pedal. ")
476 (internal-class-name . "Event")
477 (types . (general-music pedal-event sustain-pedal-event))
482 (description . "Depress or release sostenuto pedal. ")
483 (internal-class-name . "Event")
484 (types . (general-music pedal-event sostenuto-pedal-event))
489 (description . "Depress or release una-corda pedal.")
490 (internal-class-name . "Event")
491 (types . (general-music pedal-event una-corda-pedal-event))
496 (description . "Specify on which string to play this note. Syntax: @code{\\@var{number}}.")
498 (internal-class-name . "Event")
499 (types . (general-music string-number-event event))
504 (description . "Change tempo setting (in beats per minute).")
505 (internal-class-name . "Event")
506 (types . (general-music tempo-event event))
512 (internal-class-name . "Event")
513 (types . (general-music script-event text-script-event event))
517 (description . "A tie. Entered as @code{~}.")
518 (internal-class-name . "Event")
519 (types . (general-music tie-event event))
523 (description . "A tie. Entered as @var{note}-~.")
524 (internal-class-name . "Event")
525 (types . (general-music new-tie-event event))
529 (description . "Un measured tremolo.")
530 (internal-class-name . "Event")
531 (types . (general-music event tremolo-event))
536 (description . "Separate polyphonic voices in simultaneous music. Syntax: @code{\\\\}")
538 (internal-class-name . "Music")
539 (types . (separator general-music))
544 (iterator-ctor . ,Volta_repeat_iterator::constructor)
545 (internal-class-name . "Repeated_music")
547 (start-moment-function . ,Repeated_music::first_start)
548 (length . ,Repeated_music::volta_music_length)
549 (types . (general-music repeated-music volta-repeated-music))
552 (UnfoldedRepeatedMusic
554 (iterator-ctor . ,Unfolded_repeat_iterator::constructor)
556 (start-moment-function . ,Repeated_music::first_start)
557 (internal-class-name . "Repeated_music")
558 (types . (general-music repeated-music unfolded-repeated-music))
559 (length . ,Repeated_music::unfolded_music_length)
561 (PercentRepeatedMusic
563 (internal-class-name . "Repeated_music")
564 (description . "Repeats encoded by percents.")
565 (iterator-ctor . ,Percent_repeat_iterator::constructor)
566 (start-moment-function . ,Repeated_music::first_start)
567 (length . ,Repeated_music::unfolded_music_length)
568 (types . (general-music repeated-music percent-repeated-music))
571 (TremoloRepeteadMusic
573 (iterator-ctor . ,Chord_tremolo_iterator::constructor)
574 (description . "Repeated notes denoted by tremolo beams.")
575 (internal-class-name . "Repeated_music")
576 (start-moment-function . ,Repeated_music::first_start)
578 ;; the length of the repeat is handled by shifting the note logs
579 (length . ,Repeated_music::folded_music_length)
580 (types . (general-music repeated-music tremolo-repeated-music))
586 (internal-class-name . "Repeated_music")
587 (description . "Repeats with alternatives placed in parallel. ")
588 (iterator-ctor . ,Folded_repeat_iterator::constructor)
589 (start-moment-function . ,Repeated_music::minimum_start)
590 (length . ,Repeated_music::folded_music_length)
591 (types . (general-music repeated-music folded-repeated-music))
595 (set! music-descriptions
596 (sort music-descriptions alist<?))
598 (define music-name-to-property-table (make-vector 59 '()))
602 ;; transport description to an object property.
606 (set-object-property! (car x)
608 (cdr (assq 'description (cdr x))))
611 (set! l (assoc-set! l 'name (car x)))
612 (set! l (assq-remove! l 'description))
613 (hashq-set! music-name-to-property-table (car x) l)
620 (define-public (make-music-by-name x)
621 (if (not (symbol? x))
622 (error (format "Not a symbol: ~a" x)))
625 (props (hashq-ref music-name-to-property-table x '()))
626 (name (if (pair? props)
627 (cdr (assoc 'internal-class-name props))
628 (error "Can not find music object" x)))
632 (ly:warn (format "Could not find music type `~a'" x)))
633 (ly:make-bare-music name props)
638 (define-public (make-repeated-music name)
643 '(("volta" . VoltaRepeatedMusic)
644 ("unfold" . UnfoldedRepeatedMusic)
645 ("percent" . PercentRepeatedMusic)
646 ("tremolo" . TremoloRepeteadMusic)
647 ("fold" . FoldedRepeatedMusic)
654 (string-append "Unknown repeat type `" name
655 "'\nSee music-types.scm for supported repeats"))
661 (make-music-by-name music-name)