Le 19/04/2021 à 07:47, Jacques Menu a écrit :
Hello folks,

MusicXML has the concept of a slur to a note in another staff, and MusicScore provides this feature. The simple attempt, first attached image, doesn’t produce a satisfactory result.

Is there a way to obtain such a slur in LilyPond without setting control points manually, as is shown in https://lsr.di.unimi.it/LSR/Item?id=134 <https://lsr.di.unimi.it/LSR/Item?id=134>, second attached image?

Thanks for your help!

JM

Hi Jacques,

LilyPond does support cross-staff slurs. In your example, it thinks the slur is going to look ugly if crossing the staves, and chooses a less steep option.

You can increase the demerit for slurs with end points too far from the note heads to force it to span the total vertical interval between the heads:

\new PianoStaff <<
  \new Staff = "right" {
    \override Slur.details.edge-attraction-factor = 1000
    e'''2(
    \change Staff = "left"
    a4)
    \change Staff = "right"
    b''8 r |
  }
  \new Staff = "left" {
    \clef bass
    s1
  }
>>

See:

http://lilypond.org/doc/v2.22/Documentation/internals/slur_002dinterface

Cheers,
Jean


Reply via email to