Re: Broken Hairpin

2018-05-18 Thread foxfanfare
Thomas Morley-2 wrote
> No idea why alterBroken's not working, too late here to investigate.
> 
> Anyway, below may give you a starting point for a different coding:
> 
>   \override Hairpin.after-line-breaking =
>   #(lambda (grob)
>  (let* ((orig (ly:grob-original grob))
> (siblings (if (ly:grob? orig)
>   (ly:spanner-broken-into orig) '(
>(if (and (pair? siblings) (equal? grob (car siblings)))
>(ly:grob-set-property! grob 'thickness 10
> 
> Cheers,
>   Harm

Thank you Harm for this solution. This morning I tried alterBroken with
other propreties and it worked in certain cases.

For instance, the Y-offset property works well (which is good because it is
what I needed). But the exemple of thickness as written in the documentation
doesn't seem to work for hairpins, even when not written in a dynamic
context.

\new PianoStaff
<<
  \relative c' {
c4 d e f
\break
g_"working" f e d
\break 
c4 d -\alterBroken thickness #'(5 1) \< e f
\break
g^"not working" f\! e d
\break 
  }
  \new Dynamics {
\override PianoStaff.Hairpin.to-barline = ##f
\override PianoStaff.Hairpin.after-line-breaking = ##t
s1 -\alterBroken Y-offset #'(0 -7.5) \<
s2\! s

  }
  \relative c' {
c4 d e f
g f e d
c4 d e f
g f e d
  }
>> 



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken Hairpin

2018-05-17 Thread Thomas Morley
2018-05-17 15:47 GMT+02:00 foxfanfare :
> Kieren MacMillan wrote
>> Hi foxfanfare,
>>
>>> Is it possible to adjust the padding of a broken hairpin after a line
>>> break?
>>
>> http://lilypond.org/doc/v2.18/Documentation/notation/modifying-broken-spanners
>>
>> Hope that helps!
>> Kieren.
>> 
>>
>> Kieren MacMillan, composer
>> ‣ website: www.kierenmacmillan.info
>> ‣ email:
>
>> info@
>
>>
>>
>> ___
>> lilypond-user mailing list
>
>> lilypond-user@
>
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
> Thank you Kieren.
> It is a good lead, but unfortunately I can't get it to work in a dynamic
> context:
>
> \new PianoStaff
> <<
>   \relative c' {
> c4 d e -\alterBroken thickness #'(10 1) ^( f
> \break
> g f) e d
>   }
>   \new Dynamics {
> \override PianoStaff.Hairpin.to-barline = ##f
> \override PianoStaff.Hairpin.after-line-breaking = ##t
> s1 -\alterBroken thickness #'(10 1) \<
> s2\! s
>   }
>   \relative c' {
> c4 d e f
> g f e''' d
>   }
>>>
>
> Am I missing something?


No idea why alterBroken's not working, too late here to investigate.

Anyway, below may give you a starting point for a different coding:

  \override Hairpin.after-line-breaking =
  #(lambda (grob)
 (let* ((orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
  (ly:spanner-broken-into orig) '(
   (if (and (pair? siblings) (equal? grob (car siblings)))
   (ly:grob-set-property! grob 'thickness 10

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken Hairpin

2018-05-17 Thread foxfanfare
Kieren MacMillan wrote
> Hi foxfanfare,
> 
>> Is it possible to adjust the padding of a broken hairpin after a line
>> break?
> 
> http://lilypond.org/doc/v2.18/Documentation/notation/modifying-broken-spanners
> 
> Hope that helps!
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: 

> info@

> 
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

Thank you Kieren.
It is a good lead, but unfortunately I can't get it to work in a dynamic
context:

\new PianoStaff
<<
  \relative c' {
c4 d e -\alterBroken thickness #'(10 1) ^( f
\break
g f) e d
  }
  \new Dynamics {
\override PianoStaff.Hairpin.to-barline = ##f
\override PianoStaff.Hairpin.after-line-breaking = ##t
s1 -\alterBroken thickness #'(10 1) \<
s2\! s
  }
  \relative c' {
c4 d e f
g f e''' d
  }
>> 

Am I missing something?



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken Hairpin

2018-05-17 Thread Kieren MacMillan
Hi foxfanfare,

> Is it possible to adjust the padding of a broken hairpin after a line break?

http://lilypond.org/doc/v2.18/Documentation/notation/modifying-broken-spanners

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken Hairpin height not affected by \alterBroken

2014-07-02 Thread Pierre Perol-Schneider
2014-07-02 4:37 GMT+02:00 Javier Ruiz-Alma jav...@ruiz-alma.com:

 The 2nd Hairpin.height value in \alterBroken seems to get ignored.  Is
 this a limitation, or my bad syntax?


None of them. I thing it could be considered as a bug.
Cheers,
Pierre
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken Hairpin height not affected by \alterBroken

2014-07-02 Thread Thomas Morley
2014-07-02 4:37 GMT+02:00 Javier Ruiz-Alma jav...@ruiz-alma.com:
 The 2nd Hairpin.height value in \alterBroken seems to get ignored.  Is this
 a limitation, or my bad syntax?
 I'm dealing with a broken multi-bar hairpin.  Not being able to adjust
 heights per segment results in either too-narrow first or too-wide second
 hairpin segment.
 \version 2.18.2
 \paper { ragged-right = ##t indent = 0.0 }
 \relative c' {
 \alterBroken height #'( 1.5 0.3 ) Hairpin
 c\ c c c c c c c c c c c \break
 c c c c c c c c\!
 }

Hi Javier,

IMHO the untweaked output of your code is _exactly_ what I want to see
for a broken Hairpin.

Nevertheless, the reason alterBroken does not work here, seems to be
that during an override for Hairpin.height no broken Spanner is
recognized. See the output of this test-code:

\version 2.18.2

\paper { ragged-right = ##t indent = 0.0 }

%% tests whether broken Hairpins are recognized during an 'height-override
test =
  \override Hairpin.height =
#(lambda (grob)
  (let* ((orig (ly:grob-original grob))
 (siblings (ly:spanner-broken-into orig)))
  (if (null? siblings)
  (display \n\tno broken spanner found))
  ;; default value:
  0.))

\relative c' {
  \test
  c1\ c c \break c c c\!
}

