lilypond-user
[Top][All Lists]
Advanced

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

Re: Constant Hairpin on line break


From: Karim Haddad
Subject: Re: Constant Hairpin on line break
Date: Wed, 21 Mar 2018 12:34:40 +0100
User-agent: NeoMutt/20170113 (1.7.2)

Thanx a lot,

This works marvelously well !
Wondering, if this should not be by default?

Best
K

On Wed, Mar 21, 2018 at 11:16:13AM +0100, Thomas Morley wrote:
> 2018-03-21 3:28 GMT+01:00 Karim Haddad <address@hidden>:
> > Hi,
> >
> > Does somebody know how to avoid having the vertical hook on a line break 
> > and just to have it on the end of a constant hairpin ?
> > Here is a minimal example code :
> >
> > \relative c'' {
> >  \override Hairpin.stencil = #constante-hairpin
> >   c1 \p \< |
> >   \break
> >   c1 | %%here the hook should not appear if possible.
> >   c1 \! |
> >   }
> >
> > Best regards
> > --
> > Karim Haddad
> 
> 
> 
> How about:
> 
> \version "2.19.65"
> 
> #(define breaking-constante-hairpin
>   (lambda (grob)
>     (let* ((orig (ly:grob-original grob))
>            (siblings (if (ly:grob? orig)
>                          (ly:spanner-broken-into orig) '()))
>            (grow-dir (ly:grob-property grob 'grow-direction))
>                          )
>       (if (and (pair? siblings)
>                (or (and (eqv? grow-dir RIGHT) (equal? grob (last siblings)))
>                    (and (eqv? grow-dir LEFT) (equal? grob (car siblings)))))
>           constante-hairpin
>           (elbowed-hairpin '((0 . 0) (1.0 . 0.0)) #f)))))
> 
> 
> \relative c'' {
>  \override Hairpin.stencil = #breaking-constante-hairpin
>   c1 \p \< |
>   \break
>   c1 | %%here the hook should not appear if possible.
>   c1 \! |
>   }
> 
> Cheers,
>   Harm

-- 
Karim Haddad

email   : address@hidden
webpage : http://karim.haddad.free.fr



reply via email to

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