lilypond-user
[Top][All Lists]
Advanced

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

Re: shorten a broken hairpin at a linebreak?


From: harm6
Subject: Re: shorten a broken hairpin at a linebreak?
Date: Tue, 30 Aug 2011 07:28:50 -0700 (PDT)


Mike Solomon-2 wrote:
> 
> How about:
> 
> \version "2.14.0"
> 
> #(define (has-interface? grob interface)
>   (member interface
>           (assoc-get 'interfaces
>                      (ly:grob-property grob 'meta))))
> 
> #(define (find-system grob)
>   (if (has-interface? grob 'system-interface)
>       grob
>       (find-system (ly:grob-parent grob X))))
> 
> #(define (first-musical-column grobl)
>   (if (not (eqv? #t (ly:grob-property (car grobl) 'non-musical)))
>       (car grobl)
>       (first-musical-column (cdr grobl))))
> 
> #(define (change-bound grob)
>   (let* ((system (find-system grob))
>          (cols (ly:grob-array->list (ly:grob-object system 'columns)))
>          (musical-column (first-musical-column (reverse cols))))
>     (ly:spanner-set-bound! grob RIGHT musical-column)))
>          
> #(define (my-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)
>                         '())))
> 
>      (if (and (>= (length siblings) 2)
>               (not (eq? (car (reverse siblings)) grob)))
>        (change-bound grob))))
> {
>  \override Hairpin #'after-line-breaking = #my-callback
>  a\< \repeat unfold 31 { a } \break \key fis \major \repeat unfold 74 { a
> } a\p
> }
> 
> Cheers,
> MS
> 

Hi Mike,

thanks a lot for your work. Your approach to the problem is completely
beyond my knowledge. I'm trying my definitions with a plethora of manuels
around me. But I can copy, paste and test.

So I noticed some problems:

Your own testing works fine, but it doesn't adding a line in the beginning.

{
        a1 \break
        \override Hairpin #'after-line-breaking = #my-callback
        a4\< \repeat unfold 31 { a } \break \key fis \major \repeat unfold
74 { a } a\p
}

In my eyes the hairpin is to short, when using whole notes.

\relative c' {
                %c1 d e \break
        \override Hairpin #'color = #red
        \override Hairpin #'after-line-breaking = #my-callback
        \key ces\major
        c'1\<  c 
        \break
        \key cis\major
                d2  e e1
        \break
        \key es\major
        \time 2/2
                f2 g
        \break
        \key e\major
        \time 4/4
                a b\!
}

I will try to play around with your settings, hoping to stumble across a
solution.

Best,
  Harm
-- 
View this message in context: 
http://old.nabble.com/shorten-a-broken-hairpin-at-a-linebreak--tp32343028p32364846.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.




reply via email to

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