[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: note-spacing: stretch somewhat uniformly; issue 3304 (issue 36830045
From: |
k-ohara5a5a |
Subject: |
Re: note-spacing: stretch somewhat uniformly; issue 3304 (issue 36830045) |
Date: |
Mon, 16 Dec 2013 08:24:35 +0000 |
Reviewers: MikeSol,
Message:
On 2013/12/16 07:42:52, MikeSol wrote:
If you understand this stuff, could you put a comment in
lily/include/spring.hh
as to what inverse_compress_strength and inverse_stretch_strength are?
They are the stretchability and compressibility of the space.
Next time I have linux up I'll put a comment, or just change the names.
You should try the patch on your music. You probably have a lot of
staggered timing in the style of 3-against-2 hemiola, which should be
aligned more evenly with the patch.
The greater compressibility between note-columns makes it easier for me
to make readable piano music with fewer page-turns, so I like it.
Before the patch, there is extra stiffness between a note-column and a
following column with accidentals or other protrusions, and I wonder if
this stiffness is needed for readability.
Description:
note-spacing: stretch somewhat uniformly; issue 3304
From the ideal note-spacing, including optical corrections and the
tweaked allowances for flags and accidentals, we can set spring
stiffness so that the music stretches/compresses uniformly, until
objects come within padding of each other. This lets lines compress
somewhat more easily.
Please review this at https://codereview.appspot.com/36830045/
Affected files (+11, -17 lines):
M input/regression/glissando.ly
M input/regression/spacing-multi-tuplet.ly
M input/regression/spanner-alignment.ly
M lily/note-spacing.cc
Index: input/regression/glissando.ly
diff --git a/input/regression/glissando.ly b/input/regression/glissando.ly
index
bdb5124483b4100baafbde788795ec5b1498c139..04a9a8677ab64090c95bebb1c93147668d976ee2
100644
--- a/input/regression/glissando.ly
+++ b/input/regression/glissando.ly
@@ -25,7 +25,7 @@ The engraver does no time-keeping, so it involves some
trickery to get
%% consecutive
c \glissando d, \glissando e'
<< { e8 \glissando g8 } \\
- { \repeat unfold 4 d16 } >>
+ { \repeat unfold 4 d16 } >> \break
\override Glissando.style = #'zigzag
c4 \glissando c,, \glissando c' \glissando d
}
Index: input/regression/spacing-multi-tuplet.ly
diff --git a/input/regression/spacing-multi-tuplet.ly
b/input/regression/spacing-multi-tuplet.ly
index
bab9232a8d1b7113ec43676e601aaa1352c96622..4c84dad0d8b90947c91f6e1cc73b03704c73d545
100644
--- a/input/regression/spacing-multi-tuplet.ly
+++ b/input/regression/spacing-multi-tuplet.ly
@@ -2,28 +2,18 @@
\header{
- texidoc = "Concurrent tuplets should be equidistant on all staves.
-Such equidistant spacing is at odds with elegant engraver spacing;
-hence it must be switched on explicitly with the
address@hidden property of @code{SpacingSpanner}."
+ texidoc = "Concurrent tuplets should be equidistant on all staves."
}
-\layout{
- \context{
- \Score
- \override SpacingSpanner.uniform-stretching = ##t
- }
-}
+\paper {ragged-right = ##f }
\relative c' {
\context StaffGroup <<
\new Staff \context Voice {
- \tuplet 10/2 { c8[ c c c c c c c c c] }
- \tuplet 10/2 { c[ c c c c c c c c c] }
+ \tuplet 10/8 { c8[ c c c c c c c c c] }
}
\new Staff \context Voice {
- \tuplet 11/2 { c8[ c c c c c c c c c c] }
- \tuplet 11/2 { c[ c c c c c c c c c c] }
+ \tuplet 8/8 { c8[ c c c c c c c] }
}
>>
}
Index: input/regression/spanner-alignment.ly
diff --git a/input/regression/spanner-alignment.ly
b/input/regression/spanner-alignment.ly
index
02e04ece7dddd98bf094e30c71f5efa10dc79e31..af5523fa3594470f648b8e6b0e22672f92a07bad
100644
--- a/input/regression/spanner-alignment.ly
+++ b/input/regression/spanner-alignment.ly
@@ -17,6 +17,7 @@ ignoring things like pedal marks.
\new Dynamics = "dynamics" {
\repeat unfold 2 {
s1\cresc s1\f s1\dim s1\p
+ \break
}
}
\new Staff = "down" {
Index: lily/note-spacing.cc
diff --git a/lily/note-spacing.cc b/lily/note-spacing.cc
index
1d0d21fbbb502e5ae977c0e90781cfe63233aca2..597c719c30879ed0ea3bbd334d5d0ea7b3a93f1d
100644
--- a/lily/note-spacing.cc
+++ b/lily/note-spacing.cc
@@ -110,8 +110,11 @@ Note_spacing::get_spacing (Grob *me, Item *right_col,
/* TODO: grace notes look bad when things are stretched. Should we
increase
their stretch strength? */
Spring ret (max (0.0, ideal), min_dist);
- ret.set_inverse_compress_strength (max (0.0, ideal - min_desired_space));
- ret.set_inverse_stretch_strength (max (0.1, base_space - increment));
+ /* Strech and compress simlarly to the default springs
+ added by Spacing_Spanner::musical_column_spacing()
+ so that polyphonic music compresses/stretches uniformly. */
+ ret.set_inverse_compress_strength (base_space);
+ ret.set_inverse_stretch_strength (base_space);
return ret;
}
- Re: note-spacing: stretch somewhat uniformly; issue 3304 (issue 36830045),
k-ohara5a5a <=