[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Understanding ly:grob-original and ly:spanner-broken-into
From: |
David Kastrup |
Subject: |
Re: Understanding ly:grob-original and ly:spanner-broken-into |
Date: |
Wed, 08 Mar 2017 11:00:59 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> Hi,
>
> I have a hard time understanding ly:grob-original and whether I need it.
> I'm working on a custom slur stencil and now have to support broken slurs.
>
> I looked into the implementation of \shape (which is only partially
> appropriate because it doesn't create a stencil but property overrides)
> and found that it splits the grob into its siblings using this code:
>
> (let* ((orig (ly:grob-original grob))
> (siblings (if (ly:spanner? grob)
Looks like (if (ly:spanner? orig) ... would make more sense here.
> (ly:spanner-broken-into orig) '()))
> I don't really see why "orig" is created here. What's the difference
> between the last line of the example and using (ly:spanner-broken into
> grob) here? As usual the documentation on the Scheme-functions page
> isn't helpful ...
Apparently grob is assumed to possibly already be a broken piece of slur
here. So its unbroken original is looked up, and the pieces are taken
from there.
All these are pure read-only functions: nothing is "split" or "broken"
in these lines themselves.
--
David Kastrup