Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(423)

Issue 46060045: Remove tied accidentals after line-breaking

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 4 months ago by Keith
Modified:
9 years, 8 months ago
Reviewers:
pkx166h, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Remove tied accidentals after line-breaking

Patch Set 1 #

Patch Set 2 : regression test #

Total comments: 2

Patch Set 3 : rebase #

Patch Set 4 : no longer need dynamic_cast, longer regtest #

Total comments: 3

Patch Set 5 : remove obsolete functions #

Patch Set 6 : version #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -68 lines) Patch
M input/regression/accidental-unbroken-tie-spacing.ly View 1 chunk +12 lines, -4 lines 0 comments Download
M lily/accidental.cc View 4 chunks +26 lines, -55 lines 0 comments Download
M lily/include/accidental-interface.hh View 1 chunk +2 lines, -3 lines 0 comments Download
M lily/item.cc View 1 chunk +0 lines, -1 line 0 comments Download
M lily/tie-formatting-problem.cc View 1 chunk +1 line, -1 line 0 comments Download
M scm/define-grobs.scm View 5 chunks +3 lines, -2 lines 0 comments Download
M scm/output-lib.scm View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 6
Keith
https://codereview.appspot.com/46060045/diff/20001/lily/accidental.cc File lily/accidental.cc (right): https://codereview.appspot.com/46060045/diff/20001/lily/accidental.cc#newcode46 lily/accidental.cc:46: Probably the next three callbacks can be removed, letting ...
10 years, 4 months ago (2013-12-28 05:45:36 UTC) #1
Keith
LGTM
9 years, 9 months ago (2014-08-02 18:56:19 UTC) #2
dak
On 2014/08/02 18:56:19, Keith wrote: > LGTM Cannot find the corresponding Google Code issue.
9 years, 9 months ago (2014-08-02 19:26:11 UTC) #3
pkx166h
On 2014/08/02 19:26:11, dak wrote: > On 2014/08/02 18:56:19, Keith wrote: > > LGTM > ...
9 years, 9 months ago (2014-08-02 20:02:41 UTC) #4
dak
Does this approach give us better insights or leads how to address issue 649? https://codereview.appspot.com/46060045/diff/60001/input/regression/accidental-unbroken-tie-spacing.ly ...
9 years, 9 months ago (2014-08-05 07:42:05 UTC) #5
Keith
9 years, 9 months ago (2014-08-06 05:08:37 UTC) #6
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/accidenta...
File input/regression/accidental-unbroken-tie-spacing.ly (right):

https://codereview.appspot.com/46060045/diff/60001/input/regression/accidenta...
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/accidenta...
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
}
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b