Hi David, thank you for the hints and explanations.
Am 07.02.2017 um 14:34 schrieb David Nalesnik: > 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. PaperColumn > and NonMusicalPaperColumn will store references to many grobs (through > the 'elements property from the axis-group-interface) > > -- > > Or, you could get all elements on a line (through the 'all-elements > property of the System grob) and filter by location. This seems a bit > inefficient to me. > > Sorry, no time right now for a working code snippet, but I hope this is > helpful. Of course I'll have to look into it, but it seems like sufficient to find something. Please don't bother coming up with some code - I'd like to find out on my own ;-) Just one question: Will the 'note-columns property give me access to *all* elements in the staff or only to the ones in the current voice context? Of course if I need some sort of skyline it has to look at all elements. If the answer is "no" that would be a striking argument for iterating over the whole system. Am 07.02.2017 um 14:40 schrieb David Nalesnik: > It strikes me that this could be a good subject to attack a user > documentation for LilyPond internals. Certainly as a Scores of Beauty > tutorial. It was one of the first things I wanted to know. Actually I already have the intention to do this, once I'm through with the challenge. Best Urs > > Best, > David -- u...@openlilylib.org https://openlilylib.org http://lilypondblog.org _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user