lilypond-devel
[Top][All Lists]
Advanced

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

Re: Remove tied accidentals after line-breaking (issue 46060045)


From: k-ohara5a5a
Subject: Re: Remove tied accidentals after line-breaking (issue 46060045)
Date: Wed, 06 Aug 2014 05:08:37 +0000

This clears up issues 3749 and 3646 but my motivation was to avoid the
excessive font-lookups for accidentals.  For example
\transpose c cis { cisis } generates 5 error messages, one for each
attempt to lookup a triple sharp.

The Accidental.stencil callback had responsibility to delete the
Accidental grob if a tie made the accidental unnecessary.  So any
overrides to the stencil would need to replicate that logic, and the
stencil could not be safely used for spacing purposes before
line-breaking.

Better to move this responsibility to a function called once after
line-breaking.

On 2014/08/05 07:42:05, dak wrote:
Does this approach give us better insights or leads how to
  address issue 649?

No real help for addressing the question of a later accidental that is
unnecessary depending on whether an accidental is printed on a tied
note.

The accidental engraver would still need to make the links between the
later accidental and any accidentals on tied notes a that affect the
later accidental.   Right now, the engraver records the answers to "what
alteration would this notename have if printed without an accidental?"
which is usually a fractional alteration, but the symbol 'tied if the is
ambiguous due the possibility of removing a tied Accidental.  That
record would need to be extended to let the later Accidental get a
pointer back to the tied Accidental.  Doing this in the general case
looks like an interesting problem.

If the engraver can record in each Accidental a link to any Accidentals
it depends upon, then remove_tied() can be extended to act on that
information.


https://codereview.appspot.com/46060045/diff/60001/input/regression/accidental-unbroken-tie-spacing.ly
File input/regression/accidental-unbroken-tie-spacing.ly (right):

https://codereview.appspot.com/46060045/diff/60001/input/regression/accidental-unbroken-tie-spacing.ly#newcode6
input/regression/accidental-unbroken-tie-spacing.ly:6: \version "2.16.0"
should be 2.19.12-ish

https://codereview.appspot.com/46060045/diff/60001/input/regression/accidental-unbroken-tie-spacing.ly#newcode20
input/regression/accidental-unbroken-tie-spacing.ly:20:
(make-fraction-markup (number->string (numerator alt))
I'll use
\relative c' {
  \clef treble \time 3/4
  c8 b2  <g b des f>8 ~ |
  <g b des f>8 r
  % Large accidental
  \override Staff.Accidental.stencil = #
  (lambda (g)
    (let ((alt (ly:grob-property g 'alteration)))
      (grob-interpret-markup g
        (make-circle-markup (number->string alt)))))
  bes4 ~ bes ~ | bes ~ bes bes ~ | \break
  bes ~ bes bes
}

https://codereview.appspot.com/46060045/



reply via email to

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