# Re: Compound Slurs

```
Am 22.09.2016 um 14:26 schrieb Urs Liska:
> Am 22.09.2016 um 13:39 schrieb Pierre Perol-Schneider:
>> Hi Urs,
>>
>> Really nice, congrats!
>> One thing: Last year I had a discussion about how to draw flat slurs
>> (see: https://notat.io/viewtopic.php?p=696#p696)
>> Do you thing you could integrate such option in your function, I mean a
>> simple - but really strait - line in between slurs ?
> That should be possible (within the limits of what Simon responded -
> OTOH Carl Sorensen already mentioned how that could be overcome).
>
>
> I see two alternative approaches, although the second won't always help
> with *that*.
>
> a)
> allow a special value 'straight as an inflection's "angle" property.
> This will then make the handle point to the next point. When the angle
> of the next point is 0 then you should have a straight line.
> The problem with this is that when the angle is determined the next
> point isn't known yet, and when that next point becomes known the
> control point left of the current inflection has already been calculated.
> I'll have to look into this, but it should be possible to re-calculate
> the left point.```
```
This was actually quite easy to implement.
Now you can specify one inflection to have an angle of 'straight and the
next inflection of 0 (zero), which reliably creates a straight line
between the two (see attached).

You'll see the differing line width, thought, but I hope we'll be able
to solve that as well.

Urs

>
> b)
> Currently the angle at an inflection is given as relative to the
> previous segment's baseline. I like this because it gives quite
> predictable results, but it could be extended by optional behaviours:
> A general or local option could interpret angles at an inflection as
> relative to the whole slur's baseline, or even as absolute angles
> (relative to horizontal). This may in *some* cases simplify the
> construction of flat segments, but I can imagine there are situations
> where this might be useful in general.
>

```
```\version "2.19.48"

% This has to be available
\include "notation-snippets/shaping-bezier-curves/compound-slurs.ily"

\paper {
indent = 0
ragged-last = ##f
markup-system-spacing.minimum-distance = 25
score-markup-spacing.minimum-distance = 12
page-count = 1
}

title = "Compound Slurs With Straight Segments"
subtitle = "Using openLilyLib/snippets"
}

straight =
^\compoundSlur \with {
%  annotate = ##t
%show-grid = ##t

start-angle = 60
end-angle = 60
start-ratio = 0.25
end-ratio = 0.3
inflection =
#'((X-ratio . .15)
(Y-offset . 10)
(ratio-left . .5)
(angle . straight)
)

inflection =
#'((X-ratio . .5)
(Y-offset . 10)
(ratio-right . .8)
(angle . 0)
)

inflection =
#'((X-ratio . .6)
(Y-offset . 0)
(ratio-left . .5)
(angle . straight)
)

inflection =
#'((X-ratio . .4)
(Y-offset . -20)
(angle . 0)
)
}

music = \relative c''' {
c -\straight
b a g f e d
c b a g f e d
c d e f g a b
c d e f g a b )
}

\score {
\new Staff \music
}```

compound-slur-straight-slur-example.pdf
```_______________________________________________