Nick
When a spanner such as a tie crosses a line break, the grob
is cloned into two grobs, one to be placed at the end of
the first line and one to be placed at the beginning of the
second. Overrides to properties made in the usual way are
made to both of these cloned grobs, although the precise
effect they have depends on the code used to generate the
grobs, and in general changes to positioning properties
will not be useful. For details of this see Extending
LilyPond, section 2.6
http://lilypond.org/doc/v2.13/Documentation/extending/difficult-tweaks
We can modify the example there to suit your particular
problem, using 'extra-offset rather than messing with the
Bezier curve parameters, as follows:
#(set-global-staff-size 24)
#(define (tie2-extra-offset grob)
(let* (
(orig (ly:grob-original grob))
(siblings (if (ly:grob? orig)
(ly:spanner-broken-into orig)
'())))
(if (and (>= (length siblings) 2)
(eq? (car (last-pair siblings)) grob))
(ly:grob-set-property! grob 'extra-offset '(0 . 1)))))
\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8 b c b a g b2\rest <e gis,>4 |
} \\ {
fis,,,8 e' dis e fis b, c4. g8 a4 |
dis2 r4 s2. |
b2 r4 r2. |
} \\ {
fis4 s2 s2. |
s8 e'' fis e g fis ~ fis4. gis8 a4 ~ |
a4 c,2\rest s2. |
} \\ {
s1. |
c8\rest b a g a c dis4. e,8
\override Tie #'after-line-breaking = #tie2-extra-offset
fis4 ~ |
fis4 s2 fis'8 e dis cis dis b |
} >>
}
----- Original Message -----
From: "Nick Payne" <nick.pa...@internode.on.net>
To: <lilypond-user@gnu.org>
Sent: Wednesday, December 15, 2010 1:59 AM
Subject: Re: Specifying bezier curve for tie across line break
collides withclef symbol
On 14/12/10 15:24, Nick Payne wrote:
This piece in several voices (Bach's WTC book 1 prelude 4
transcribed
for guitar) has a tie between the F-sharps at the end of bar 36
and at
the beginning of bar 37, but because this tie is across a line
break,
Lilypond repeats the sharp symbol (which otherwise wouldn't
happen)
and displaces the second part of the tie downwards on the
following
line so that it appears to be a tie to the half note B
(nobezier.png).
If I attempt to force the tie to the correct position by
specifying
its bezier points, then the start and end point are correct, but
a)
the tie does not continue almost to the bar line as it otherwise
would, and b) the continuation of the tie on the 2nd line passes
through the clef symbol (bezier.png). I can fix it by forcing a
line
break before bar 36, so that the tie is not broken across two
staves,
but this then means that the preceding bar has a complete line to
itself and looks very sparse and rather out of place. Is there
any
other solution that anyone can suggest.
Nick
Here's a small example that demonstrates the problem. The lower of
the
two ties between bars 2 and 3 appears to go to the wrong note, and
if
you uncomment the override for the tie control points to get it
correctly positioned vertically, the continuation of the tie in
bar 3
starts at the left of the clef symbol.
\version "2.13.43"
#(set-global-staff-size 24)
\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8 b c b a g b2\rest <e gis,>4 |
} \\ {
fis,,,8 e' dis e fis b, c4. g8 a4 |
dis2 r4 s2. |
b2 r4 r2. |
} \\ {
fis4 s2 s2. |
s8 e'' fis e g fis ~ fis4. gis8 a4 ~ |
a4 c,2\rest s2. |
} \\ {
s1. |
c8\rest b a g a c dis4. e,8
% \once \override Tie #'control-points = #'((1 . -2) (2.5
. -2.5)
(3.5 . -2.5) (5 . -2))
fis4 ~ |
fis4 s2 fis'8 e dis cis dis b |
} >>
}
--------------------------------------------------------------------------------
On 14/12/10 15:24, Nick Payne wrote:
This piece in several voices (Bach's WTC book 1 prelude 4
transcribed for guitar) has a tie between the F-sharps at the end
of bar 36 and at the beginning of bar 37, but because this tie is
across a line break, Lilypond repeats the sharp symbol (which
otherwise wouldn't happen) and displaces the second part of the
tie downwards on the following line so that it appears to be a tie
to the half note B (nobezier.png).
If I attempt to force the tie to the correct position by
specifying its bezier points, then the start and end point are
correct, but a) the tie does not continue almost to the bar line
as it otherwise would, and b) the continuation of the tie on the
2nd line passes through the clef symbol (bezier.png). I can fix it
by forcing a line break before bar 36, so that the tie is not
broken across two staves, but this then means that the preceding
bar has a complete line to itself and looks very sparse and rather
out of place. Is there any other solution that anyone can suggest.
Nick
Here's a small example that demonstrates the problem. The lower of
the two ties between bars 2 and 3 appears to go to the wrong note,
and if you uncomment the override for the tie control points to
get it correctly positioned vertically, the continuation of the
tie in bar 3 starts at the left of the clef symbol.
\version "2.13.43"
#(set-global-staff-size 24)
\relative c'' {
\time 6/4
<< {
a'8 g fis e dis e \acciaccatura e d4. c'8 b4 |
c4 r2 s2. |
dis8 b c b a g b2\rest <e gis,>4 |
} \\ {
fis,,,8 e' dis e fis b, c4. g8 a4 |
dis2 r4 s2. |
b2 r4 r2. |
} \\ {
fis4 s2 s2. |
s8 e'' fis e g fis ~ fis4. gis8 a4 ~ |
a4 c,2\rest s2. |
} \\ {
s1. |
c8\rest b a g a c dis4. e,8
% \once \override Tie #'control-points = #'((1 . -2) (2.5
. -2.5) (3.5 . -2.5) (5 . -2))
fis4 ~ |
fis4 s2 fis'8 e dis cis dis b |
} >>
}
--------------------------------------------------------------------------------
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user