one-pass vertical stretching

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

one-pass vertical stretching

Joe Neeman-2
I've just committed one-pass vertical stretching to branch jneeman. I haven't pushed to make web because I haven't yet checked regressions and there is a change in behaviour -- it now stretches systems by default. Stretching can be tuned by tweaking VerticalAlignment #'max-stretch. If you want to tweak the systems individually, you should set VerticalAlignment #'max-stretch to zero and use line-break-system-details as before.

What do people think? Should we stretch by default?

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

Re: one-pass vertical stretching

Han-Wen Nienhuys-2
Joe Neeman escreveu:
>
> What do people think? Should we stretch by default?

what's the norm in printed matter?

--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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

Re: one-pass vertical stretching

Rune Zedeler
In reply to this post by Joe Neeman-2
(going back to the list)

Joe Neeman skrev:

> Doesn't work for piano scores, sorry. The VerticalAlignment in a
> PianoStaff has its distance fixed so that cross-staff beaming works.

Oh...
I thought that the whole point of the two pass stretching was to get
piano staves to work :-(

Well, couldn't you detect knees and hence only stretch the systems in
which knees did not occur?
(In most piano pieces knees occur so seldom that it would make sence to
detect systems without knees, and stretch those)

-Rune


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

Re: one-pass vertical stretching

Mats Bengtsson-4


Rune Zedeler wrote:
> Well, couldn't you detect knees and hence only stretch the systems in
> which knees did not occur?
> (In most piano pieces knees occur so seldom that it would make sence
> to detect systems without knees, and stretch those)
In that case, I recommend to use GrandStaff instead. The only reason to
use PianoStaff
is to get the fixed spacing to be able to handle cross-staff beams.

   /Mats


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

Re: one-pass vertical stretching

Rune Zedeler
Mats Bengtsson skrev:

>> (In most piano pieces knees occur so seldom that it would make sence
>> to detect systems without knees, and stretch those)

> In that case, I recommend to use GrandStaff instead.

Eh, there is a crucial difference between "seldom" and "never", Mats.

-Rune


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

Re: one-pass vertical stretching

Bertalan Fodor (LilyPondTool)
In reply to this post by Mats Bengtsson-4

> In that case, I recommend to use GrandStaff instead. The only reason
> to use PianoStaff
> is to get the fixed spacing to be able to handle cross-staff beams.
>
This fixed spacing is a very strict limitation, which makes it
impossible to make beautiful piano scores. Why does this limitation
still exist?

Bert



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

Re: one-pass vertical stretching

Rune Zedeler
Bertalan Fodor skrev:

> This fixed spacing is a very strict limitation, which makes it
> impossible to make beautiful piano scores.

I agree!
I really thought that the hurdle was about to dissapear with the two
pass thingy.
I made a quick (too quick) test to see that it indeed works. Yes,
Lilypond handles some simple cases correctly, so I assumed that it
worked in general :-(

\version "2.11.10"
{
   \new PianoStaff \relative c'' <<
     \new Staff = up {
       s1*4
       \overrideProperty
        #"Score.NonMusicalPaperColumn"
        #'line-break-system-details
        #'((fixed-alignment-extra-space . 15))
       \break
       s1*4
     }
     \new Staff = down {
       \repeat unfold 2 {
        c8 c \change Staff = up c c c c c c\change Staff = down c1 c c
       }
     }
   >>
}

-Rune

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

test.png (20K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: one-pass vertical stretching

Han-Wen Nienhuys-2
In reply to this post by Rune Zedeler
Rune Zedeler escreveu:

> (going back to the list)
>
> Joe Neeman skrev:
>
>> Doesn't work for piano scores, sorry. The VerticalAlignment in a
>> PianoStaff has its distance fixed so that cross-staff beaming works.
>
> Oh...
> I thought that the whole point of the two pass stretching was to get
> piano staves to work :-(
>
> Well, couldn't you detect knees and hence only stretch the systems in
> which knees did not occur?
> (In most piano pieces knees occur so seldom that it would make sence to
> detect systems without knees, and stretch those)

Don't forget x-staff slurs and arpeggios.

--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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

Re: one-pass vertical stretching

Han-Wen Nienhuys-2
In reply to this post by Bertalan Fodor (LilyPondTool)
Bertalan Fodor escreveu:
>
>> In that case, I recommend to use GrandStaff instead. The only reason
>> to use PianoStaff
>> is to get the fixed spacing to be able to handle cross-staff beams.
>>
> This fixed spacing is a very strict limitation, which makes it
> impossible to make beautiful piano scores. Why does this limitation
> still exist?

For determining horizontal spacing it is necessary to know stem directions.
In the case of beams, stem directions are determined after doing
automatic knees.

It would probably be possible to revise the Beam::consider_auto_knees,
so it doesn't use the relative coordinates (which triggers
the vertical positioning).

--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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

Re: one-pass vertical stretching

Rune Zedeler
In reply to this post by Han-Wen Nienhuys-2
Han-Wen Nienhuys skrev:

> Don't forget x-staff slurs and arpeggios.

Works already.


\version "2.11.10"
{
   \new PianoStaff \relative c'' <<
     \set PianoStaff.connectArpeggios = ##t
     \new Staff = up {
       s1*3 <c e>1\arpeggio
       \overrideProperty
        #"Score.NonMusicalPaperColumn"
        #'line-break-system-details
        #'((fixed-alignment-extra-space . 15))
       \break
       s1*3 <c e>1\arpeggio
     }
     \new Staff = down {
       \repeat unfold 2 {
        \set followVoice = ##t
        c8 c \change Staff = up c c \change Staff = down c c c c c1 c <c
e>\arpeggio
       }
     }
   >>
}


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

piano.png (19K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: one-pass vertical stretching

Mats Bengtsson-4
Wasn't the issue if it worked without the fixed spacing, i.e. if you use
GrandStaff instead of PianoStaff? From a quick test, it seems that
x-staff arpeggios isn't any problem, whereas beams and slurs fail.

   /Mats

Rune Zedeler wrote:

> Han-Wen Nienhuys skrev:
>
>> Don't forget x-staff slurs and arpeggios.
>
> Works already.
>
>
> \version "2.11.10"
> {
>   \new PianoStaff \relative c'' <<
>     \set PianoStaff.connectArpeggios = ##t
>     \new Staff = up {
>       s1*3 <c e>1\arpeggio
>       \overrideProperty  
>     #"Score.NonMusicalPaperColumn"
>     #'line-break-system-details
>     #'((fixed-alignment-extra-space . 15))
>       \break
>       s1*3 <c e>1\arpeggio
>     }
>     \new Staff = down {
>       \repeat unfold 2 {
>     \set followVoice = ##t
>     c8 c \change Staff = up c c \change Staff = down c c c c c1 c <c
> e>\arpeggio
>       }
>     }
>   >>
> }
>
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> lilypond-devel mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/lilypond-devel
>  

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
        Fax:   (+46) 8 790 7260
        Email: [hidden email]
        WWW: http://www.s3.kth.se/~mabe
=============================================



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

Re: one-pass vertical stretching

Rune Zedeler
Mats Bengtsson wrote:
> Wasn't the issue if it worked without the fixed spacing,

No, the issue was whether it worked with setting the fixed spacing
manually for each system - as illustrated in the example.

-Rune


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

Re: one-pass vertical stretching

Joe Neeman-2
In reply to this post by Han-Wen Nienhuys-2
On 1/19/07, Han-Wen Nienhuys <[hidden email]> wrote:
Bertalan Fodor escreveu:
>
>> In that case, I recommend to use GrandStaff instead. The only reason
>> to use PianoStaff
>> is to get the fixed spacing to be able to handle cross-staff beams.
>>
> This fixed spacing is a very strict limitation, which makes it
> impossible to make beautiful piano scores. Why does this limitation
> still exist?

For determining horizontal spacing it is necessary to know stem directions.
In the case of beams, stem directions are determined after doing
automatic knees.

It would probably be possible to revise the Beam::consider_auto_knees,
so it doesn't use the relative coordinates (which triggers
the vertical positioning).

I'll try using pure_relative_y_coordinate. Do you know what the problem is for cross-staff slurs and arpeggios?


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

Re: one-pass vertical stretching

Joe Neeman-2
In reply to this post by Rune Zedeler
On 1/19/07, Rune Zedeler <[hidden email]> wrote:
Mats Bengtsson wrote:
> Wasn't the issue if it worked without the fixed spacing,

No, the issue was whether it worked with setting the fixed spacing
manually for each system - as illustrated in the example.

No, Mats is right. If you supply a fixed spacing, everything is easy. If lilypond has to work out the distance for itself, there is a nasty cyclic dependency.



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

Re: one-pass vertical stretching

Rune Zedeler
Joe Neeman wrote:

> No, Mats is right. If you supply a fixed spacing, everything is easy.

Yeah, easy, I don't know.
But I do know that it does not work today even if you supply a fixed
spacing for each system.
I don't mind having to have to set the spacing manually. It is not
perfect, but it is doable. I just want to be able to typeset
piano-scores with knees and varying vertical spacing.

-Rune


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

Re: one-pass vertical stretching

Joe Neeman-2


On 1/19/07, Rune Zedeler <[hidden email]> wrote:
Joe Neeman wrote:

> No, Mats is right. If you supply a fixed spacing, everything is easy.

Yeah, easy, I don't know.
But I do know that it does not work today even if you supply a fixed
spacing for each system.

Sorry, you're right. But this should be fixable separately and it is rather easier.

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

Re: one-pass vertical stretching

Han-Wen Nienhuys-2
In reply to this post by Joe Neeman-2
Joe Neeman escreveu:

>
> I'll try using pure_relative_y_coordinate. Do you know what the problem
> is for cross-staff slurs and arpeggios?

On 2nd thought, none:  the problem with beams is that they trigger y-alignments
before line-breaking, but that's not a problem for slurs or arpeggios.

--

Han-Wen Nienhuys - [hidden email] - http://www.xs4all.nl/~hanwen

LilyPond Software Design
 -- Code for Music Notation
http://www.lilypond-design.com



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

Re: one-pass vertical stretching

Trent Johnston
In reply to this post by Joe Neeman-2
Hi Everyone,

Just a short note about one-pass vertical stretching. If this feature is to be
turned on by default then lyrics is another area that needs to be looked at.

Currently with the two-pass system the same staff stretch is applied to the
lyrics as well which causes them to be often floating in space, especially if
there a large stretch.

Trent



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

Re: one-pass vertical stretching

Nicolas Sceaux
In reply to this post by Joe Neeman-2
"Joe Neeman" <[hidden email]> writes:

> I've just committed one-pass vertical stretching to branch jneeman. I
> haven't pushed to make web because I haven't yet checked regressions and
> there is a change in behaviour -- it now stretches systems by default.
> Stretching can be tuned by tweaking VerticalAlignment #'max-stretch. If you
> want to tweak the systems individually, you should set VerticalAlignment
> #'max-stretch to zero and use line-break-system-details as before.
>
> What do people think? Should we stretch by default?

Joe you're my hero.

As for what is usually done, I don't have many examples for comparison,
just a Summer Night Dream by Mendelssohn, C.F.Peters, late 19th. But in
this book, vertical stretch is used; lyrics however are always close to
the staff they're linked to, as Trent points out.

nicolas


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

Re: one-pass vertical stretching

Joe Neeman-2
In reply to this post by Joe Neeman-2
On 1/19/07, Rune Zedeler <[hidden email]> wrote:
Joe Neeman skrev:
> I've just committed one-pass vertical stretching to branch jneeman.

Oh, this is so cool, I will check it out asap. :+)
Should definitely be turned on per default. I only have experiences with
piano scores, but there, it is definitely standard to have varying
staff-distances.

I've committed support for stretching piano scores to the jneeman branch, but there are still problems. input/regression/beam- cross-staff-slope.ly is currently broken and the piano staves are positioned (IMO, but I am not a pianist) too close together.

This last one is giving me some problems: I have removed forced-distance and collapsed everything into one VerticalAlignment. So now there is no way to say something like "the staves of a piano staff should be positioned at least 8 units apart". I'd like to do something like \override PianoStaff.VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4) but of course it doesn't work because the Staves that are children of PianoStaff have their own overrides. Any ideas for how this override should be done?

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