lilypond-user
[Top][All Lists]
Advanced

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

Re: When (in seconds) does each page begin?


From: Matt Wallis
Subject: Re: When (in seconds) does each page begin?
Date: Fri, 29 May 2020 08:28:42 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.1

On 28/05/2020 23:15, Valentin Villenave wrote:
On 5/28/20, Matt Wallis <m7956@acumen-it.co.uk> wrote:
The output from event-listener is so close. I just need to get it to
listen to the appropriate events ... if that is possible.

Then you should definitely have a look at the last link I sent
(lilypond-html-video); IIRC it uses a Scheme engraver (so no patching
Lily itself) to output svg with additional timing information encoded
as data- attributes for each rhythmic event. Then one can use that to
get a cursor, change CSS attributes on the fly (e.g. noteheads
opacity), switch from one page to the next, etc.  It’s still very much
WIP, but you can have a look at the examples (particularly the
vibraphone one) to get an idea.

Many thanks for the pointer. I had not encountered lilypond-html-video before.

It is very informative to see how the Grob_metadata_engraver is constructed in https://gitlab.com/sigmate/lilypond-html-live-score/-/blob/master/grob-inspector.ily. I finally have a reason to look into what a grob is - did I mention I was new to this? :-)

But it is working on a single SVG (one long line) using one-line-auto-height-page-breaking, whereas I want a sequence of pages, and to know when each page starts (in seconds).

From my initial reading, I suspect there is a way of inferring from the grobs when a new page begins. I find myself asking: if I have one System per page, can I infer a page has started by acknowledging all System grobs?. But I would rather do this more directly by listening to the page-break-event (or something like that).

I’m CCing Mathieu as it’s his project. Mathieu, you can read Matt’s
previous message here:
https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00527.html

And my original question is here:

https://lists.gnu.org/archive/html/lilypond-user/2020-05/msg00521.html

BTW, I didn't see a vibraphone example. I scanned a few branches, but maybe I didn't try the right branch.

All the best, Matt



reply via email to

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