Am 19.09.2016 um 22:49 schrieb Urs Liska:
> Am 19.09.2016 um 20:50 schrieb David Kastrup:
>> Urs Liska <u...@openlilylib.org> writes:
>>
>> [...]
>>
>> You are working with slopes here.  Don't.  They don't support vertical
>> lines.
>>
> Yes, that's what I realized ...
>
>> Please take a look at the recently added functions
>>
>>    ly:length ly:angle ly:directed
>>
>> They will usually make it easy to do the operations you want.  In
>> particular ly:directed can also use a vector as a direction without ever
>> calculating its angle.
> Thanks! From looking at the docs it seems they'll do exactly what I want
> (and had partially implemented in Scheme). Can't wait to return to my
> LilyPond computer :-)
>

I think I now have it in a state where we can work from. The angle of
the inflection is now given as an angle relative to the line connecting
the end points of the whole slur. While an angle relative to the
horizontal line would be somewhat more straightforward I think this
approach is more robust against changes (for example when the slur is
cross-staff and the staff-staff distance changes).

TODO:

  * support more than two segments
    (shouldn't be *that* difficult, just tedious and slightly complex)
  * support broken slurs
    (each sibling should be togglable between multi-segment or not, and
    it should be \shape-able)
  * support Slur, PhrasingSlur and Tie (like \shape)
  * specify shapes as polar coordinates (or all options that \shapeII has)

The code is now at
https://github.com/openlilylib/snippets/tree/compound-slur/notation-snippets/shaping-bezier-curves

Best
Urs

Attachment: compound-slur-example-sorabij.pdf
Description: Adobe PDF document

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to