lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find ties enclosed in slur (while overriding stencil)


From: Urs Liska
Subject: Re: Find ties enclosed in slur (while overriding stencil)
Date: Wed, 15 Mar 2017 09:41:23 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

Hi David (Nalesnik),


Am 14.03.2017 um 16:12 schrieb David Nalesnik:
> On Tue, Mar 14, 2017 at 9:46 AM, Urs Liska <address@hidden> wrote:
>>
>> Am 14.03.2017 um 13:37 schrieb David Kastrup:
>>
>> (let ((ties (ly:grob-array->list (ly:grob-object grob 'ties))))
>>
>> but in that case "grob"  is a TieColumn, and I don't know how I could
>> access that (which is something I need anyway in order to do further
>> formatting later).
>> Hi 
>> Well, looks like you need to pursue that approach...
>>
>>
>> But as said I don't know how I can get to the tie column.
>> The notehead's parent is the note-column, and the note-column's parents are
>> PaperColumn (X) and VerticalAxisGroup (Y), both seemingly not giving any
>> handle back down to something like a TieColumn.
>>
>> Hm, I think this is really under-documented, and I'm completely stumbling in
>> the dark ...
>>
> Well, in my experience there are few pointers to Ties and TieColumn grobs.
>
> It looks like the Slur's property 'encompass-objects could help:
>
>
> \version "2.19.56"
>
> {
>   \override Slur.stencil =
>   #(lambda (slur)
>      (pretty-print (grob::all-objects slur))
>      (ly:slur::print slur))
>   c''(~ c'' f''~ f'')
> }
>
> HTH,
> David

Indeed this helps! Somehow I was led to think 'encompass-objects was a
property that determines which types of objects to consider for
collision handling, but indeed I can retrieve a list of all ties
enclosed by the slur. Tthrough their X parent I can access the
corresponding note head. And when iterating over the note heads (through
the 'note-columns of the slur) I can match them against the ties
(obviously everything points at the actual objects so I can use eq? for
the matching.

So hopefully I have everything now to solve *this* part of the challenge ...

Best
Urs

-- 
address@hidden
https://openlilylib.org
http://lilypondblog.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]