lilypond-user
[Top][All Lists]
Advanced

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

Re: Vertical stretching of groups


From: Andrew Hawryluk
Subject: Re: Vertical stretching of groups
Date: Sat, 21 Jun 2008 23:41:32 -0600

So, maybe I'm too naive about the LP internals to discuss this one,
but it seems like the current LP structure is close to providing what
Reinhold describes, at least within systems of music. Currently, the
keep-fixed-while-stretching property can be used to exclude a staff or
group of staves from all vertical stretching. Instead of a boolean
'to-stretch-or-not-to-stretch' for each vertical space we could have a
floating point that describes the relative stretchiness of each
element in the system.

The total vertical stretch would be calculated by a function like
ly:align-interface::calc-max-stretch, and this space would then be
distributed based on the weighting. For example,if each gap between a
staff, group, lyric, figured bass, etc. has a stretchiness
coefficient, k_i, and the total vertical distance to be filled is S,
then the amount of vertical space to be added to gap i, is given by
s_i = (S * k_i) / (\sum k_i).

Deciding where to store the stretch factors is trickier, but maybe it
could exist at the group level:
ChoirStaff k = 0
PianoStaff k = 1
InnerStaffGroup k = 3
StaffGroup k = 4
Score having k = 8

That sounds very nice, but here's where I'm stuck:
<<
  \new Staff { ... }
  \new Lyrics { ... }
  \new Staff { ...}
>>
How does LP know which staff the Lyrics should be kept close to? Or
how does the author specify which of these two gaps has k = 0? Would
we have to write
<<
  \new ChoirGroup
  <<
    \new Staff { ... }
    \new Lyrics { ... }
  >>
  \new Staff { ...}
>>
?

What about the figured bass context? It should accept very little
separation between itself and the staff above it, but this should not
depend on what group it is inside.

Maybe each context would end up with a 'stretchiness-above' property
that can have either a default value (zero for Lyrics and FiguredBass)
or can inherit the value from the next group up in the hierarchy.

Am I on the right track?

Andrew

On Fri, Jun 20, 2008 at 8:23 AM, Reinhold Kainhofer
<address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am Samstag, 14. Juni 2008 schrieb Valentin Villenave:
>> 2008/6/14 Reinhold Kainhofer <address@hidden>:
>> > E.g. Gardner Read clearly describes in his book that the instrumental
>> > groups should have less spacing for their staves than the spacing to
>> > between the groups. I've not been able to achieve this in lilypond yet.
>>
>> I use special contexts for the highest and the lowest staff of each
>> group. It's ugly, but it works.
>
> Thanks for the tip, which is unfortunately not general enough to be included
> in orchestrallily :-(
> That's really a pity, because it's one of the engraving requirements for
> vertical staff positioning.
>
> 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)
>
> iD8DBQFIW71uTqjEwhXvPN0RAtXZAKDW8WMIx08L4M944yHwTOBXSkhaDQCeL8aR
> oEcQNDNNTiZgyYHvCWpozY4=
> =3UvL
> -----END PGP SIGNATURE-----
>
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/lilypond-user
>




reply via email to

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