Menu

#1311 New spacing code affects user-created pseudo-staff contexts

Verified
nobody
Defect
2011-02-03
2010-10-10
Anonymous
No

Originally created by: *anonymous

Originally created by: v.villenave
Originally owned by: Carl.D.S...@gmail.com

%% In the following example, a pseudo-staff context (LyricStaff) is created
%% by the user.  However, the code that used to work with 2.12.3 now
%% produces an unwanted vertical space with 2.13.*.  See attached.

melody = \relative c' {
  d1
}

mylyrics = \lyricmode {
  aaa
}

\layout {
  \context {
    \Staff
    \name LyricStaff
    \alias Staff
    \override StaffSymbol #'line-count = #0
    \override StaffSymbol #'Y-extent = ##f
    \remove Clef_engraver
    \remove Ledger_line_engraver
    \remove Key_engraver
    \remove Time_signature_engraver
  }
  \context {
    \ChoirStaff
    \accepts LyricStaff
  }
}
\score {
  \new ChoirStaff <<
    \new Staff \new Voice = sopranos \melody
    \new LyricStaff \new Lyrics \lyricsto sopranos \mylyrics
    \new Staff \new Voice \melody
  >>
}

%% From an old bug report: http://old.nabble.com/big-space-added-between-treble-clef-and-lyrics-ts26621102.html

2 Attachments

Discussion

  • Google Importer

    Google Importer - 2010-11-07

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

    Valentin, or anyone familiar this style,
    Is this proper Lilypond input, and what was the intent? 
    Simply removing [[ \new LyricStaff ]] gives a compact staff in both 2.12.3 and 2.13.38.

    Presumably the LyricStaff was intended to contain something.  It will contain the Lyrics if one adds "\accepts Lyrics" to its definition, which centers the Lyrics but still puts a large space between staves (in both 2.12.3 and 2.13.38).

     
  • Google Importer

    Google Importer - 2010-11-07

    Originally posted by: v.villenave

    You are right, my report wasn't entirely clear. Perhaps LyricStaff wasn't the most appropriate name: my point was only to demonstrate that a user-created staff-like context that used to not take any vertical space, now does.

    You are right to point out that the lyrics aren't actually created *inside* the pseudo-staff context, but below; however these do show that the pseudo-staff context, even though its Y-extent is set to nil, does now take unwanted vertical space.

    Attached are the files that the original reporter sent me; even though his coding style is questionable in some regards, it does behave a lot differently with 2.12.3 and 2.13.*, and not for the best.

     
  • Google Importer

    Google Importer - 2010-11-07

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

    You should set staff-affinity (or whatever the new name is) on the newly defined context. Otherwise it will be spaced like a staff (with minimum-distance, etc.)

     
  • Google Importer

    Google Importer - 2010-11-08

    Originally posted by: v.villenave

    I suspected as much.  (What actually surprises me is that it didn't produce vertical space with 2.12.)  The real problem here is that people whose code used to work with 2.12.3 may find themselves with suboptimal output when switching to 2.14.

    Is there a way convert-ly can do it automatically, or at least print a NOT_SMART warning? (e.g. when detecting an \alias Staff or something?)  Or we can just add a changes.tely item for staff-affinity so that we can tell unhappy users to RTFChangelog.  What would you do?

     
  • Google Importer

    Google Importer - 2010-11-18

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

    In the full example attached to this issue, the LyricStaff did nothing. It had no \accepts Lyrics, so 2.12 placed the Lyrics below the LyricStaff and then made LyricStaff silently disappear.  Hard to see how convert-ly could have helped in this case.

    That example does produce a 'vertical spacing has changed' NOT_SMART message, due to the use of minimum-Y-extent to try to change staff-like spacing, but this was directed toward a ChordNames not the LyricStaff.  That warning will help some users.

    Would it be wise to suggest one consider staff-affinity wherever convert-ly sees \type "Engraver_Group"?  The only Engraver_Group defined in the .ly files at mutopiaproject.org is Dynamics, which is auto-converted.  Can anyone estimate whether such a message would cause more enlightenment than confusion?

     
  • Google Importer

    Google Importer - 2011-01-24

    Originally posted by: Carl.D.S...@gmail.com

    It seems to me that the new templates should resolve this issue as well.

    The proper recommendation is for the user to make the code comply with the new recommendations.  It may not be trivial for them to do it, but it will be possible.

    When code does not follow existing recommendations, it seems that trying to avoid breakage is virtually impossible.  After all, LilyPond does include a Scheme interpreter....

    I propose that the fix to 1483 and 1486 will cover this issue.  Updated templates that describe the *proper* ways to put lyrics with staves should allow an interested user to resolve this problem.

    Owner: Carl.D.Sorensen
    Status: Started

     
  • Google Importer

    Google Importer - 2011-01-25

    Originally posted by: Carl.D.S...@gmail.com

    Fixed with proper templates for new spacing in Notation Reference and Learning Manual.

    Pushed in commit
    [rcb03a19174fd9245008176716742e1a2eb3a0b93]

    No regression test for this issue; the proper response to the issue is to follow the new templates.

    Labels: fixed_2_13_47
    Status: Fixed

     
  • Google Importer

    Google Importer - 2011-02-03

    Originally posted by: pnorcks@gmail.com

    Looks fine.

    (The changes.tely entry was a very good idea!)

    Status: Verified

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.