bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Completion_heads_engraver doesn't play nicely with lyric alignment


From: Alexander Kobel
Subject: Re: Completion_heads_engraver doesn't play nicely with lyric alignment
Date: Tue, 21 May 2019 18:37:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Some more investigation:

in Lyric_engraver::process_music, the LyricText's self-alignment-X is set according to lyricMelismaAlignment. If I add a separate check for completionBusy there, things change:

lyric-engraver.cc:84:

  if (last_text_
      && voice
      && (to_boolean (voice->get_property ("melismaBusy"))
          /* the following is new */
          || to_boolean (voice->get_property ("completionBusy")))
      && !to_boolean (context ()->get_property ("ignoreMelismata")))
    last_text_->set_property ("self-alignment-X",
                              get_property ("lyricMelismaAlignment"));

But:

1.) I don't know why this changes anything at all - completionBusy is in the default list of melismaBusyProperties, and I assume that means it *should* be acknowledged by default anyways. Cause apparently, the single "melismaBusy" captures all other properties from that list, including Ties, Slurs, and explicit melisma?

2.) The modified variant is too eager: it also left-aligns non-splitted notes if there are more fine-grained events in a different voice:

\version "2.19.82"

\paper { ragged-last = ##f }

\score {
  <<
    { c'4 c'4 c'4 c'4 c'4 c'4 c'2 }
    { c'4 c'4 c'4 c'4 c'2 c'2 }
    \addlyrics { These should all be center-aligned. __ Right? }
  >>
}

\score {
  <<
    { c'4 c'4 c'4 c'4 c'4 c'4 c'2 }
    { c'4 c'4 c'4 c'4 c'2 c'2 }
    \addlyrics { These should all be center-aligned. __ Right? }
  >>
   \layout {
     \context {
       \Voice
       \remove Note_heads_engraver
       \consists Completion_heads_engraver
     }
   }
}

gives the attached output with the above change in lyric-engraver.cc. So apparently, completionBusy is set because when encountering the first half note, it's not yet clear whether the note *might* be split later on, and that decision is only taken on the moment which doesn't have anything to do with this voice. In other words, completionBusy tells whether the Completion_heads_engraver is running behind the scenes, not whether it actually changes anything.

But in that case, completionBusy should not belong to the melismaBusyProperties?

Something's fishy here, AFAICS...


Cheers,
Alex


On 20.05.19 13:58, Alexander Kobel wrote:
Hi all,

I'd expect the two scores in the following excerpt to be identical, alas they aren't: Notes splitted into tied notes by the Completion_heads_engraver produce melismata as expected, but don't cause the Lyrics to be left-aligned accordingly. (See the attached output.)


\version "2.19.82"

\paper { ragged-last = ##f }

\score {
   { c'4 c'4 c'4 c'4~ c'4 }
   \addlyrics { This should be left-aligned. __ }
}

\score {
   { c'4 c'4 c'4 c'2 }
   \addlyrics { This should be left-aligned. __ }
   \layout {
     \context {
       \Voice
       \remove Note_heads_engraver
       \consists Completion_heads_engraver
     }
   }
}


Unfortunately, this seems to imply that there is no easy/clean way to produce a Mensurstriche layout and a "standard" layout with splitted notes from the same source. In case this is a known (but, in this case, AFAICS undocumented) flaw, or unlikely to have an easy fix: I'd be happy to hear about an workaround for same-source ditions, if someone has one in mind.


Cheers,
Alex

_______________________________________________
bug-lilypond mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Attachment: example2.png
Description: PNG image

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]