]> git.donarmstrong.com Git - lilypond.git/commitdiff
multi-measure-rest: space according to the full duration
authorKeith OHara <k-ohara5a5a@oco.net>
Thu, 27 Nov 2014 05:23:06 +0000 (21:23 -0800)
committerKeith OHara <k-ohara5a5a@oco.net>
Fri, 12 Dec 2014 04:27:21 +0000 (20:27 -0800)
Documentation/changes.tely
lily/multi-measure-rest.cc
scm/define-grob-properties.scm
scm/define-grobs.scm

index 467f5a30ca34d73d10bc00552ad973e805247add..a90f386485790d53292a5795d06329ec870f68ea 100644 (file)
@@ -61,6 +61,15 @@ which scares away people.
 
 @end ignore
 
+@item
+Multi-measure rests have length according to their total duration,
+under the control of @code{MultiMeasureRest.space-increment}.
+@lilypond[quote]
+{ \compressFullBarRests
+  \override MultiMeasureRest.space-increment = 2.2
+  R1 R1 R1*2 R1*8 R1*24 R1*80 }
+@end lilypond
+
 @item
 Page numbers may now be printed in roman numerals, by setting the
 @code{page-number-type} paper variable.
index a4990332f369478a8caa7400e8e8ede2cdc2e8d3..b6d95b8cf752671692f14a65b9f97696515ad21d 100644 (file)
@@ -365,7 +365,9 @@ Multi_measure_rest::calculate_spacing_rods (Grob *me, Real length)
       Moment mlen = robust_scm2moment (li->get_property ("measure-length"),
                                        Moment (1));
       length += robust_scm2double (li->get_property ("full-measure-extra-space"), 0.0)
-                + options.get_duration_space (mlen.main_part_);
+                + options.get_duration_space (mlen.main_part_)
+                + (robust_scm2double (me->get_property ("space-increment"), 0.0)
+                   * log_2 (robust_scm2int (me->get_property ("measure-count"), 1)));
     }
 
   length += 2 * robust_scm2double (me->get_property ("bound-padding"), 0.0);
@@ -434,6 +436,7 @@ ADD_INTERFACE (Multi_measure_rest,
                "minimum-length "
                "round-up-exceptions "
                "round-up-to-longer-rest "
+               "space-increment "
                "spacing-pair "
                "thick-thickness "
                "usable-duration-logs "
index f3b684754f6d4f7b89bc4cc1992768f7d79ccd2a..676432bb1aa4abf30adf38e265d6cfee9aca1aa7 100644 (file)
@@ -1284,6 +1284,9 @@ relevant for finding the @code{pure-Y-extent}.")
 grobs.")
      (slur ,ly:grob? "A pointer to a @code{Slur} object.")
      (spacing ,ly:grob? "The spacing spanner governing this section.")
+     (space-increment ,ly:dimension? "The amount by which the total duration
+of a multimeasure rest affects horizontal spacing.  Each doubling of the
+duration adds @code{space-increment} to the length of the bar.")
      (spacing-wishes ,ly:grob-array? "An array of note spacing or staff spacing
 objects.")
      (span-start ,boolean? "Is the note head at the start of a spanner?")
index 7ec30570dd7c8fb7cc081b398bee94227a2a5f51..d90cc885a2026a066a736ecb76d782b18ecc2d83 100644 (file)
         (hair-thickness . 2.0)
         (round-up-exceptions . ())
         (bound-padding . 0.5)
+        (space-increment . 2.0)
         (spacing-pair . (break-alignment . break-alignment))
         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
         (stencil . ,ly:multi-measure-rest::print)
 
     (MultiMeasureRestNumber
      . (
-        (bound-padding  . 2.0)
+        (bound-padding  . 1.0)
         (direction . ,UP)
         (font-encoding . fetaText)
         (padding . 0.4)