lilypond-user
[Top][All Lists]
Advanced

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

Re: How to prevent slur from breaking?


From: Thomas Morley
Subject: Re: How to prevent slur from breaking?
Date: Sat, 3 May 2014 16:50:13 +0200

Hi Karol,

2014-05-03 14:15 GMT+02:00 Karol Majewski <address@hidden>:
> Hi.
>
> When it comes to create slur over repeat (volta), I use this trick:

hmm, your example shows no repeat ...

>
> http://lilypond.org/doc/v2.19/Documentation/notation/modifying-shapes#modifying-ties-and-slurs
>    (see: Specifying control points explicitly)
>
> But when slur is created just before line break, it appears also in the next 
> line, which of course is not what I want.
>
> {
> c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1 -\tweak control-points 
> #'((-46 . 7) (-31 . 8) (-9 . 9) (0.75 . 7)) ( <> ) c'1 c'1 c'1 c'1 c'1 c'1 
> c'1 c'1 c'1 c'1 c'1 c'1 c'1 c'1
> }
>
> How to prevent this?
>
> --Karol

It's not clear to me what you want.
Do you want the tweak applied only to the Slur form first line?
Or do you want no Slur in second line at all?

In first case use \shape as a tweak.
In second you may want to use 'omitLastBrokenSlur' as defined below.

\version "2.19.4"

omitLastBrokenSlur =
\override Slur.after-line-breaking =
 #(lambda (grob)
   (let* ((orig (ly:grob-original grob))
          (siblings (ly:spanner-broken-into orig)))
   (if (and (not (null? siblings))
            (equal? grob (car (last-pair siblings))))
       (ly:grob-set-property! grob 'stencil #f))))

{
%\omitLastBrokenSlur
%% some crazy values :)
c'1 -\shape #'((0 . 7) (0 . 10) (0 . 1) (0 . 10))
^( %% set directions with ^ or _
\break
<> ) c'1
}

HTH,
  Harm



reply via email to

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