]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/define-grob-properties.scm (all-user-grob-properties): add
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 20 Jul 2006 10:42:21 +0000 (10:42 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 20 Jul 2006 10:42:21 +0000 (10:42 +0000)
strict-grace-spacing

* lily/spacing-determine-loose-columns.cc (is_loose_column):
support float_grace_columns_.

* Documentation/topdocs/NEWS.tely (Top): doc tupletFullLengthNote.

* input/regression/spacing-loose-grace.ly: new file.

* Documentation/topdocs/NEWS.tely (Top): document new feature.

ChangeLog
Documentation/topdocs/NEWS.tely
input/regression/spacing-loose-grace.ly [new file with mode: 0644]
lily/include/spacing-spanner.hh
lily/spacing-basic.cc
lily/spacing-determine-loose-columns.cc
lily/spacing-loose-columns.cc
scm/define-grob-properties.scm

index e65e10d455a49b664614d04c22577645bbffc36e..852e9973c8cdfaa877c3bf6da047118898ec023b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2006-07-20  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * lily/spacing-determine-loose-columns.cc (is_loose_column):
+       support float_grace_columns_.
+
+       * lily/spacing-options.cc (init_from_grob): new file.
+
+       * Documentation/topdocs/NEWS.tely (Top): doc tupletFullLengthNote.
+
+       * input/regression/spacing-loose-grace.ly: new file.
+
+       * Documentation/topdocs/NEWS.tely (Top): document new feature.
+
        * lily/tuplet-engraver.cc (struct Tuplet_description): read
        tupletFullLengthNote too. Choose right bound depending on value.
 
index f357cd2611337eb53c7db523c240d61687bcede7..98c083dd82c524bc3ab67ef70ccf6788b5d14beb 100644 (file)
@@ -65,6 +65,31 @@ which scares away people.
 * only show user-visible changes. 
 
 @end ignore
+
+@item
+Tuplet brackets can be made to run to prefatory matter or
+the next note
+
+@lilypond[ragged-right]
+\new RhythmicStaff {
+  \set tupletFullLength = ##t
+  \time 4/4
+  \times 4/5 {
+    c4 c1
+  }
+  \set tupletFullLengthNote = ##t
+  \time 2/4
+  \times 2/3 {
+    c4 c c 
+  }
+  \time 3/4
+  c4 
+}
+@end lilypond
+
+
+This feature was sponsored by Trevor Bača.
+
 @item
 Falls and doits can be added to notes
 
diff --git a/input/regression/spacing-loose-grace.ly b/input/regression/spacing-loose-grace.ly
new file mode 100644 (file)
index 0000000..2d3d243
--- /dev/null
@@ -0,0 +1,30 @@
+
+\header
+
+{
+
+  texidoc = "With @code{strict-grace-spacing}, grace notes don't influence
+spacing."
+
+}
+
+\version "2.9.12"
+\paper {
+  ragged-right = ##t
+}
+
+<<
+  \override Score.SpacingSpanner  #'strict-grace-spacing = ##t
+  \new Staff {
+     c'4
+     \afterGrace
+     c'4
+     { c'16[ c'16 c'16 c'16] }
+     c'4
+  }
+  \new Staff {
+     c'16[ c'16 c'16 c'16]
+     c'16[ c'16 c'16 c'16]
+     c'4
+  }
+>>
index 7f560e288029383199d41c30c91db8465a4844a0..a8d9888397116c1eef3b23a055beef1acc0fa8db 100644 (file)
@@ -19,11 +19,12 @@ struct Spacing_options
   bool packed_;
   bool stretch_uniformly_;
   bool float_nonmusical_columns_;
+  bool float_grace_columns_;
   Rational global_shortest_;
   Real increment_;
   Real shortest_duration_space_;
 
-  void init ();
+  Spacing_options();
   void init_from_grob (Grob *me);
   Real get_duration_space (Moment d, bool *) const;
 };
index 659d3f8b8e8c2a24660dafd5c424f7a50de2667f..86dd575d1ec9ea15c53d3b84473a1b748acc840a 100644 (file)
@@ -192,27 +192,3 @@ Spacing_spanner::note_spacing (Grob *me, Grob *lc, Grob *rc,
 }
 
 /****************************************************************/
-
-void
-Spacing_options::init_from_grob (Grob *me)
-{
-  increment_ = robust_scm2double (me->get_property ("spacing-increment"), 1);
-
-  packed_ = to_boolean (me->get_property ("packed-spacing"));
-  stretch_uniformly_ = to_boolean (me->get_property ("uniform-stretching"));
-  float_nonmusical_columns_
-    = to_boolean (me->get_property ("strict-note-spacing"));
-  shortest_duration_space_ = robust_scm2double (me->get_property ("shortest-duration-space"), 1);
-}
-
-void
-Spacing_options::init ()
-{
-  increment_ = 1.2;
-  packed_ = false;
-  stretch_uniformly_ = false;
-  float_nonmusical_columns_ = false;
-  shortest_duration_space_ = 2.0;
-
-  global_shortest_ = Rational (1, 8);
-}
index 34f4c97214c50bab299e42aa6f13717abef1d32d..93f70b5cecd477ebed82c058fa2d5f79c8345d12 100644 (file)
@@ -32,7 +32,8 @@
 static bool
 is_loose_column (Grob *l, Grob *c, Grob *r, Spacing_options const *options)
 {
-  if (options->float_nonmusical_columns_
+  if ((options->float_nonmusical_columns_
+       ||options->float_grace_columns_)
       && Paper_column::when_mom (c).grace_part_)
     return true;
 
index 0570741117b0a4e36b2bb4f08113fccfc5329d65..cc73fc138e01bc75d849825a82ce15b528aa4796 100644 (file)
@@ -92,12 +92,11 @@ set_loose_columns (System *which, Column_x_positions const *posns)
              else if (Note_spacing::has_interface (spacing))
                {
                  Spacing_options options;
-                 options.init ();
 
                  fixed = robust_relative_extent (col, col, X_AXIS)[RIGHT];
 
                  Moment dt = Paper_column::when_mom (right) - Paper_column::when_mom (col);
-                 bool expand;
+                 bool expand = false;
                  space = options.get_duration_space (dt, &expand);
                  Note_spacing::get_spacing (spacing, right, space, options.increment_,
                                             &space, &fixed);
index 9e7f8e39893d5e003450b8be60541824e2dce1cd..2633e6db70ad5e50dc8c5e64b61a38ef3acf69f2 100644 (file)
@@ -423,6 +423,8 @@ that overlap completely.")
      (strict-note-spacing ,boolean? "If set, unbroken columns
 with non-musical material (clefs, barlines, etc.) are not spaced
 separately, but put before musical columns.")
+     (strict-grace-spacing ,boolean? "If set, grace notes 
+are not spaced separately, but put before musical columns.")
      (string-count ,integer? "The number of strings in a fret diagram.")
      (stroke-style ,string? "set to \"grace\" to turn stroke through flag on.")