Re: Constant Hairpin on line break
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 : > > 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 : karim.had...@ircam.fr webpage : http://karim.haddad.free.fr ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Constant Hairpin on line break
2018-03-21 3:28 GMT+01:00 Karim Haddad : > 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 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Constant Hairpin on line break
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 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user