]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3481: Let PartialSet use music property 'duration instead of 'partial-duration
authorDavid Kastrup <dak@gnu.org>
Tue, 30 Jul 2013 09:45:58 +0000 (11:45 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 5 Aug 2013 09:14:15 +0000 (11:14 +0200)
This allows for \partial to be subjected to the operation of
\shiftDurations.

lily/partial-iterator.cc
ly/music-functions-init.ly
scm/define-music-display-methods.scm
scm/define-music-properties.scm
scm/define-music-types.scm

index 2b1ff3eb5b531bca251b42fcf059e744ee98476a..7c3b3e965b56f171ef2e3761c7c9a85867581ad0 100644 (file)
@@ -36,7 +36,7 @@ void
 Partial_iterator::process (Moment m)
 {
   if (Duration * dur
-      = unsmob_duration (get_music ()->get_property ("partial-duration")))
+      = unsmob_duration (get_music ()->get_property ("duration")))
     {
       Context *ctx = get_outlet ();
       Moment now = ctx->now_mom ();
index a25198f3e01dfaa06fd4cc76aee9e4d5a837d9e8..8af797115f6a730b08e4ee153c71ac939f031591 100644 (file)
@@ -976,7 +976,7 @@ partial =
     (descend-to-context
      (context-spec-music (make-music 'PartialSet
                                     'origin location
-                                    'partial-duration dur)
+                                    'duration dur)
                         'Timing)
      'Score))
 
index 6d9dc8250603c6d8bc8e480e9728c0f95c3bb017..537e5d24dfbfb6c0a599433fbae8ef9fd22130b9 100644 (file)
@@ -993,7 +993,7 @@ Otherwise, return #f."
                                     context-type 'Timing
                                     element (music
                                              'PartialSet
-                                             partial-duration ?duration))))
+                                             duration ?duration))))
 
                     (and ?duration
                          (format #f "\\partial ~a"
index cdfe5f3cd3367d004097d23a4b55ce9ba70b556b..4082cc49029666cf0b54c26ee84ef5ea4f2608de 100644 (file)
@@ -143,8 +143,6 @@ top-level, a page marker object is instanciated instead of a score.")
      (page-turn-permission ,symbol? "When the music is at top-level,
 whether to allow, forbid or force a page turn.")
      (parenthesize ,boolean? "Enclose resulting objects in parentheses?")
-     (partial-duration ,ly:duration? "The length of a partial measure as a
-duration.")
      (part-combine-status ,symbol? "Change to what kind of state?
 Options are @code{solo1}, @code{solo2} and @code{unisono}.")
      (pitch ,ly:pitch? "The pitch of this note.")
index 5cc5907fbc3606ce0d5182995886a3d109161b6b..0a796a1981b66b7f147e637ad972dfa1dac09a15 100644 (file)
@@ -397,6 +397,11 @@ Syntax: @code{\\override} [ @var{context} @code{.} ]
     (PartialSet
      . ((description . "Create an anacrusis or upbeat (partial measure).")
         (iterator-ctor . ,ly:partial-iterator::constructor)
+        ;; The length-callback is kind of cheesy since 'elements is
+        ;; empty.  We just use that in order to get a zero length
+        ;; for the overall timing in spite of having a non-zero
+        ;; duration field.
+        (length-callback . ,ly:music-sequence::cumulative-length-callback)
         (types . (general-music partial-set))
         ))