]> git.donarmstrong.com Git - lilypond.git/commitdiff
spacing-options: clarify documentation
authorKeith OHara <k-ohara5a5a@oco.net>
Tue, 17 Dec 2013 22:58:29 +0000 (14:58 -0800)
committerKeith OHara <k-ohara5a5a@oco.net>
Sat, 4 Jan 2014 04:20:35 +0000 (20:20 -0800)
Documentation/notation/spacing.itely
lily/spacing-options.cc
scm/define-grob-properties.scm

index 23d7cf05c57c0325b9b9bd40113e00fc291c8469..1ce8ec5c13ff101c66e1bc020b4e73e61d324f0e 100644 (file)
@@ -2768,8 +2768,7 @@ more space, shorter durations get less.  The shortest durations get a
 fixed amount of space (which is controlled by
 @code{shortest-duration-space} in the @rinternals{SpacingSpanner}
 object).  The longer the duration, the more space it gets: doubling a
-duration adds a fixed amount (this amount is controlled by
-@code{spacing-increment}) of space to the note.
+duration adds @code{spacing-increment} of space to the note.
 
 For example, the following piece contains lots of half, quarter, and
 8th notes; the eighth note is followed by 1 note head width (NHW).
index e90dcebcab08071146aa1045796bea0317c4f475..7641581c359c934adf91f12d7f13645f26784b56 100644 (file)
@@ -66,9 +66,9 @@ Spacing_options::Spacing_options ()
 Real
 Spacing_options::get_duration_space (Rational d) const
 {
-  Real k = shortest_duration_space_;
+  Real ratio = d / global_shortest_;
 
-  if (d < global_shortest_)
+  if (ratio < 1.0)
     {
       /*
         We don't space really short notes using the log of the
@@ -86,9 +86,8 @@ Spacing_options::get_duration_space (Rational d) const
 
 
       */
-      Rational ratio = d / global_shortest_;
 
-      return ((k - 1) + double (ratio)) * increment_;
+      return (shortest_duration_space_ + ratio - 1) * increment_;
     }
   else
     {
@@ -97,10 +96,8 @@ Spacing_options::get_duration_space (Rational d) const
         Report OSU-CISRC-10/87-TR35, Department of Computer and
         Information Science, The Ohio State University, 1987.
       */
-      Real log = log_2 (global_shortest_);
-      k -= log;
 
-      return (log_2 (d) + k) * increment_;
+      return (shortest_duration_space_ + log_2 (ratio)) * increment_;
     }
 }
 
index cfa2cfb4c1ef6752e84a6be785a689ddd317111d..6e7e8ad95537e088959cd6ced661c4bed95f8eff 100644 (file)
@@ -802,9 +802,8 @@ ending at that staff-position.")
      (shorten-pair ,number-pair? "The lengths to shorten a
 text-spanner on both sides, for example a pedal bracket.  Positive
 values shorten the text-spanner, while negative values lengthen it.")
-     (shortest-duration-space ,ly:dimension? "Start with this much
-space for the shortest duration.  This is expressed in
-@code{spacing-increment} as unit.  See also
+     (shortest-duration-space ,number? "Start with this multiple of
+@code{spacing-increment} space for the shortest duration.  See also
 @rinternals{spacing-spanner-interface}.")
      (shortest-playing-duration ,ly:moment? "The duration of the
 shortest note playing here.")
@@ -849,8 +848,8 @@ instead of to the beginning of the non-musical column.  If there is a
 clef change followed by a bar line, for example, this means that we
 will try to space the non-musical column as though the clef is not
 there.")
-     (spacing-increment ,number? "Add this much space for a doubled
-duration.  Typically, the width of a note head.  See also
+     (spacing-increment ,ly:dimension? "The unit of length for
+note-spacing.  Typically, the width of a note head.  See also
 @rinternals{spacing-spanner-interface}.")
      (spacing-pair ,pair? "A pair of alignment symbols which set an object's
 spacing relative to its left and right @code{BreakAlignment}s.
@@ -986,8 +985,8 @@ possible.")
 ;;; u
 ;;;
      (uniform-stretching ,boolean? "If set, items stretch
-proportionally to their durations.  This looks better in complex
-polyphonic patterns.")
+proportionally to their natural separation based on durations.
+This looks better in complex polyphonic patterns.")
      (used ,boolean? "If set, this spacing column is kept in the
 spacing problem.")
      (usable-duration-logs ,list? "List of @code{duration-log}s that