[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tweaking Hairpin shape
From: |
Thomas Morley |
Subject: |
Re: Tweaking Hairpin shape |
Date: |
Sun, 4 Feb 2018 20:56:22 +0100 |
2018-02-04 20:30 GMT+01:00 Stefano Troncaro <address@hidden>:
> Thank you! This is a workable starting point. However, it raised a few
> questions.
>
> 1) I noticed that rotating the grob doesn't work well with automatic
> collision detection, since the grob skylines are still where they would be
> for the unrotated grob. See this example code and the attached images:
>>
>> \version "2.19.80"
>> \language "english"
>>
>> tweaks = {
>> \once \override Hairpin.rotation = #'(9 0 0)
>> %\once \override Hairpin.extra-offset = #'(0 . -1)
>> }
>>
>> \score {
>> \new Staff \relative c' { \time 2/2 \tweaks d8[^\<(^"some really long
>> text here!" e f g a b c d]\!) |
>> <e c g g,>4\arpeggio }
>> \layout {
>> \context {
>> \Score
>> \override Hairpin.height = #0.5
>> }
>> }
>> }
>
> This makes me hesitate for the same reason that using extra-offset does: I'd
> want to tweak the shape of the Hairpins and have Lilypond automatically work
> out the correct spacing between different grobs and staves. So, how can I
> make it so that the skylines are also updated when I rotate the grob? Or, if
> internally the grob is first placed and then rotated, how can I make it so
> that the rotation occurs before Lilypond calculates the positioning and
> spacing of grobs?
Don't use extra-offset to place things, unless you _want_ them overlap
or as very, very last resort.
Use 'shorten-pair to affect length of the Hairpin, working with
Hairpins for newer devel-versions, Thanks David Nalesnik, iirc.
'rotation comes too late, use a stencil-override with ly:stencil-rotate instead.
See below.
\version "2.19.80"
tweaks = {
\once \override Hairpin.shorten-pair = #'(-2 . -2)
\once \override Hairpin.stencil =
#(lambda (grob)
(ly:stencil-rotate (ly:hairpin::print grob) 9 0 0))
}
\score {
\new Staff
\relative c' {
\time 2/2
\tweaks
d8[^\<(^"some really long text here!" e f g a b c d]\!) |
<e c g g,>4\arpeggio
}
\layout {
\context {
\Score
\override Hairpin.height = #0.5
}
}
}
Cheers,
Harm
- Tweaking Hairpin shape, Stefano Troncaro, 2018/02/04
- Re: Tweaking Hairpin shape, Ben, 2018/02/04
- Re: Tweaking Hairpin shape, Stefano Troncaro, 2018/02/04
- Re: Tweaking Hairpin shape,
Thomas Morley <=
- Re: Tweaking Hairpin shape, Kieren MacMillan, 2018/02/04
- Re: Tweaking Hairpin shape, Stefano Troncaro, 2018/02/04
- Re: Tweaking Hairpin shape, Thomas Morley, 2018/02/04
- Re: Tweaking Hairpin shape, Stefano Troncaro, 2018/02/04
- Re: Tweaking Hairpin shape, David Nalesnik, 2018/02/04
- Re: Tweaking Hairpin shape, Thomas Morley, 2018/02/04
- Re: Tweaking Hairpin shape, David Nalesnik, 2018/02/04
- Re: Tweaking Hairpin shape, Stefano Troncaro, 2018/02/06
- Re: Tweaking Hairpin shape, Werner LEMBERG, 2018/02/06
- Re: Tweaking Hairpin shape, Andrew Bernard, 2018/02/06