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.
* 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
--- /dev/null
+
+\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
+ }
+>>
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;
};
}
/****************************************************************/
-
-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);
-}
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;
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);
(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.")