lilypond-devel
[Top][All Lists]
Advanced

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

Re: stretchable systems


From: Han-Wen Nienhuys
Subject: Re: stretchable systems
Date: Thu, 25 Aug 2005 12:58:15 +0200
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)


[to l-devel]

Nicolas Sceaux wrote:
Hi,

Considering a piece with N-staff systems, with no room on a page for 3
systems, only for two, but with lot of space left, I can't find if it is
possible to automatically enlarge (I hope that this word won't make this
message marked as spam) the space between staves in a system, up to a
certain distance, so that there should be less space between the two
systems.

(snip picture)

If this does not exist yet, but is sponsorable, I'm interested.

I'll think about it. Unfortunately, I don't see how we can add this in a "simple" way. Right now, systems are simply formatted, and then output as a stencil. The finished systems are then spread across the pages.

For such a thing to be possible, we have to add another formatting pass, and a mechanism to get the range for vertical extents, instead of the stencils. Then the page breaking is done, and only then, the final shape of a system is determined. Another option is to make stencils stretchable, iow. remember the complete composition of a Stencil, and then have

  Stencil::get_extent (Real stretch_factor, Axis a)

Then, in the end you could do

  interpret_stencil (y_stretch_factor, system)

and the system would be spaced wider in vertical sense. It would be very neat, but it would also make Stencil much more complex (each stencil would carry a spring-and-rod problem inside). Also, I'm not sure yet that this would be good enough to do what you want. It would be neat, because we'd have a way to do more advanced horizontal spacing too: we could space prefatory matter (key/time sig), accidentals, etc. tighter in cramped lines.

Both options would be A LOT of work: between 2 to 6 months full-time work. I guess it will be necessary for good typesetting, but IMO there are currently more pressing problems in the typesetting engine.

Isn't it easier to cook up a hack? We can already stretch systems, with some hairy code. You could do it in a 2 pass process: first determine page breaks and space available, then setup a

  adjustVerticalSpace #FACTOR #SYSTEM-NUMBER

function and  dump

   { \adjustVerticalSpacing #0.5  #1
     \skip 1 * 4 \lineBreak
     \adjustVerticalSpacing #0.5  #2
     \skip 1 * 4 \lineBreak
     \adjustVerticalSpacing #0.5  #3
     \pageBreak
     \skip 1 * 4 \lineBreak
     \adjustVerticalSpacing #0.75  #4
        ..
   }

Voice which you include in the score.

--
 Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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