Re: stretchable systems

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: stretchable systems

Han-Wen Nienhuys

[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 - [hidden email] - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: stretchable systems

Nicolas Sceaux
Han-Wen Nienhuys <[hidden email]> writes:

> 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.

It would be good to have \adjustVerticalSpacing and \pageBreak, yes.


_______________________________________________
lilypond-devel mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/lilypond-devel