lilypond-user
[Top][All Lists]
Advanced

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

Re: Finding the objects at the start of the current measure


From: Urs Liska
Subject: Re: Finding the objects at the start of the current measure
Date: Wed, 27 Feb 2019 08:51:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1


Am 27.02.19 um 00:05 schrieb Thomas Morley:
Am Di., 26. Feb. 2019 um 14:12 Uhr schrieb Urs Liska <address@hidden>:

Am 26.02.19 um 12:02 schrieb Thomas Morley:
Am Mo., 25. Feb. 2019 um 13:14 Uhr schrieb Urs Liska <address@hidden>:
Why not going for bound-padding instead of minimum-length.
I wasn't aware that multimeasure rests are spanners and that I could use
bound-padding.
Otherwise you wouldn't be able to go for minimum-length ;)

I must admit that this doesn't seem to properly work when applied to my
code.

Do I understand correctly that bound-padding ensures padding to the
right and left of the given (spanner) grob. So when the rest (or my
in-place replacement with arbitrary markup) has a width of, say, 4 staff
spaces, and bound-padding is set to, say, 10, then my measure is
guaranteed to be (at least) 24 staff spaces wide?
I think so.

I can successfully map your code to mine, determining a bound-padding
value of half the difference between the wider markup and the stencil
within the staff. However, without any additional padding I notice that
the measures are usually *wider* than necessary, even forcing the music
to run off the staff to the right.

The attached images show that the effective padding is very different in
different measures. And when I subtract some manual offset I end up some
measures still having generous padding while others already have the
markup overlap the barlines.

So I have the impresstion that - while solving the original issue of
measure-start elements - bound-padding is still not sufficiently
reliable/manageable for my issue.

Urs

I think lilypond stretches lines to fill up the line-width. So the
applied bound-padding may result in different visible spacing.
Additionally there seems to be some default space to the left/right of
a MMR.


For me that means the results with 'minimum-length seem to be generally more reliable - with the exception of the start-measure objects. So I'll probably have to go down the route iterating over the system's objects to find out if anything is there ...



Though, with my limited tests I've never seen the music running out to
the right.
Could you post some example-code?


Not really, because it is buried pretty deep in my infrastructure ...

Urs



Cheers,
   Harm



reply via email to

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