6

I'm trying to get lilypond to create a slur that ends in multiple alternative endings to a repeat.

Here's what I have at the moment:

\relative c' {
  \repeat volta 2 {
    c d e f(
    \alternative {
      \volta 1 { g) a b c }
      \volta 2 { g) f e d }
    }
  }
}

This produces:

Lilypond output

I'd like to have the slur end in the second alternate ending as well, as shown by the hand-drawn red line. Is this possible?

With the above code I get a compiler warning "cannot end slur" on the g) in the second alternate

1 Answer 1

6

In single note cases you might use \repeatTie: https://lilypond.org/doc/v2.24/Documentation/notation/writing-rhythms.html#ties

In more complex cases (multiple notes slurred under the volta) you can create a tie and move the left control point:

\relative c' {
  \repeat volta 2 {
    c d e f(
    \alternative {
      \volta 1 { g) a b c }
      \volta 2 { g\repeatTie f e d }
    }
  }
}

\relative c' {
  \repeat volta 2 {
    c d e f_(
    \alternative {
      \volta 1 { g a b) c }
      \volta 2 { \shape #'((-1.5 . -1) (0 . -0.6) (0 . 0) (0 . 0)) Slur g( f e) d }
    }
  }
}
3
  • Thanks. I saw \repeatTie in the docs but figured it wouldn't work because this was a slur, not a tie. Guess I should have tried it. Jan 30 at 12:32
  • @AndrewCooper repeatTie simply inserts a ”hanging“ tie ending at the note. So the tie part is mostly about the shape.
    – Lazy
    Jan 30 at 13:29
  • Good to know. Thanks again. Jan 30 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.