@end ignore
+@item
+The ends of hairpins may now be fine-tuned using the @code{shorten-pair}
+grob property, which previously only affected text-spanners like
+@code{TupletBracket} and @code{OttavaBracket}. Positive values offset
+to the right, negative to the left.
+@lilypond[quote,verbatim]
+{ \once \override Hairpin.shorten-pair = #'(2 . 2)
+ c'1~\<
+ c'2~ c'\!
+ \once \override Hairpin.shorten-pair = #'(-2 . -2)
+ c'1~\<
+ c'2~ c'\! }
+@end lilypond
+
@item
In fret-diagrams the distance between frets and the distance between strings is
now independently adjustable. Available are @code{fret-distance} and
@lilypondfile[verbatim,quote,texidoc,doctitle]
{setting-the-minimum-length-of-hairpins.ly}
+@lilypondfile[verbatim,quote,texidoc,doctitle]
+{moving-the-ends-of-hairpins.ly}
+
@cindex al niente
@cindex niente, al
--- /dev/null
+\version "2.19.55"
+
+\header {
+ lsrtags = "expressive-marks"
+
+ texidoc = "
+The ends of hairpins may be offset by setting the @code{shorten-pair}
+property of the @code{Hairpin} object. Positive values move endpoints
+to the right, negative to the left. Unlike the @code{minimum-length}
+property, this property only affects the appearance of the hairpin; it
+does not adjust horizontal spacing (including the position of bounding
+dynamics). This method is thus suitable for fine-tuning a hairpin
+within its allotted space.
+
+"
+ doctitle = "Moving the ends of hairpins"
+}
+
+{
+ c'1~\<
+ c'2~ c'\!
+ \once \override Hairpin.shorten-pair = #'(2 . 2)
+ c'1~\<
+ c'2~ c'\!
+ \once \override Hairpin.shorten-pair = #'(-2 . -2)
+ c'1~\<
+ c'2~ c'\!
+ c'1~\p-\tweak shorten-pair #'(2 . 0)\<
+ c'2~ c'\ffff
+}
--- /dev/null
+\version "2.19.55"
+
+\header {
+ texidoc = "The @code{shorten-pair} property works with circled-tip
+hairpins. When two hairpins share a circle, the adjoining ends are
+not moved.
+"
+}
+
+{
+ \override Hairpin.circled-tip = ##t
+ \once \override Hairpin.shorten-pair = #'(-2 . -4)
+ c'1~\<
+ c'2~ c'\!
+ \once \override Hairpin.shorten-pair = #'(0 . -4)
+ c'1~\>
+ c'2~ c'\!
+ \break
+ \override Hairpin.shorten-pair = #'(4 . -8)
+ c'2~\> c'2~\<
+ c'2~ c'2\!
+}
--- /dev/null
+\version "2.19.55"
+
+\header {
+ texidoc = "The ends of hairpins may be offset with the
+@code{shorten-pair} property. Positive values offset ends to the right,
+negative values to the left.
+"
+}
+
+hairpin = {
+ c'1~\<
+ c'2~ c'\!
+}
+
+{
+ \hairpin
+ \once \override Hairpin.shorten-pair = #'(2 . 2)
+ \hairpin
+ \once \override Hairpin.shorten-pair = #'(-2 . -2)
+ \hairpin
+ \break
+ \alterBroken shorten-pair #'((10 . 0) (-2 . -20)) Hairpin
+ c'1~\<
+ \break
+ c'2~ c'\!
+}
if (circled_tip)
thick = robust_scm2double (me->get_property ("thickness"), 1.0)
* Staff_symbol_referencer::line_thickness (me);
+ Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
+ Interval (0, 0));
for (LEFT_and_RIGHT (d))
{
Handle back-to-back hairpins with a circle in the middle
*/
if (circled_tip && (grow_dir != d))
- x_points[d] = e.center () + d * (rad - thick / 2.0);
+ {
+ x_points[d] = e.center () + d * (rad - thick / 2.0);
+ shorten[d] = 0.0;
+ }
/*
If we're hung on a paper column, that means we're not
adjacent to a text-dynamic, and we may move closer. We
}
}
}
+
+ x_points[d] -= shorten[d] * d;
}
Real width = x_points[RIGHT] - x_points[LEFT];
"bound-padding "
"grow-direction "
"height "
+ "shorten-pair "
);
If the list contains a single element it applies for all clefs.
A single number in place of a pair sets accidentals within the octave
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.")
+ (shorten-pair ,number-pair? "The lengths to shorten on both sides
+a hairpin or text-spanner such as a pedal bracket. Positive values
+shorten the hairpin or text-spanner, while negative values lengthen
+it.")
(shortest-duration-space ,number? "Start with this multiple of
@code{spacing-increment} space for the shortest duration. See also
@rinternals{spacing-spanner-interface}.")