Menu

#4509 Enhancement: automatically engrave lyric extenders

Started
None
needs_work
Enhancement
2017-08-24
2015-07-18
Anonymous
No

Originally created by: *anonymous

Originally created by: simon.al...@mail.de

Actually, this is a content vs. presentation issue. The current approach has lyric extenders ‘hardcoded’ within the lyricmode input, whereas often it depends on layout whether I want an extender printed or not:
– In tight horizontal spacing, we might not need an extender, but when spacing is stretched, it might become necessary. This can come through different (page/line) breaking, parallel contexts present only in some editions (part vs. score), Completion_heads_engraver (mensural without barlines/transcription with barlines).
– Long syllables might not need an extender, where short syllables do.
– Often, all voices share the same text, but have extenders in different places. If extenders need not be given explicitly, the lyricmode input code can be reused much easier.

After all, the extenders don’t add any additional meaning, but only serve to improve legibility in such cases where they do.

This would require:
– Recognising the end of a word by absence of a hyphen.
– Comparing printed length of the melisma notes vs. the syllable, likely after line breaking. After all, extenders will never influence horizontal spacing. They might, however, affect vertical spacing. (unless we chose to omit (or shift) the extender in that case?)
– Personally, I think very short extenders shouldn’t be printed. There should be some kind of threshold.
It’s also one of the usecases where a proper representation of a ‘lyric word’ would be helpful, along with issue 2458.

Possibly related:
issue 4098

Version 2.12 had this listed as a Known issue.

https://codereview.appspot.com/313240043 )

1 Attachments

Related

Issues: #2458
Issues: #4098
Issues: #5018

Discussion

