[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Rotated hairpin crossing staff
From: |
Rachel Green |
Subject: |
Re: Rotated hairpin crossing staff |
Date: |
Mon, 10 Jan 2022 20:32:36 +0000 |
Hi Jean,
Thank you so much! Another problem was that I was trying commands to move
“Hairpin" rather than “Dynamic Line Spanner.” All set, thanks again!
Rachel
> On Jan 9, 2022, at 3:56 AM, Jean Abou Samra <jean@abou-samra.fr> wrote:
>
> 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
>