X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-music-types.scm;h=e7e2bb88cf960b992881c1b851e73e50f34aad3e;hb=416e7154edd5c944428ea99dc1150e2d9c04e7ef;hp=64a548de5cb496c07cea72669883001b5996e09e;hpb=99242a027c2281ed7674772e9a0ae7fc86024be0;p=lilypond.git diff --git a/scm/define-music-types.scm b/scm/define-music-types.scm index 64a548de5c..e7e2bb88cf 100644 --- a/scm/define-music-types.scm +++ b/scm/define-music-types.scm @@ -2,11 +2,24 @@ ;;;; ;;;; source file of the GNU LilyPond music typesetter ;;;; -;;;; (c) 1998--2006 Han-Wen Nienhuys +;;;; (c) 1998--2006 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen ;; 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 @@ -17,12 +30,19 @@ Syntax: @var{note}@code{\\x}, where x is one of \\ppp, \\pp, \\p, \\mp, \\mf, \\f, \\ff, \\fff.") (types . (general-music event dynamic-event absolute-dynamic-event)) )) + + (AnnotateOutputEvent + . ((description . "Print an annotation of an output element.") + (types . (general-music event annotate-output-event)) + )) + (ApplyContext . ( (description . "Call the argument with the current context during interpreting phase") (types . (general-music apply-context)) (iterator-ctor . ,ly:apply-context-iterator::constructor) )) + (ApplyOutputEvent . ( (description . " @@ -30,14 +50,13 @@ Call the argument with all current grobs during interpreting phase. Syntax -\\applyoutput FUNC +\\applyOutput #'Context FUNC arguments to func are 1. the grob, 2. the originating context, 3. context where FUNC is called. ") - (iterator-ctor . ,ly:output-property-music-iterator::constructor) - (types . (general-music layout-instruction)) + (types . (general-music event apply-output-event)) )) (ArpeggioEvent . ( @@ -83,6 +102,7 @@ is an articulation (such as @code{-.}, @code{->}, @code{\\tenuto}, (types . (general-music event rhythmic-event bass-figure-event)) )) + (BeamEvent . ( (description . "Starts or stops a beam. @@ -91,13 +111,11 @@ Syntax for manual control: c8-[ c c-] c8") (types . (general-music event beam-event span-event)) )) - (BreakEvent - . ( - (description . "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.") + (BendAfterEvent + . ((description . "A drop/fall/doit jazz articulation") + (types . (general-music bend-after-event event)))) - (types . (general-music break-event event)) - )) - (BreathingSignEvent + (BreathingEvent . ( (description . "Creates a `breath mark' or `comma'. @@ -106,12 +124,6 @@ Syntax: (types . (general-music event breathing-event)) )) - (BusyPlayingEvent - . ( - (description . "Used internally to signal beginning and ending of notes.") - - (types . (general-music event busy-playing-event)) - )) (ContextChange . ( (description . "Change staffs in Piano staff. @@ -145,13 +157,13 @@ Syntax: @var{note}\\cr ... @var{note}\\rc (you can also use \\<, \\!, \\cresc, and \\endcresc. See the user manual for details.).") - (types . (general-music dynamic-event crescendo-event event)) + (types . (general-music span-event span-dynamic-event crescendo-event event)) )) (DecrescendoEvent . ( (description . "See @ref{CrescendoEvent}.") - (types . (general-music dynamic-event decrescendo-event event)) + (types . (general-music span-event span-dynamic-event decrescendo-event event)) )) (ExtenderEvent @@ -161,7 +173,12 @@ Syntax: @var{note}\\cr (types . (general-music extender-event event)) )) - + (Event + . ( + (description . "Atomic music event.") + (types . (general-music event)) + )) + (EventChord . ( (description . "Internally used to group a set of events.") @@ -171,7 +188,8 @@ Syntax: @var{note}\\cr (types . (general-music event-chord simultaneous-music)) )) - (FingerEvent + + (FingeringEvent . ( (description . "Specify what finger to use for this note.") (types . (general-music fingering-event event)) @@ -229,21 +247,14 @@ Syntax: @var{note}\\laissezVibrer.") )) (LigatureEvent . ( - (description . "(docme).") + (description . "Start or end a ligature.") (span-type . ligature) (types . (general-music span-event ligature-event event)) )) - - (OldLyricCombineMusic + (LineBreakEvent . ( - (description . "Align lyrics to the start of notes. - -Syntax @var{\\oldaddlyrics }@var{music} @var{lyrics}.") - - (types . (general-music lyric-combine-music)) - (length-callback . ,ly:lyric-combine-music::length-callback) - (start-callback . ,ly:music-sequence::first-start-callback) - (iterator-ctor . ,ly:old-lyric-combine-music-iterator::constructor) + (description . "Allow, forbid or force a line break.") + (types . (general-music line-break-event break-event event)) )) (LyricCombineMusic @@ -272,11 +283,6 @@ e.g. @code{\\mark \"A\"}.") (types . (general-music mark-event event)) )) - (MelismaPlayingEvent - . ( - (description . "Used internally to signal melismas.") - (types . (general-music melisma-playing-event event)) - )) (ManualMelismaEvent . ( (description . "Start or stop a melisma. @@ -284,26 +290,22 @@ e.g. @code{\\mark \"A\"}.") Syntax: @code{c4\\melisma d\\melismaEnd}.") (types . (general-music melisma-span-event event)) )) - - (MultiMeasureRestEvent + + (MultiMeasureRestMusic . ( (description . "Rests that may be compressed into Multi rests. Syntax -@code{R2.*4} for 4 measures in 3/4 time. Note the capital R.") - (types . (general-music event rhythmic-event multi-measure-rest-event)) +@code{R2.*4} for 4 measures in 3/4 time.") + (iterator-ctor . ,ly:sequential-iterator::constructor) + (elements-callback . ,mm-rest-child-list) + (types . (general-music multi-measure-rest)) )) - - (MultiMeasureRestMusicGroup - . ( - (description . "Like sequential-music, but specifically intended -to group start-mmrest, skip, stop-mmrest sequence. -Syntax @code{R2.*5} for 5 measures in 3/4 time.") - (length-callback . ,ly:music-sequence::cumulative-length-callback) - (start-callback . ,ly:music-sequence::first-start-callback) - (iterator-ctor . ,ly:sequential-music-iterator::constructor) - (types . (general-music sequential-music)) + (MultiMeasureRestEvent + . ( + (description . "Used internally by MultiMeasureRestMusic to signal rests") + (types . (general-music event rhythmic-event multi-measure-rest-event)) )) (MultiMeasureTextEvent @@ -324,22 +326,9 @@ Syntax (NoteEvent . ( (description . "A note.") - (types . (general-music event note-event rhythmic-event melodic-event)) )) - (OutputPropertySetMusic - . ( - (description . "Set grob properties in objects -individually. - -Syntax @code{\\outputproperty @var{predicate} @var{prop} -= @var{val}}.") - - (iterator-ctor . ,ly:output-property-music-iterator::constructor) - (types . (general-music layout-instruction)) - )) - (OverrideProperty . ( (description . "Extend the definition of a graphical object. @@ -348,9 +337,19 @@ SYNTAX @code{\\override [ @var{Ctxt} . ] @var{Obj} @var{prop} = @var{val}} ") - (types . (general-music layout-instruction)) + (types . (general-music layout-instruction-event override-property-event)) (iterator-ctor . ,ly:push-property-iterator::constructor) )) + (PageBreakEvent + . ( + (description . "Allow, forbid or force a page break.") + (types . (general-music break-event page-break-event event)) + )) + (PageTurnEvent + . ( + (description . "Allow, forbid or force a page turn.") + (types . (general-music break-event page-turn-event event)) + )) (PartCombineMusic . ( (description . "Combine two parts on a staff, either merged or @@ -373,7 +372,7 @@ Syntax NOTE \\( and \\) NOTE") (description . "Set a context property. Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.") - (types . (layout-instruction general-music)) + (types . (layout-instruction-event general-music)) (iterator-ctor . ,ly:property-iterator::constructor) )) @@ -381,10 +380,16 @@ Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.") . ( (description . "Remove the definition of a context @code{\\property}.") - (types . (layout-instruction general-music)) + (types . (layout-instruction-event general-music)) (iterator-ctor . ,ly:property-unset-iterator::constructor) )) - + + (PercentEvent + . ( + (description . "Used internally to signal percent repeats.") + (types . (general-music event percent-event rhythmic-event)) + )) + (PesOrFlexaEvent . ( (description . "Within a ligature, mark the previous and the @@ -397,7 +402,7 @@ goes down).") (QuoteMusic . ( (description . "Quote preprocessed snippets of music. ") - (iterator-ctor . ,ly:quote-iterator::constructor) + (iterator-ctor . ,ly:music-wrapper-iterator::constructor) (length-callback . ,ly:music-wrapper::length-callback) (start-callback . ,ly:music-wrapper::start-callback) (types . (general-music music-wrapper-music)) @@ -415,15 +420,10 @@ goes down).") (types . (general-music repeated-music)) )) (RepeatTieEvent - . ((description . "Ties for starting a second volta bracket.") - (types . (general-music event repeat-tie-event)) - )) - (Event . ( - (description . "Atomic music event.") - (types . (general-music event)) + (description . "Ties for starting a second volta bracket.") + (types . (general-music event repeat-tie-event)) )) - (RestEvent . ( (description . "A Rest. @@ -438,7 +438,7 @@ Syntax @code{r4} for a quarter rest. ") previously added property from a graphical object definition ") - (types . (general-music layout-instruction)) + (types . (general-music layout-instruction-event)) (iterator-ctor . , ly:pop-property-iterator::constructor) )) @@ -450,7 +450,8 @@ Syntax \\sequential @{..@} or simply @{..@} .") (length-callback . ,ly:music-sequence::cumulative-length-callback) (start-callback . ,ly:music-sequence::first-start-callback) - (iterator-ctor . ,ly:sequential-music-iterator::constructor) + (elements-callback . ,(lambda (m) (ly:music-property m 'elements))) + (iterator-ctor . ,ly:sequential-iterator::constructor) (types . (general-music sequential-music)) )) @@ -458,18 +459,18 @@ Syntax \\sequential @{..@} or simply @{..@} .") . ( (description . "Print Solo.1") (part-combine-status . solo1) - (types . (general-music event part-combine-event)) + (types . (general-music event part-combine-event solo-one-event)) )) (SoloTwoEvent . ( (description . "Print Solo.2") (part-combine-status . solo2) - (types . (general-music event part-combine-event)) + (types . (general-music event part-combine-event solo-two-event)) )) (UnisonoEvent . ((description . "Print a2") (part-combine-status . unisono) - (types . (general-music event part-combine-event)))) + (types . (general-music event part-combine-event unisono-event)))) (SimultaneousMusic . ( @@ -501,13 +502,6 @@ Syntax NOTE( and NOTE) ") (types . (general-music event span-event staff-span-event)) )) - (StartPlayingEvent - . ( - (description . "Used internally to signal beginning of notes.") - - (types . (general-music event start-playing-event)) - )) - (TextSpanEvent . ( (description . "Start a text spanner like 8va.....|") @@ -520,6 +514,16 @@ Syntax NOTE( and NOTE) ") (types . (general-music span-event event trill-span-event)) )) + (TransposedMusic + . ( + (description . "Music that has been transposed.") + (iterator-ctor . ,ly:music-wrapper-iterator::constructor) + (start-callback . ,ly:music-wrapper::start-callback) + (length-callback . ,ly:music-wrapper::length-callback) + (to-relative-callback . ,ly:relative-octave-music::no-relative-callback) + (types . (music-wrapper-music general-music transposed-music)) + )) + (TimeScaledMusic . ( (description . "Multiply durations, as in tuplets. @@ -532,16 +536,12 @@ Syntax @code{\\times @var{fraction} @var{music}}, e.g. (iterator-ctor . ,ly:time-scaled-music-iterator::constructor) (types . (time-scaled-music music-wrapper-music general-music)) )) - - (TransposedMusic + + (TupletSpanEvent . ( - (description . "Music that has been transposed.") - (iterator-ctor . ,ly:music-wrapper-iterator::constructor) - (start-callback . ,ly:music-wrapper::start-callback) - (length-callback . ,ly:music-wrapper::length-callback) - (to-relative-callback . ,ly:relative-octave-music::no-relative-callback) - (types . (music-wrapper-music general-music transposed-music)) - )) + (description . "Used internally to signal where tuplet brackets start and stop.") + (types . (tuplet-span-event span-event event general-music)) + )) (UnrelativableMusic . ( @@ -592,6 +592,11 @@ Syntax: @code{s}@var{duration}") (types . (general-music event rhythmic-event skip-event)) )) + + (SpacingSectionEvent + . ((description . "Start a new spacing section") + (types . (general-music event spacing-section-event)))) + (SpanEvent . ( (description . "Event for anything that is started at a different time than stopped.") @@ -602,19 +607,19 @@ Syntax: @code{s}@var{duration}") (SustainEvent . ( (description . "Depress or release sustain pedal. ") - (types . (general-music event pedal-event sustain-pedal-event)) + (types . (general-music event pedal-event sustain-event)) )) (SostenutoEvent . ( (description . "Depress or release sostenuto pedal. ") - (types . (general-music event pedal-event sostenuto-pedal-event)) + (types . (general-music event pedal-event sostenuto-event)) )) (UnaCordaEvent . ( (description . "Depress or release una-corda pedal.") - (types . (general-music event pedal-event una-corda-pedal-event)) + (types . (general-music event pedal-event una-corda-event)) )) (StringNumberEvent @@ -626,11 +631,14 @@ Syntax: @code{\\@var{number}}.") (types . (general-music string-number-event event)) )) - (MetronomeChangeEvent + (StrokeFingerEvent . ( - (description . "Change tempo setting (in beats per minute).") - (types . (general-music metronome-change-event tempo-event event)) - )) + (description . "Specify with which finger to pluck a string. + +Syntax: @code{\\rightHandFinger @var{text}}.") + + (types . (general-music stroke-finger-event event)) + )) (TextScriptEvent . ( @@ -648,6 +656,12 @@ Syntax: @code{\\@var{number}}.") (types . (general-music event tremolo-event)) )) + (TremoloSpanEvent + . ( + (description . "Tremolo over two stems") + (types . (general-music event span-event tremolo-span-event)) + )) + (VoiceSeparator . ( (description . "Separate polyphonic voices in simultaneous music. @@ -737,7 +751,7 @@ and values. E.g: (ly:error (_ "symbol expected: ~S") name)) (let ((props (hashq-ref music-name-to-property-table name '()))) (if (not (pair? props)) - (ly:error (_ "can't find music object: ~S") name)) + (ly:error (_ "cannot find music object: ~S") name)) (let ((m (ly:make-music props))) (define (set-props mus-props) (if (and (not (null? mus-props))