X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-music-types.scm;h=2205c43e5a1526cadd47fbc42b7b2e727c153200;hb=c58b9bd118958423656e674c25d940cdec71f58a;hp=a6e1cbe178a4e2f7077bcd49f3eba5b198a52a80;hpb=8c00ef0a0eb95417f6db5056c0c03b7cfa2e7571;p=lilypond.git diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm index a6e1cbe178..2205c43e5a 100644 --- a/scm/define-music-types.scm +++ b/scm/define-music-types.scm @@ -1,26 +1,23 @@ -;;;; define-music-types.scm -- +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 1998--2007 Han-Wen Nienhuys +;;;; Copyright (C) 1998--2011 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen +;;;; +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . ;; TODO: should link back into user manual. -(define (mm-rest-child-list music) - "Generate events for multimeasure rests, -to be used by the sequential-iterator" - (let ((location (ly:music-property music 'origin)) - (duration (ly:music-property music 'duration))) - (list (make-music 'BarCheck - 'origin location) - (make-event-chord (cons (make-music 'MultiMeasureRestEvent - 'origin location - 'duration duration) - (ly:music-property music 'articulations))) - (make-music 'BarCheck - 'origin location)))) - (define-public music-descriptions `( (AbsoluteDynamicEvent @@ -69,9 +66,9 @@ Syntax: @var{note}@code{-\\arpeggio}") Syntax: @var{note}@code{x}@code{y}, where @code{x} is a direction (@code{^} for up or @code{_} for down), or LilyPond's choice -(no direction specified)), and where @code{y} is an articulation +(no direction specified), and where @code{y} is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto}, @code{\\downbow}). -See the user manual for details.") +See the Notation Reference for details.") (types . (general-music event articulation-event script-event)) )) @@ -108,6 +105,11 @@ Syntax for manual control: @code{c8-[ c c-] c8}") (types . (general-music event beam-forbid-event)) )) + (BreakDynamicSpanEvent + . ((description . "End an alignment spanner for dynamics here.") + (types . (general-music break-span-event break-dynamic-span-event event)) + )) + (BendAfterEvent . ((description . "A drop/fall/doit jazz articulation.") (types . (general-music bend-after-event event)))) @@ -120,6 +122,20 @@ Syntax: @var{note}@code{\\breathe}") (types . (general-music event breathing-event)) )) + (ClusterNoteEvent + . ((description . "A note that is part of a cluster.") + ;; not a note-event, to ensure that Note_heads_engraver doesn't eat it. + (types . (general-music cluster-note-event melodic-event + rhythmic-event event)) + )) + + (CompletizeExtenderEvent + . ((description . "Used internally to signal the end of a lyrics block to +ensure extenders are completed correctly when a @code{Lyrics} context ends +before its associated @code{Voice} context.") + (types . (general-music completize-extender-event event)) + )) + (ContextChange . ((description . "Change staves in Piano staff. @@ -128,13 +144,6 @@ Syntax: @code{\\change Staff = @var{new-id}}") (types . (general-music translator-change-instruction)) )) - (ClusterNoteEvent - . ((description . "A note that is part of a cluster.") - ;; not a note-event, to ensure that Note_engraver doesn't eat it. - (types . (general-music cluster-note-event melodic-event - rhythmic-event event)) - )) - (ContextSpeccedMusic . ((description . "Interpret the argument music within a specific context.") @@ -147,23 +156,28 @@ specific context.") (CrescendoEvent . ((description . "Begin or end a crescendo. -Syntax: @var{note}@code{\\cr} @dots{} @var{note}@code{\\rc} +Syntax: @var{note}@code{\\<} @dots{} @var{note}@code{\\!} -You can also use @code{\\<}, @code{\\!}, @code{\\cresc}, and -@code{\\endcresc}. See the user manual for details.") +An alternative syntax is @var{note}@code{\\cr} @dots{} +@var{note}@code{\\endcr}.") (types . (general-music span-event span-dynamic-event crescendo-event event)) )) (DecrescendoEvent - . ((description . "See @ref{CrescendoEvent}.") + . ((description . "Begin or end a decrescendo. + +Syntax: @var{note}@code{\\>} @dots{} @var{note}@code{\\!} + +An alternative syntax is @var{note}@code{\\decr} @dots{} +@var{note}@code{\\enddecr}.") (types . (general-music span-event span-dynamic-event decrescendo-event event)) )) - (ExtenderEvent - . ((description . "Extend lyrics.") - (types . (general-music extender-event event)) + (EpisemaEvent + . ((description . "Begin or end an episema.") + (types . (general-music span-event event episema-event)) )) (Event @@ -180,6 +194,11 @@ You can also use @code{\\<}, @code{\\!}, @code{\\cresc}, and (types . (general-music event-chord simultaneous-music)) )) + (ExtenderEvent + . ((description . "Extend lyrics.") + (types . (general-music extender-event event)) + )) + (FingeringEvent . ((description . "Specify what finger to use for this note.") (types . (general-music fingering-event event)) @@ -230,7 +249,6 @@ Syntax: @var{note}@code{\\laissezVibrer}") (LigatureEvent . ((description . "Start or end a ligature.") - (span-type . ligature) (types . (general-music span-event ligature-event event)) )) @@ -304,6 +322,13 @@ Note the explicit font switch.") (types . (general-music event note-grouping-event)) )) + (OttavaMusic + . ((description . "Start or stop an ottava bracket.") + (iterator-ctor . ,ly:sequential-iterator::constructor) + (elements-callback . ,make-ottava-set) + (types . (general-music ottava-music)) + )) + (OverrideProperty . ((description . "Extend the definition of a graphical object. @@ -324,6 +349,17 @@ Syntax: @code{\\override} [ @var{context} @code{.} ] (types . (general-music break-event page-turn-event event)) )) + (PartCombineForceEvent + . ((description . "Override the part-combiner's strategy.") + (types . (general-music part-combine-force-event event)) + )) + + (PartialSet + . ((description . "Create an anacrusis or upbeat (partial measure).") + (iterator-ctor . ,ly:partial-iterator::constructor) + (types . (general-music partial-set)) + )) + (PartCombineMusic . ((description . "Combine two parts on a staff, either merged or as separate voices.") @@ -363,14 +399,16 @@ Syntax: @var{note}@code{\\(} and @var{note}@code{\\)}") (PropertySet . ((description . "Set a context property. -Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}") +Syntax: @code{\\set @var{context}.@var{prop} = @var{scheme-val}}") (types . (layout-instruction-event general-music)) (iterator-ctor . ,ly:property-iterator::constructor) )) (PropertyUnset - . ((description . "Remove the definition of a context -@code{\\property}.") + . ((description . "Restore the default setting for a context +property. See @ref{PropertySet}. + +Syntax: @code{\\unset @var{context}.@var{prop}}") (types . (layout-instruction-event general-music)) (iterator-ctor . ,ly:property-unset-iterator::constructor) )) @@ -398,9 +436,13 @@ Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}") (types . (music-wrapper-music general-music relative-octave-music)) )) - (RepeatTieEvent - . ((description . "Ties for starting a second volta bracket.") - (types . (general-music event repeat-tie-event)) + (RepeatedChord + . ((description . "A chord repetition") + (to-relative-callback . ,ly:music-sequence::repeated-chord-relative-callback) + (iterator-ctor . ,ly:music-wrapper-iterator::constructor) + (start-callback . ,ly:music-wrapper::start-callback) + (length-callback . ,ly:music-wrapper::length-callback) + (types . (general-music music-wrapper-music)) )) (RepeatedMusic @@ -408,6 +450,11 @@ Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}") (types . (general-music repeated-music)) )) + (RepeatTieEvent + . ((description . "Ties for starting a second volta bracket.") + (types . (general-music event repeat-tie-event)) + )) + (RestEvent . ((description . "A Rest. @@ -532,7 +579,8 @@ Syntax: @code{\\rightHandFinger @var{text}}") )) (TextSpanEvent - . ((description . "Start a text spanner, e.g., 8va.....|") + . ((description . "Start a text spanner, for example, an +octavation.") (types . (general-music span-event event text-span-event)) )) @@ -546,14 +594,21 @@ Syntax: @var{note}@code{-~}") (TimeScaledMusic . ((description . "Multiply durations, as in tuplets. -Syntax: @code{\\times @var{fraction} @var{music}}, e.g. +Syntax: @code{\\times @var{fraction} @var{music}}, e.g., @code{\\times 2/3 @{ @dots{} @}} for triplets.") (length-callback . ,ly:music-wrapper::length-callback) (start-callback . ,ly:music-wrapper::start-callback) - (iterator-ctor . ,ly:time-scaled-music-iterator::constructor) + (iterator-ctor . ,ly:tuplet-iterator::constructor) (types . (time-scaled-music music-wrapper-music general-music)) )) + (TimeSignatureMusic + . ((description . "Set a new time signature") + (iterator-ctor . ,ly:sequential-iterator::constructor) + (elements-callback . ,make-time-signature-set) + (types . (general-music time-signature-music)) + )) + (TransposedMusic . ((description . "Music that has been transposed.") (iterator-ctor . ,ly:music-wrapper-iterator::constructor) @@ -579,12 +634,12 @@ Syntax: @code{\\times @var{fraction} @var{music}}, e.g. )) (TremoloSpanEvent - . ((description . "Tremolo over two stems") + . ((description . "Tremolo over two stems.") (types . (general-music event span-event tremolo-span-event)) )) (TrillSpanEvent - . ((description . "Start a trill spanner tr~~~") + . ((description . "Start a trill spanner.") (types . (general-music span-event event trill-span-event)) )) @@ -660,7 +715,7 @@ Syntax: @code{\\\\}") (define-safe-public (make-music name . music-properties) "Create a music object of given name, and set its properties -according to @code{music-properties}, a list of alterning property symbols +according to @code{music-properties}, a list of alternating property symbols and values. E.g: (make-music 'OverrideProperty 'symbol 'Stem @@ -682,14 +737,14 @@ and values. E.g: m))) (define-public (make-repeated-music name) - (let* ((handle (assoc name '(("volta" . VoltaRepeatedMusic) - ("unfold" . UnfoldedRepeatedMusic) - ("percent" . PercentRepeatedMusic) - ("tremolo" . TremoloRepeatedMusic)))) - (music-name (if (pair? handle) - (cdr handle) - (begin - (ly:warning (_ "unknown repeat type `~S'") name) - (ly:warning (_ "See music-types.scm for supported repeats")) - 'VoltaRepeatedMusic)))) - (make-music music-name))) + (let* ((repeated-music (assoc-get name '(("volta" . VoltaRepeatedMusic) + ("unfold" . UnfoldedRepeatedMusic) + ("percent" . PercentRepeatedMusic) + ("tremolo" . TremoloRepeatedMusic)))) + (repeated-music-name (if repeated-music + repeated-music + (begin + (ly:warning (_ "unknown repeat type `~S'") name) + (ly:warning (_ "See define-music-types.scm for supported repeats")) + 'VoltaRepeatedMusic)))) + (make-music repeated-music-name)))