lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rotated hairpin crossing staff


From: Jean Abou Samra
Subject: Re: Rotated hairpin crossing staff
Date: Sun, 9 Jan 2022 11:56:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Le 09/01/2022 à 03:03, Rachel Green a écrit :
Hi,

How would I allow the hairpin to cross the staff? I would like the hairpin to be parallel with the notes as in the picture. I figured out how to rotate it, but LilyPond does not allow the hairpin to intersect with the staff.
I tried \override Hairpin.padding = #0, but that wasn’t right.

An example snippet is below.


The problem here is that the rotation property just rotates
the object without further adjustments. The hairpin could cross
the staff if it was long enough, but because its length is
computed as if it were horizontal, it misses some length.
You can correct this using a negative value for shorten-pair
(shortening by a negative amount means lengthening). In the
snippet below, I've also adjusted the beam to make
room for the hairpin, and moved the hairpin vertically.

\version "2.20.0"

\language "english"


VarOneTreble = \relative c'
{
  s2.
}

VarOneBass = \relative c
{
  \clef bass
  \time 3/4
  \once \override DynamicLineSpanner.Y-offset = -8
  \once \override Hairpin.shorten-pair = #'(0 . -2.5)
  \once \override Hairpin.rotation = #'(23 -1 1)
  \tuplet 6/4 4 { g,16-\< d' g b d g }
  \change Staff = "treble"
  \once \override Beam.positions = #'(-8 . 0)
  b32 d g b d g b d g8\! r
}


\score {
  \new GrandStaff
  <<
    \new Staff = "treble" { \VarOneTreble }
    \new Staff = "bass" { \VarOneBass }
  >>
}

There is a snippet here demonstrating shorten-pair:

https://lilypond.org/doc/v2.22/Documentation/notation/expressive-marks-attached-to-notes#dynamics

Best,
Jean




reply via email to

[Prev in Thread] Current Thread [Next in Thread]