lilypond-user
[Top][All Lists]
Advanced

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

Re: Extracting symbol location


From: David Nalesnik
Subject: Re: Extracting symbol location
Date: Tue, 27 Sep 2016 15:29:34 -0500

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



reply via email to

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