Jump to content

Moving the ends of hairpins: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The ends of hairpins may be offset by setting the <code>shorten-pair</code> property of the <code>Hairpin</code> object. Positive values move endpoints to the right, negative to the left. Unlike the <code>minimum-length</code> 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.
The ends of hairpins may be offset by setting the <code>shorten-pair</code> property of the <code>Hairpin</code> object. Positive values move endpoints to the right, negative to the left. Unlike the <code>minimum-length</code> 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.


<lilypond version="2.24.0">
<lilypond version="2.24">
{
{
   c'1~\<
   c'1~\<
Line 18: Line 18:
[[Category:Expressive marks]]
[[Category:Expressive marks]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Snippet]]

Latest revision as of 23:37, 21 November 2025

The ends of hairpins may be offset by setting the shorten-pair property of the Hairpin object. Positive values move endpoints to the right, negative to the left. Unlike the 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.

\version "2.24"

{
  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
}