lilypond-devel
[Top][All Lists]
Advanced

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

Re: proposed enhancement to vertical stretching logic


From: Reinhold Kainhofer
Subject: Re: proposed enhancement to vertical stretching logic
Date: Tue, 1 Jul 2008 20:08:48 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Mittwoch, 25. Juni 2008 schrieb Joe Neeman:
> However, I think that LilyPond´s spring algorithms
> are already close to the ones you are describing. Have a look in
> simple-spacer.cc -- it is reasonably self-contained. Unfortunately, these
> spring algorithms aren´t used in the vertical stretching step, which is
> completely naive; they are only used in horizontal and vertical spacing
> (ie. between systems, not within them). 

I've now had a quick look and think that the springs-and-rods problem solver 
needs to be inserted in Align_interface::align_elements_to_extents.
Unfortunately, I'm seeing several problems formulating the springs-and-rods 
problem:

1) Each vertical object (staff, lyrics, figured bass) has an entry in the 
elements, some with stretchable=#f, others with #t. See the attached file (on 
the second page I copied that information; The vertical axis groups with 
stretchable=#f are apparently the lyrics, while the others are staves). PDF is 
at:
http://www.fam.tuwien.ac.at/~reinhold/temp/equal_spacing.pdf
While this makes sense in general, for stretching we need to use springs that 
go from one staff to the next, even if lyrics are in between. Unfortunately, 
I don't know how to detect which of the elements are lyrics and should be 
disregarded for stretching (or at least the stretching should not happen only 
between lyrics and next staff; lyrics might induce spacing that is a little 
larger than without lyrics, but in general not influence the stretching 
much).

2) To work properly also with rhythmic staves and tab staves, I think that the 
springs should go only from the end of one staff to the beginning of the 
next, as otherwise the staff extends will already take away some of the 
vertical space that should be equally distributed. How do I get the staff 
extents?

3) How do I get the skyline of a staff (or rather, the minimal distance 
between two staves, which is calculated from overlaying the two skylines) to 
use as the rod length?

4) How do I move the staves/lyrics/figuredbass/etc. to the correct vertical 
position? AFAICS, there is only Grob::translate_axis, which moves the object 
by a certain amount, but does not allow setting a certain position...

Any pointers how to solve these problems?
Cheers,
Reinhold


- - -- 
- - ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIanB7TqjEwhXvPN0RAtGvAJ0Uz9+rE3iH3y2g5HI/ebDARdEuAQCeM9Zg
HGkhPMUTz36RAQvN/+FD228=
=gwdN
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIanKxTqjEwhXvPN0RAhN1AKCe6yPxOLLcsNGDNCZlWhvsP4cFgQCgh0gP
y0B6FkiQzm7UB25KLxerdns=
=Lr9N
-----END PGP SIGNATURE-----

Attachment: equal_spacing.ly
Description: Text Data


reply via email to

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