]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-music-types.scm
* scm/define-music-types.scm (music-descriptions): use
[lilypond.git] / scm / define-music-types.scm
index 41d4609d493d1a0efef4c55a820b11a971d5b36c..7a06764063cbee8827fbeea1176481500b881966 100644 (file)
@@ -7,6 +7,20 @@
 
 ;; TODO: should link back into user manual.
 
 
 ;; TODO: should link back into user manual.
 
+(define (mm-rest-child-list music)
+  "Check if we have R1*4-\\markup { .. }, and if applicable convert to
+a property set for MultiMeasureRestNumber."
+  (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
 (define-public music-descriptions
   `(
     (AbsoluteDynamicEvent
@@ -30,14 +44,13 @@ Call the argument with all current grobs during interpreting phase.
 
 Syntax
 
 
 Syntax
 
-\\applyoutput FUNC
+\\applyOutput #'Context FUNC
 
 arguments to func are 1. the grob, 2. the originating context,
 3. context where FUNC is called.
 
 ")
 
 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 
      . (
        ))
     (ArpeggioEvent 
      . (
@@ -91,13 +104,18 @@ Syntax for manual control:
 c8-[ c c-] c8")
        (types . (general-music event beam-event span-event))
        ))
 c8-[ c c-] c8")
        (types . (general-music event beam-event span-event))
        ))
+
+    (BendAfterEvent
+     . ((description . "A drop/fall/doit jazz articulation")
+       (types . (general-music bend-after-event event))))
+
     (BreakEvent
      . (
        (description .  "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.")
        
        (types . (general-music break-event event))
        ))
     (BreakEvent
      . (
        (description .  "Create a line break, Syntax: \\break or page break, Syntax: \\pagebreak.")
        
        (types . (general-music break-event event))
        ))
-    (BreathingSignEvent
+    (BreathingEvent
      . (
        (description .  "Creates a `breath mark' or `comma'.  
 
      . (
        (description .  "Creates a `breath mark' or `comma'.  
 
@@ -106,12 +124,6 @@ Syntax:
 
        (types . (general-music event breathing-event))
        )) 
 
        (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. 
     (ContextChange
      . (
        (description .  "Change staffs in Piano staff. 
@@ -161,7 +173,12 @@ Syntax: @var{note}\\cr
        (types . (general-music extender-event event))
        ))
 
        (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.")
     (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))
        ))
 
        (types . (general-music event-chord simultaneous-music))
        ))
 
-    (FingerEvent
+    
+    (FingeringEvent
      . (
        (description . "Specify what finger to use for this note.")
        (types . (general-music fingering-event event))
      . (
        (description . "Specify what finger to use for this note.")
        (types . (general-music fingering-event event))
@@ -236,18 +254,7 @@ Syntax: @var{note}\\laissezVibrer.")
     (LineBreakEvent
      . (
        (description .  "Allow, forbid or force a line break.")
     (LineBreakEvent
      . (
        (description .  "Allow, forbid or force a line break.")
-       (types . (general-music break-event event))
-       ))
-    (OldLyricCombineMusic
-     . (
-       (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)
+       (types . (general-music line-break-event break-event event))
        ))
     
     (LyricCombineMusic
        ))
     
     (LyricCombineMusic
@@ -276,11 +283,6 @@ e.g. @code{\\mark \"A\"}.")
 
        (types . (general-music mark-event event))
        ))
 
        (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.
     (ManualMelismaEvent
      . (
        (description .  "Start or stop a melisma.
@@ -288,26 +290,22 @@ e.g. @code{\\mark \"A\"}.")
 Syntax: @code{c4\\melisma d\\melismaEnd}.")
        (types . (general-music melisma-span-event event))
        ))
 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
      . (
        (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
        ))
     
     (MultiMeasureTextEvent
@@ -331,18 +329,6 @@ Syntax
        (types . (general-music event note-event rhythmic-event melodic-event))
        ))
     
        (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.
     (OverrideProperty
      . (
        (description .  "Extend the definition of a graphical object.
@@ -351,7 +337,7 @@ SYNTAX
 
 @code{\\override [ @var{Ctxt} . ] @var{Obj} @var{prop} = @var{val}}
 ")
 
 @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
        (iterator-ctor . ,ly:push-property-iterator::constructor)
        ))
     (PageBreakEvent
@@ -386,7 +372,7 @@ Syntax NOTE \\(  and \\) NOTE")
        (description .  "Set a context property.
 
 Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
        (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)
        ))
 
        (iterator-ctor . ,ly:property-iterator::constructor)
        ))
 
@@ -394,7 +380,7 @@ Syntax: @code{\\property @var{context}.@var{prop} = @var{scheme-val}}.")
      . (
        (description .  "Remove the definition of a context @code{\\property}.")
 
      . (
        (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)
        ))
 
        (iterator-ctor . ,ly:property-unset-iterator::constructor)
        ))
 
@@ -438,12 +424,6 @@ goes down).")
        (description . "Ties for starting a second volta bracket.")
        (types . (general-music event repeat-tie-event))
        ))
        (description . "Ties for starting a second volta bracket.")
        (types . (general-music event repeat-tie-event))
        ))
