On Tue, Feb 7, 2017 at 7:34 AM, David Nalesnik <david.nales...@gmail.com> wrote:
> Hi Urs,
>
> On Mon, Feb 6, 2017 at 5:26 AM, Urs Liska <u...@openlilylib.org> wrote:
>> Hi all,
>>
>> if I override a Tie/Slur's stencil I can easily (well, now, after your
>> help ...) get to the note columns at both ends.
>>
>> Is it possible to retrieve a list of all objects *between* those ends too?
>> Concretely I would like to know if there are ties within a slurred
>> phrase and to determine peak notes/stems in order to do some sort of
>> collision-handling-like layout decisions.
>>
>
> One way would be to follow pointers.  Most objects store references to
> other objects.  In the case of Slur, consulting Internal Properties at
> http://lilypond.org/doc/v2.19/Documentation/internals/slur_002dinterface
> shows that a grob array of note columns traversed is available through
> the 'note-columns property (which you would access through
> ly:grob-object). BTW, you'd probably want to use ly:grob-array->list
> to work with the array more conveniently..
>
> There are then pointers to other objects held by each NoteColumn grob.
>
> You can "go higher," too: use parentage (ly:grob-parent), or get the
> grob's associated paper column with ly:item::get-column.

Use ly:item::get-column on the spanner's bounds (ly:spanner-bound) or
on any *Item*, for example, one of the spanned NoteColumns.

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

Reply via email to