Overriding the 'after-line-breaking property will work, though.
(Too lazy to turn it into a music-function)

\version 2.18.2

%% tweaks a broken Hairpin 'height
height-tweak =
  \override Hairpin.after-line-breaking =
  #(lambda (grob)
(let* ((orig (ly:grob-original grob))
   (siblings (ly:spanner-broken-into orig)))
(if (= (length siblings) 2)
(begin
  (if (equal? grob (car siblings))
  (ly:grob-set-property! grob 'height 1.5))
  (if (equal? grob (cadr siblings))
  (ly:grob-set-property! grob 'height 0.3))

\relative c' {
  \height-tweak
  c1\ c c \break
  c c c\!
}

HTH,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Broken Hairpin height not affected by \alterBroken

2014-07-02 Thread David Nalesnik
Hi,


On Wed, Jul 2, 2014 at 3:37 AM, Thomas Morley thomasmorle...@gmail.com
wrote:



 Overriding the 'after-line-breaking property will work, though.
 (Too lazy to turn it into a music-function)


Yes, it does.  This is an unfortunate limitation of \alterBroken--the
spanner may not be broken at the time the property is set.

It isn't that difficult to rewrite \alterBroken in terms of
'after-line-breaking (and return the default setting as recommended in
Difficult Tweaks in the Extending manual); however, I'm not sure how
multiple tweaks of the same object could be achieved (outside of allowing
the function to take a list of property/value settings).

--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user