Menu

#2462 unnecessarily wide spacing caused by Lyrics

Verified
nobody
Ugly
2014-07-18
2012-03-30
Anonymous
No

Originally created by: *anonymous

Originally created by: janek.li...@gmail.com
Originally owned by: janek.li...@gmail.com

When you examine scores containing Lyrics, you may notice that sometimes the note spacing is uneven for no good reason (i.e. syllabes aren't so wide that horizontal stretching is necessary, but the notes are stretched anyway).

I suppose this happens because when Lily determines spacing, systems aren't stretched to fill the line (i.e. Lily operates on naturally spaced measures - like in ragged-right).  Then, when the stretching is applied, it doesn't take into account that some places are already stretched and there's no need to stretch them more.

See attached images.

This issue is a part of the Lyrics Project.  See related entries:
issue 2450
issue 2451
issue 2452
issue 2453
issue 2454
issue 2455
issue 2456
issue 2457
issue 2458
issue 2459
issue 2460
issue 2461
issue 2462

2 Attachments

Related

Issues: #2450
Issues: #2451
Issues: #2452
Issues: #2453
Issues: #2454
Issues: #2456
Issues: #2458
Issues: #2463

Discussion

  • Google Importer

    Google Importer - 2012-03-31

    Originally posted by: PhilEHol...@googlemail.com

    There's too much in Gould to type right now, but in summary she says that instrumental spacing is often impossible with vocal music because of the need to accommodate the words.  In this case, don't space all the notes out in proportion to the newly streatched spacing, but do your best to fit them in sensibly.

     
  • Google Importer

    Google Importer - 2012-03-31

    Originally posted by: PhilEHol...@googlemail.com

    They look OK to me.  However, I think I'd try this out with more than one line of music - I suspect the right-flush/ragged-right may be spacing the notes and lyrics differently from how it would be spaced in the middle of the music.

     
  • Google Importer

    Google Importer - 2012-03-31

    Originally posted by: PhilEHol...@googlemail.com

    I was thinking about the la la straight straight example.  That illustrates the problem quite well, but as shown looks like less than a real full line of music.

     
  • Google Importer

    Google Importer - 2012-03-31

    Originally posted by: janek.li...@gmail.com

    The point is that a "real full line of music" is quite often less than a full line.  In other words, what constitutes a full line is a result of stretching something that would naturally be spaced tighter.  The measures don't fit line width perfectly; usually some gap is left which is eliminated by stretching the line.

     
  • Google Importer

    Google Importer - 2012-03-31

    Originally posted by: k-ohara5...@oco.net

    Why no example LilyPond input ? 
    It took a lot of trial-and-error to get a line-spacing that showed the problem.

    \version "2.14"
    \paper { #(set-paper-size "a5") ragged-right=##f }
    << \relative c'' \new Voice {a2.( b4) a8 g2..
        b2.( d,4) e8 g4. g4 b4 |\break
        [r2]. f4 d' c c b b1 [r1]*5 }
    \addlyrics { Oh, free -- dom!  Oh, free -- dom o -- ver
        me ti -- bi com -- mis -- sum, } >>

    Probably the desired change, in my guessed example, would remove the hyphens in 'freedom' and 'commissum'.  In general, it might be wise to try to keep the ideal spacing between note-columns based on the rhythm alone, rather than have lyrics and other bulky decorations influence the 'ideal' spacing (note-spacing.cc:107).

     
  • Google Importer

    Google Importer - 2012-03-31

    Originally posted by: janek.li...@gmail.com

    Keith:
    i posted two source files together with pdf output on nabble (since we're running out of diskspace on tracker) and linked to them in comment #4.  Sorry for not making this more clear.

    Also, here is the code of the la la straight straight example - it's really straightforward:

    \score {
      \relative f' { \repeat unfold 8 a4 }
      \addlyrics { \repeat unfold 4 la \repeat unfold 4 straight }
     
      \layout {
        ragged-right = ##f
      }
    }

     
  • Google Importer

    Google Importer - 2012-04-16

    Originally posted by: k-ohara5...@oco.net

    The guilty code seems to be spring.cc:103 inside merge()
      avg_distance = max (min_distance + 0.3, avg_distance);
    avg_distance is then used as the ideal spacing between columns.

    An interesting experiment to see how the regtests look after removing that line.

    The discussion of the patch to issue 1779 shows a previous attempt to move the 0.3 somewhere more appropriate; it should probably be a property of spaccing-spanner.

     
  • Google Importer

    Google Importer - 2012-04-18

    Originally posted by: janek.li...@gmail.com

    Thanks for suggestion, Keith!
    I did a quick test, but removing that line doesn't seem to change anything in this lyrics issue.  There are changes to the regtests - generally everything gets closer to previous note (sometimes it's good, sometimes bad).
    More details will follow.

     
  • Google Importer

    Google Importer - 2013-12-22

    Originally posted by: janek.li...@gmail.com

    Keith,

    somehow i forgot to post an update to this issue...

    Turns out you were quite right, but it was necessary to remove another similar line.  In branch dev/janek/experimental-fix-for-issue-2462 you can find a commit that does this: http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=commit;h=2eed825e869901991f5068a9d737ffdff5f45bc6

    It turns out that removing these two lines fixes this issue completely (i have since tested it on many scores and i can confirm this), but there are some unwanted side-effects (basically, sometimes elements get too close) - that's why i haven't put it up for review.  But since you're currently looking at spacing engine, you might be able to come up with something.

    Cc: k-ohara5...@oco.net

     
  • Google Importer

    Google Importer - 2013-12-22

    Originally posted by: k-ohara5...@oco.net

    Probably the 'padding and similar options were tweaked with this strange 0.3 in place, so some will need to be adjusted when it is removed.
    I have no motivation to guess which side-effects you consider unwanted.

    Cc: -k-ohara5...@oco.net

     
  • Google Importer

    Google Importer - 2014-06-30

    Originally posted by: janek.li...@gmail.com

    fix Issue 2462.

    there's no description yet, i'd just like to see what Patchy says about this patch.

    http://codereview.appspot.com/108280044

    Labels: Patch-new
    Status: Started

     
  • Google Importer

    Google Importer - 2014-06-30

    Originally posted by: pkx1...@gmail.com

    Patchy the autobot says: passes make, make check and a full make docs.  reg test diffs here - https://www.hightail.com/download/ZUczTGs3TEQ4aVB2WnNUQw

    Labels: -Patch-new Patch-review

     
  • Google Importer

    Google Importer - 2014-06-30

    Originally posted by: lemniska...@gmail.com

    Nice!  All changes look good, except input/regression/autobeam-show-defaults.ly (which seems to be not very problematic) and input/regression/unset-once.ly (which probably is really a different problem that this patch just triggered accidentally).

    I'll look into these two in detail (and post a better description of what i'm doing) later this week.  Thanks!

     
  • Google Importer

    Google Importer - 2014-07-02

    Originally posted by: pkx1...@gmail.com

    Patch on countdown for July 5th 2014

    If this does get pushed can we make sure we have tracker items for the two things that are listed in comment #15 above so we don't forget them?

    Labels: -Patch-review Patch-countdown

     
  • Google Importer

    Google Importer - 2014-07-02

    Originally posted by: janek.li...@gmail.com

    Actually, it turns out that these two files are not really a problem.  My patch introduces slight differencies in spacing, and in case of these two tests thsese spacing changes (which are quite small by themselves) happen to trigger different line breaking.

    With different page layout - for example, when i compile these files separately by hand - output with and without my patch is virtually identical.

     
  • Google Importer

    Google Importer - 2014-07-02

    Originally posted by: janek.li...@gmail.com

    In fact, change in autobeam-show-defaults.ly is for the better.

     
  • Google Importer

    Google Importer - 2014-07-02

    Originally posted by: k-ohara5...@oco.net

    The patch is just one line, but changes something rather fundamental about spacing.
    I am surprised that it has the desired effect, and Janek has not yet explained why it works, so we should take a bit more time to think about it.

    Labels: -Patch-countdown Patch-review

     
  • Google Importer

    Google Importer - 2014-07-04

    Originally posted by: pkx1...@gmail.com

    Leaving Patch on review for now. If there is no change at all (no comments or no update to this Tracker to tell me otherwise) I'll set this back to Needs-work on the next countdown.

     
  • Google Importer

    Google Importer - 2014-07-07

    Originally posted by: pkx1...@gmail.com

    Patch on countdown for July 11th 2014

    Labels: -Patch-review Patch-countdown

     
  • Google Importer

    Google Importer - 2014-07-10

    Originally posted by: pkx1...@gmail.com

    Patch counted down - please push

    Labels: -Patch-countdown Patch-push

     
  • Google Importer

    Google Importer - 2014-07-10

    Originally posted by: janek.li...@gmail.com

    Pushed as

    commit [rab6842155a003ba7d9243507594e3e973ebbb3e4]
    Author: Janek Warchoł <lemniskata.bernoullego@gmail.com>
    Date:   Mon Jun 30 22:14:16 2014 +0200

        Issue 2462: don't change ideal spacing when adding a rod
       
        When objects like lyrics are added to the PaperColumns, LilyPond inserts
        rods between these columns to ensure that the objects won't overlap.
        However, the ideal distance should remain unchanged.  For example, in
       
        \layout {
          ragged-right = ##f
        }
        \relative f' { \repeat unfold 8 a4 }
        \addlyrics { \repeat unfold 4 la \repeat unfold 4 straight }
       
        notes in 2nd measure have long lyrics attached to them - min_distance_
        of the springs between these columns should be adjusted, but distance_
        (the ideal distance) should not: it should be the same as for notes
        with short lyrics.  When the line is stretched so much that the minimum
        distances are not involved, the springs between notes in both measures
        should behave (almost) identical.
       
        Note that there are more such problems in the springs code, for example
        in merge_springs.  The code should be rewritten, but that's not trivial.
        Since this one-liner fixes some instances of the problem without any bad
        side-effects, it makes sense to include it separately.

    Woohoo!  First GSoC issue is officially fixed :)

    Labels: -Patch-push Fixed_2_19_10
    Status: Fixed

     
  • Google Importer

    Google Importer - 2014-07-10

    Originally posted by: janek.li...@gmail.com

    I have opened issue 4006 for the remainder of the spring code problems.

     
  • Google Importer

    Google Importer - 2014-07-18

    Originally posted by: fedel...@gmail.com

    (No comment was entered for this change.)

    Status: Verified