Menu

#127 'Dead' contexts affect lyric placement for 'next' instance of musical expression

Accepted
nobody
None
Ugly
2015-09-14
2006-10-27
Anonymous
No

Originally created by: *anonymous

Originally created by: *anonymous

Originally created by: gpermus@gmail.com

% Mats reports that:

%  picture included
\version "2.9.26"
musicwithlyrics = <<
  \relative c' {c d e f }
  \context Lyrics = mylyrics \lyricmode { Here is some text }
>>
\score {
  \relative c' { c1 \musicwithlyrics c1 \musicwithlyrics }
}

After the first \musicwithlyrics, the mylyrics context dies, since there
are no musical events in that context directly following. However,
LilyPonds still remembers that there was a context there, so the next
time the new incarnation of the same context is created, it is placed
further from the stave. I know that this is normal behaviour if there
are different Lyrics contexts, but I here I tried to avoid this problem
by explicitly naming the context to get the same one again, but it doesn't
help.
Of course, one solution is to keep the context alive over the full piece,

\score {
  <<
    \relative c' { c1 \musicwithlyrics c1 \musicwithlyrics }
    \context Lyrics = mylyrics {s1*4}
  >>
}

but such solutions are inconvenient to say the least.

Actually, in a way it would be more intuitive if LilyPond never
reserved the vertical space of a dead context to the end of the line,
so that for example
\repeat unfold 3 \new Staff { c'1 }
ended up on a single line instead of the current stair case result.
For the few cases where you really want the current behaviour,
it's not hard to add spacer rests to keep contexts alive.

1 Attachments

Discussion

  • Google Importer

    Google Importer - 2007-01-02

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

    fixed with 2.11 skyline changes.

    Status: Fixed

     
  • Google Importer

    Google Importer - 2007-01-03

    Originally posted by: gpermus@gmail.com

    (No comment was entered for this change.)

    Status: Verified

     
  • Google Importer

    Google Importer - 2007-03-02

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

    In version 2.11.20, the same bug is present.

    Labels: -Priority-Low Priority-Medium

     
  • Google Importer

    Google Importer - 2007-03-02

    Originally posted by: gpermus@gmail.com

    Since this used to work, I'd call it a regression instead of simply a medium bug.

    Labels: -Priority-Medium Priority-Regression

     
  • Google Importer

    Google Importer - 2007-03-02

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

    In which versions did it work?

     
  • Google Importer

    Google Importer - 2007-03-09

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

    (No comment was entered for this change.)

    Status: Accepted

     
  • Google Importer

    Google Importer - 2007-09-06

    Originally posted by: gpermus@gmail.com

    It definitely works in 2.11.10, and definitely does not work in 2.11.32. Sorry for the large gap in version numbers, but I have a lot of bugs to catch up on. :(

    Labels: -Type-Enhancement Type-Defect

     
  • Google Importer

    Google Importer - 2007-09-30

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

    joe?

    Cc: joeneeman

     
  • Google Importer

    Google Importer - 2007-10-01

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

    Not a regression, IMO. It has never worked in a stable version and it never worked properly in a devel version either, as the attached image shows (from 2.11.10). The fact that it appeared to work at all was a bug in the VerticalAlignment skyline stuff. Furthermore, the positioning in 2.11.10 had nothing to do with the fact that the contexts had the same name, it was just trying to shove everything up as high as possible.

    Labels: -Type-Defect -Priority-Regression Type-Enhancement Priority-Medium

     
  • Google Importer

    Google Importer - 2008-05-30

    Originally posted by: v.villenave

    (Reproduced in 2.11.47)

     
  • Google Importer

    Google Importer - 2008-06-11

    Originally posted by: v.villenave

    Issue 437 demonstrates another annoyance due to this limitation:

    \context Staff = "one" \relative {
      c1 |
      <<
        { d1 }
        \context Staff = "foo" \with { alignAboveContext = "one" }
        { g4 a }
      >> |
      <<
        { e1 }
        \context Staff = "foo" \with { alignAboveContext = "one" }
        { a4 g }
      >> |
    }
    
     

    Related

    Issues: #437

  • Google Importer

    Google Importer - 2010-12-19

    Originally posted by: n.putt...@gmail.com

    Issue 1449 has been merged into this issue.

     

    Related

    Issues: #1449

  • Google Importer

    Google Importer - 2011-09-16

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

    This is still an issue in 2.15.11:

    --snip--
    After the first \musicwithlyrics, the mylyrics context dies, since there are no musical events in that context directly following. However, LilyPonds still remembers that there was a context there, so the next time the new incarnation of the same context is created, it is placed further from the staff.

    Slightly modified example to show that it isn't necessarily the identical music expressions that influence this.

    \version "2.15.11"
    musicwithlyrics = <<
      \relative c' {c d e f }
      \context Lyrics = mylyrics \lyricmode { Here is some text }
    >>
    
    musicwithmorelyrics = <<
      \relative c' { c d e f g }
      \context Lyrics = mylyrics \lyricmode { Here is some more text }
    >>
    \score {
      \relative c' { c1 \musicwithlyrics c1 \musicwithmorelyrics }
    }
    

    Summary: 'Dead' contexts affect lyric placement for 'next' instance of musical expression
    Owner: ---
    Labels: -Type-Enhancement -Priority-Medium Type-Ugly
    Cc: -joenee...@gmail.com

     
  • Simon Albrecht

    Simon Albrecht - 2015-09-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,15 +4,18 @@
    
     % Mats reports that:
    
    -%&nbsp; picture included
    +~~~~
    +:::TeX
    +%  picture included
     \version "2.9.26"
    -musicwithlyrics = &lt;&lt;
    - \relative c'\{c d e f\}
    - \context Lyrics =mylyrics \lyricmode \{Here is some text \}
    -&gt;&gt;
    -\score\{
    -\relative c'\{ c1 \musicwithlyrics c1 \musicwithlyrics \}
    -\} 
    +musicwithlyrics = <<
    +  \relative c' {c d e f }
    +  \context Lyrics = mylyrics \lyricmode { Here is some text }
    +>>
    +\score {
    +  \relative c' { c1 \musicwithlyrics c1 \musicwithlyrics }
    +}
    +~~~~
    
     After the first \musicwithlyrics, the mylyrics context dies, since there
     are no musical events in that context directly following. However,
    @@ -23,18 +26,22 @@
     by explicitly naming the context to get the same one again, but it doesn't
     help.
     Of course, one solution is to keep the context alive over the full piece,
    -\score\{
    -&lt;&lt;
    -\relative c'\{ c1 \musicwithlyrics c1 \musicwithlyrics \}
    -\context Lyrics = mylyrics \{s1\*4\}
    -&gt;&gt;
    -\}
    +
    +~~~~
    +:::TeX
    +\score {
    +  <<
    +    \relative c' { c1 \musicwithlyrics c1 \musicwithlyrics }
    +    \context Lyrics = mylyrics {s1*4}
    +  >>
    +}
     but such solutions are inconvenient to say the least.
    +~~~~
    
     Actually, in a way it would be more intuitive if LilyPond never
     reserved the vertical space of a dead context to the end of the line,
     so that for example
    -\repeat unfold 3 \new Staff \{ c'1\}
    +`\repeat unfold 3 \new Staff { c'1 }`
     ended up on a single line instead of the current stair case result.
     For the few cases where you really want the current behaviour,
    -it's not hard to add spacer notes to keep contexts alive.
    +it's not hard to add spacer rests to keep contexts alive.
    
    • Needs: -->
    • Patch: -->
     
  • Simon Albrecht

    Simon Albrecht - 2015-09-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -35,8 +35,8 @@
         \context Lyrics = mylyrics {s1*4}
       >>
     }
    +~~~~
     but such solutions are inconvenient to say the least.
    -~~~~
    
     Actually, in a way it would be more intuitive if LilyPond never
     reserved the vertical space of a dead context to the end of the line,
    
     

Log in to post a comment.