Hi, how can I shorten the first part of a broken hairpin to avoid the printing under a new KeySignature (or KeyCancellation, TimeSignature etc) at a linebreak?
I tried (with no success): \version "2.14.2" \pointAndClickOff \paper { ragged-right = ##f } lengthHairpinBoth = #(define-music-function (parser location min-length MIN-LENGTH)(number? number?) #{ #(define (hairpinBoth-callBack grob) (let* ( ; have we been split? (orig (ly:grob-original grob)) ; if yes, get the split pieces (our siblings) (siblings (if (ly:grob? orig) (ly:spanner-broken-into orig) '() ))) (cond ((and (>= (length siblings) 2)(eq? (list-ref siblings 0) grob)) (and(ly:grob-set-property! grob 'springs-and-rods ly:spanner::set-spacing-rods) (ly:grob-set-property! grob 'minimum-length $min-length)) ) ((and (>= (length siblings) 2) (eq? (car (last-pair siblings)) grob)) (and(ly:grob-set-property! grob 'springs-and-rods ly:spanner::set-spacing-rods) (ly:grob-set-property! grob 'minimum-length $MIN-LENGTH)) )) (ly:hairpin::print grob))) %\override Hairpin #'springs-and-rods = #ly:spanner::set-spacing-rods \override Hairpin #'stencil = #hairpinBoth-callBack #}) \relative c' { \lengthHairpinBoth #5 #110 \override Hairpin #'to-barline = ##t c'1\< \break \key cis\major d2 e\! } Thanks! Harm -- View this message in context: http://old.nabble.com/shorten-a-broken-hairpin-at-a-linebreak--tp32343028p32343028.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user