Thank you, Jean, for the clarification and the suggestion for using the \repeatTie.
Finally I decided to stick to a more general slur and \tweak control-points that shift the slur horizontally to the desired position. The below example cleanly compiles without a programming error. *Working example* \version "2.23.14" \relative { \repeat volta 2 { g'1( | \alternative { \volta 1 { g2 g) | } \volta 2 { g2 \tweak control-points #'((-0.5 . -3.0) (2.5 . -3.0) (4.5 . -3.0) (5.3 . -2.0)) ( g) \bar "|." } } } } [image: image.png] Just for curiosity, why did the Lilypond version change from 2.23.14 to 2.23.80? Thank you, Vlad On Fri, Oct 28, 2022 at 12:01 AM Jean Abou Samra <j...@abou-samra.fr> wrote: > > > Le 27/10/2022 à 23:06, Volodymyr Prokopyuk a écrit : > > Hello, > > > > When working with the manually shaped slurs using the \tweak > > control-points approach, I've got the right output, but with the > > following programming error: bounds of this piece aren't breakable > > that always happens when the shaped slur is attached to the last note > > in a measure. > > > > *Minimal failing example* > > > > \version "2.23.14" > > > > \relative { > > \repeat volta 2 { > > g'1( | > > \alternative { > > \volta 1 { g2 g) | } > > \volta 2 { > > g2 g > > \tweak control-points > > #'((-5.5 . -3.0) (-3.5 . -3.0) (-1.5 . -3.0) (-0.3 . -2.0)) > > ( <>) > > \bar "|." > > } > > } > > } > > } > > > > > > The output is rendered, but with the below programming error > > > > GNU LilyPond 2.23.14 (running Guile 2.2) > > Processing `shaped-slur.ly <http://shaped-slur.ly>' > > Parsing... > > Interpreting music... > > Preprocessing graphical objects... > > Finding the ideal number of pages.. > > Fitting music on 1 page... > > Drawing systems... > > shaped-slur.ly:10:9: programming error: bounds of this piece aren't > > breakable. > > > > \tweak control-points > > shaped-slur.ly:10:9: continuing, cross fingers > > Converting to `shaped-slur.pdf'... > > Success: compilation successfully completed > > > > *Minimal working example* > > * > > * > > However,/if there is a rest/ after the note with the attached shaped > > slur, there is no programming error > > > > \version "2.23.14" > > > > \relative { > > \repeat volta 2 { > > g'1( | > > \alternative { > > \volta 1 { g2 g) | } > > \volta 2 { > > g2 g4 > > \tweak control-points > > #'((-5.5 . -3.0) (-3.5 . -3.0) (-1.5 . -3.0) (-0.3 . -2.0)) > > ( <>) r > > \bar "|." > > } > > } > > } > > } > > > > What is the reason for the programming error in the failing example? > > Is there a way to get the output from the failing example, but without > > the programming error? > > > > > This sounds like this issue in the LilyPond bug tracker: > > https://gitlab.com/lilypond/lilypond/-/issues/6232 > > When you do > > \version "2.23.80" > > { c'( <>) c' } > > this is equivalent to > > \version "2.23.80" > > { c'( c') } > > > In other words, using the empty chord <> attaches the event at > the same moment as the notes that follow this empty chord. Now, > in > > { c'( <>) } > > you are conceptually attaching the end of the slur to some > non-existent note after the end of the piece. I understand > the request that it should work, but I think it's not very > surprising that it doesn't work. > > If I were you, I would just use \repeatTie and \shape. > You are already using \shape, so the default layout > of \repeatTie that looks like a tie and not like a slur > is not so problematic. > > Best, > Jean > >