lilypond-user
[Top][All Lists]
Advanced

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

Re: exporting a parsed fragment to a .ly file


From: caagr98
Subject: Re: exporting a parsed fragment to a .ly file
Date: Thu, 16 Mar 2017 17:46:25 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

You can use `\set Score.skipTypesetting = ##t` (and `##f`) to tell Lily to not typeset a region. If you do that for everything except the part you want, that should do the trick. Since it works on the Score context, it's enough to put it in one staff and it'll affect the entire score.

It's a bit buggy, though. Some things get a bit misaligned, and you get warnings if you switch tempo.

And yes, it speeds stuff up immensely. The parsing takes virtually no time at all, it's the layouting that takes time. Since you limit it to only layouting a small part of the score, that gets a lot faster.

On 03/16/17 17:38, Ramon Dor wrote:
Hi all,
I am interested in the possibility of doing small edits with near
realtime visual typeset feedback restricted locally to a few bars
centered around the edit location without having to typeset an entire
(long and complex) score.
I am aware of the work done by Denemo, yet I'm more interested in the
real lilypond typesetting, even when only done locally.

I was thinking such functionality could be implemented by first parsing
the entire score (i.e. resolving includes, variable references,
traspositions, \mark \default concrete value calculations, etc.) and
then either typesetting just the required section directly, or
indirectly by first setting a variable to the equivalent ly text input,
which, when parsed and typeset, will have produced the exact same
fragment of score as the original, but with of the content inline and
using only absolute and literal values.

This way, a section spanning several bars or time locations within the
score may be typeset in isolation hopefully much quicker than
typesetting the entire score. a separate process can then reparse the
entire score and set said variable to the new state on any new edit. I
am aware of the possibility to render the few last bars or first ones,
but not in the middle, or am I missing the obvious?

my hope is that a section of whatever internal representation lilypond
uses for representing parsed score (e.g. ast) prior to typesetting can
be typeset in isolation. is this possible without a compiler rewrite?
would it actually be able to run quicker? (having to parse the entire
score first anyway)
I'm sure there are far better solutions to this problem than my naive
solution.
please feel free to suggest any good approach even if requiring some
hacking...


Thanks in advance for any line of thought that could put me on the right
path :-)

all the best,
Ramon


_______________________________________________
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]