<< < 1 2 3 4 5 > >> (Page 3 of 5)
  • Anonymous

    Anonymous - 2017-01-15
    • Patch: review --> needs_work
     
  • Anonymous

    Anonymous - 2017-01-15

    Patch doesn't apply to current master. You may need to simply rebase.

     
    • Knut Petersen

      Knut Petersen - 2017-01-15

      Please test

      current master
      + patchset 4 found at https://codereview.appspot.com/313240043
      + 0001-Mark-EXTENDER-parser-token-depracted.patch
      + 0001-Don-t-emit-lyric-extenders-with-zero-or-negative-len.patch

       
  • Knut Petersen

    Knut Petersen - 2017-01-15

    This patch solves the problem of too long extenders in case of grace notes following after an extender.

    current master
    + patchset 4 found at https://codereview.appspot.com/313240043
    + 0001-Mark-EXTENDER-parser-token-depracted.patch
    + 0001-Don-t-emit-lyric-extenders-with-zero-or-negative-len.patch
    + 0001-Fix-lyric-extender-grace-note-problem.patch

     

    Last edit: Knut Petersen 2017-01-15
  • Knut Petersen

    Knut Petersen - 2017-01-15

    Full patchset against current master.

    I think this is ready for release.

     
  • Knut Petersen

    Knut Petersen - 2017-01-15

    Test file and resulting pdf

     
  • Trevor Daniels

    Trevor Daniels - 2017-01-15

    The latest patch set at Reitveld (patchset 4 https://codereview.appspot.com/313240043 ) is dated 1 Jan. Have you not uploaded these more recent patches yet?

    Trevor

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-15

    Knut doesn't have a Rietveld account. I'll upload the patch there in a few minutes.

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-15

    Automatic lyric extenders - patchset 2017-01-15

    http://codereview.appspot.com/313240043

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-15
     
  • Alexander Kobel

    Alexander Kobel - 2017-01-15

    Hi,

    current patchset is uploaded on Rietveld, as well as regtests without __. Should be sufficient for a proper review; I couldn't do it yet, but I will scan the docs for occurences __ asap.

     
  • Anonymous

    Anonymous - 2017-01-17
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +Selection_005.png (263.8 kB; image/png)
    
    • Needs: -->
    • Patch: new --> review
    • Type: --> Enhancement
     
    • Knut Petersen

      Knut Petersen - 2017-01-17

      All is expected behaviour. You may note that in lyric-combine.ly not only a missing extender has been added but that a too long extender is shortened to the correct length.

       
  • Anonymous

    Anonymous - 2017-01-17

    Passes make, make check and a full make doc. Reg test diff attached for one piece of output but I am still seeing:

    @@ -1,6 +1,38 @@
     Processing `./display-lily-tests.ly'
     Parsing...
     Renaming input to: `/home/jlowe/lilypond-git/input/regression/display-lily-tests.ly'
    +/home/jlowe/lilypond-git/input/regression/display-lily-tests.ly:94:1: warning: Test unequal: BUG.
    +in  = \lyrics { a b }
    +out = \lyrics { a __ b __ }
    +
    +
    +\test ##[ \lyrics { a b } #]
    +/home/jlowe/lilypond-git/input/regression/display-lily-tests.ly:95:1: warning: Test unequal: BUG.
    +in  = \lyricmode { a -- b }
    +out = \lyricmode { a -- b __ }
    +
    +
    +\test ##[ \lyricmode { a -- b } #]         % HyphenEvent
    +/home/jlowe/lilypond-git/input/regression/display-lily-tests.ly:96:1: warning: Test unequal: BUG.
    +in  = \lyricmode { "a " }
    +out = \lyricmode { "a " __ }
    +
    +
    +\test ##[ \lyricmode { "a " } #]           % LyricEvent
    +/home/jlowe/lilypond-git/input/regression/display-lily-tests.ly:97:1: warning: Test unequal: BUG.
    +in  = \lyricsto "foo" { bla bla  }
    +out = \lyricsto "foo" { bla __ bla __  }
    +
    +
    +\test ##[ \lyricsto "foo" { bla bla  } #]      % LyricCombineMusic
    +/home/jlowe/lilypond-git/input/regression/display-lily-tests.ly:98:1: warning: Test unequal: BUG.
    +in  = { { c4 d4 }
    +  \addlyrics { bla bla  } }
    +out = { { c4 d4 }
    +  \addlyrics { bla __ bla __  } }
    +
    +
    +\test ##[ { { c4 d4 }
     Interpreting music...Test unequal: NOT A BUG.
     in  = \relative { c'4 b4 }
     out = { c'4 b4 }
    
    input/regression/display-lily-tests.log
    
     
    • Knut Petersen

      Knut Petersen - 2017-01-17

      That is expected behaviour.

       
  • Alexander Kobel

    Alexander Kobel - 2017-01-17

    Well, it is expected but not a good solution anyway: \displayLilyMusic certainly should not emit a deprecated and superfluous token. We need to redefine the display-method for an ExtenderEvent as

    (define-display-method ExtenderEvent (event) "")
    

    in scm/define-music-display-methods.scm. Will comit that in a sec.

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-17

    hide deprecated token for ExtenderEvents in \displayLilyMusic

    http://codereview.appspot.com/313240043

     
  • Knut Petersen

    Knut Petersen - 2017-01-17

    Thanks for help.

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-17

    purge superfluous __ from Lilypond code

    http://codereview.appspot.com/313240043

     
  • Anonymous

    Anonymous - 2017-01-19
    • Needs: -->
    • Patch: new --> review
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2017-01-19

    Passes make, make check and a full make doc - the reg test diff images are teh same as before (already attached) no more of those 'warning: Test unequal: BUG.' message appear though.

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-19

    Thanks. I agree with Knut and confirm that the output differences in the regtest images are expected and desired.

     
  • Anonymous

    Anonymous - 2017-01-21
    • Patch: review --> needs_work
     
  • Anonymous

    Anonymous - 2017-01-21

    This looks to me from Knut and Davids conversation on Rietveld that there is more work needed? I will set this back to 'Needs Work' (if I am wrong this patch can go on countdown for Jan 23rd).

     
  • Alexander Kobel

    Alexander Kobel - 2017-01-23

    let __ return SCM_UNSPECIFIED; minor change in deprecation warning

    http://codereview.appspot.com/313240043

     
<< < 1 2 3 4 5 > >> (Page 3 of 5)