lilypond-user
[Top][All Lists]
Advanced

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

Re: Extracting symbol location


From: Lukas Tuggener
Subject: Re: Extracting symbol location
Date: Mon, 09 Jan 2017 10:55:49 +0000

Hi David

When I tried to use your very useful script on a fresh installation it didnt work anymore. I suspect it is due to the change you already mentioned in your first message:

There's a patch being reviewed which replaces the 'id property with
'output-properties and this will need to be updated accordingly
(https://sourceforge.net/p/testlilyissues/issues/4974/).



I tried to uptdate the script, but didnt get it to work so far. I assume the updated assignIDs function should look something like this:

assignIDs = #(let ((grob-names (map car all-grob-descriptions)))
   #{
     #@(map (lambda (x)#{ \override #(list 'Score x (assoc-get 'id  output-attributes) = #get-unique-id #})
     grob-names)
   #})

For any hint where I went wrong i would be very grateful.

Regards
Lukas

David Nalesnik <address@hidden> schrieb am Di., 27. Sep. 2016 um 22:33 Uhr:
Hi Urs,

On Tue, Sep 27, 2016 at 3:58 AM, Urs Liska <address@hidden> wrote:
>
>
> Am 26.09.2016 um 20:13 schrieb David Nalesnik:
>> The link you cite mentions looking at SVG output, and I suppose that
>> would be the best way.  I can't think of another method to get the
>> actual print positions of objects.
>>
>
> Hm, but at some point LilyPond *has* to know where objects are placed,
> isn't it?
> Isn't there anything like a parent hierarchy that could be walked up
> like a breadcrumb navigation that eventually leads to coordinates
> relative to a page corner?

Don't know how helpful this is, but I see the command-line option
-dbackend=scm which dumps the stencil output of a file as a Scheme
_expression_.  It includes entries for "grob-cause".

I've tried to create a function which takes a score argument and
produces a corresponding stencil _expression_ to work with, but I'm
having no luck.

It would be nice to do something like this:

 \version "2.19.46"

#(use-modules (scm page))

#(define (of paper-book)
   (for-each
    (lambda (page)
      (display (ly:stencil-expr page))
      (newline))
    (map page-stencil (ly:paper-book-pages paper-book))))

but I can't get the Paper_book object needed.

ly:book-process does create a Paper_book, but it isn't returned...

>
> (Of course this is closely related to my question
> http://lists.gnu.org/archive/html/lilypond-user/2016-09/msg00655.html)
>

Seems like a tall order, but who knows!

David

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

reply via email to

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