-    (Event
-     . (
-       (description .  "Atomic music event.")
-       (types . (general-music event))
-       ))
-    
     (RestEvent
      . (
        (description .  "A Rest. 
     (RestEvent
      . (
        (description .  "A Rest. 
@@ -458,7 +438,7 @@ Syntax @code{r4} for a quarter rest. ")
 previously added property from a graphical object definition
  ")
 
 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)
        ))
 
        (iterator-ctor . ,      ly:pop-property-iterator::constructor)
        ))
 
@@ -470,7 +450,8 @@ Syntax \\sequential @{..@} or simply @{..@} .")
 
        (length-callback . ,ly:music-sequence::cumulative-length-callback)
        (start-callback . ,ly:music-sequence::first-start-callback)
 
        (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))
        ))
 
        (types . (general-music sequential-music))
        ))
 
@@ -478,18 +459,18 @@ Syntax \\sequential @{..@} or simply @{..@} .")
      . (
        (description . "Print Solo.1")
        (part-combine-status . solo1)
      . (
        (description . "Print Solo.1")
        (part-combine-status . solo1)
-       (types . (general-music event part-combine-event))
+       (types . (general-music event part-combine-event solo1-event))
        ))
     (SoloTwoEvent
      . (
        (description . "Print Solo.2")
        (part-combine-status . solo2)
        ))
     (SoloTwoEvent
      . (
        (description . "Print Solo.2")
        (part-combine-status . solo2)
-       (types . (general-music event part-combine-event))
+       (types . (general-music event part-combine-event solo2-event))
        ))
     (UnisonoEvent
      . ((description . "Print a2")
        (part-combine-status . unisono)
        ))
     (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
      . (
     
     (SimultaneousMusic
      . (
@@ -521,13 +502,6 @@ Syntax NOTE(        and NOTE) ")
        (types . (general-music event span-event staff-span-event))
      ))
     
        (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.....|")
     (TextSpanEvent
      . (
        (description . "Start a text spanner like 8va.....|")
@@ -563,10 +537,10 @@ Syntax @code{\\times @var{fraction} @var{music}}, e.g.
        (types . (time-scaled-music music-wrapper-music general-music))
        ))
 
        (types . (time-scaled-music music-wrapper-music general-music))
        ))
 
-    (TupletEvent
+    (TupletSpanEvent
      . (
        (description .  "Used internally to signal where tuplet brackets start and stop.")
      . (
        (description .  "Used internally to signal where tuplet brackets start and stop.")
-       (types . (tuplet-spanner-event span-event event general-music))
+       (types . (tuplet-span-event span-event event general-music))
        ))
 
     (UnrelativableMusic
        ))
 
     (UnrelativableMusic
@@ -618,6 +592,11 @@ Syntax: @code{s}@var{duration}")
 
        (types . (general-music event rhythmic-event skip-event))
        ))
 
        (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.")
     (SpanEvent
      . (
        (description .  "Event for anything that is started at a different time than stopped.")
@@ -628,7 +607,7 @@ Syntax: @code{s}@var{duration}")
     (SustainEvent
      . (
        (description . "Depress or release sustain pedal. ")
     (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
        ))
     
     (SostenutoEvent
@@ -674,6 +653,12 @@ Syntax: @code{\\@var{number}}.")
        (types . (general-music event tremolo-event))
        ))
     
        (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. 
     (VoiceSeparator
      . (
        (description .  "Separate polyphonic voices in simultaneous music.