]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/define-music-types.scm
Fix #1205.
[lilypond.git] / scm / define-music-types.scm
index d9a5f09ac872f35ada7bd598e54115864cf53d73..43b826e8b8ab4d7a9ecf7a30c9412c718c0cdc94 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; This file is part of LilyPond, the GNU music typesetter.
 ;;;;
-;;;; Copyright (C) 1998--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
+;;;; Copyright (C) 1998--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 ;;;;                Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;;
 ;;;; LilyPond is free software: you can redistribute it and/or modify
 
 ;; 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 (make-ottava-set music)
-  "Set context properties for an ottava bracket."
-  (let ((octavation (ly:music-property music 'ottava-number)))
-
-    (list (context-spec-music
-          (make-apply-context
-           (lambda (context)
-             (let ((offset (* -7 octavation))
-                   (string (assoc-get octavation '((2 . "15ma")
-                                                   (1 . "8va")
-                                                   (0 . #f)
-                                                   (-1 . "8vb")
-                                                   (-2 . "15mb")))))
-               (set! (ly:context-property context 'middleCOffset) offset)
-               (set! (ly:context-property context 'ottavation) string)
-               (ly:set-middle-C! context))))
-          'Staff))))
-
 (define-public music-descriptions
   `(
     (AbsoluteDynamicEvent
@@ -381,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.")
@@ -594,6 +573,11 @@ Syntax: @code{\\rightHandFinger @var{text}}")
        (types . (general-music event pedal-event sustain-event))
        ))
 
+    (TempoChangeEvent
+     . ((description . "A metronome mark or tempo indication.")
+       (types . (general-music event tempo-change-event))
+       ))
+
     (TextScriptEvent
      . ((description . "Print text.")
        (types . (general-music script-event text-script-event event))
@@ -623,6 +607,13 @@ Syntax: @code{\\times @var{fraction} @var{music}}, e.g.,
        (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)
@@ -710,7 +701,7 @@ Syntax: @code{\\\\}")
 (set! music-descriptions
       (sort music-descriptions alist<?))
 
-(define-public music-name-to-property-table (make-vector 59 '()))
+(define-public music-name-to-property-table (make-hash-table 59))
 
 ;; init hash table,
 ;; transport description to an object property.