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

Issue 108270044: Issue 2245: always align dynamics and lyrics on "main" notehead (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by janek
Modified:
9 years, 9 months ago
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

NOTE: =============================================== Since this patch depends on patch for https://code.google.com/p/lilypond/issues/detail?id=3978 (https://codereview.appspot.com/105410046), i have uploaded that code as "Patchset 1". So, the actual patch will be in the following patchsets, starting with 2. ===================================================== Issue 2245: always align dynamics and lyrics on "main" notehead Until now, LyricTexts and DynamicTexts had their X-parents set to the first NoteHead in the NoteColumn. This resulted in inconsistent alignment - placement of lyrics and dynamics depended on the order of notes in the input: % this was aligned differently { <f' g'>1\p <g' f'>\p } \addlyrics { la la } By using NoteColumns themselves as the X-parents, we make sure that the input order won't matter. Since the NoteColumn contains all NoteHeads (including suspended ones, which usually should be ignored when aligning), we add a function for calculating X-extent of the "main" part of the NoteColumn, i.e. without suspended NoteHeads.

Patch Set 1 #

Patch Set 2 : Actual patch - always align dynamics and lyrics on "main" notehead #

Patch Set 3 : don't segfault when there are no stems. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -110 lines) Patch
A input/regression/input-order-alignment.ly View 1 1 chunk +25 lines, -0 lines 0 comments Download
M input/regression/text-spanner-attachment-alignment.ly View 1 chunk +1 line, -1 line 1 comment Download
M lily/dynamic-engraver.cc View 1 1 chunk +3 lines, -6 lines 0 comments Download
M lily/fingering-engraver.cc View 1 chunk +1 line, -2 lines 0 comments Download
M lily/include/note-column.hh View 1 1 chunk +1 line, -0 lines 0 comments Download
M lily/include/self-alignment-interface.hh View 1 chunk +1 line, -3 lines 0 comments Download
M lily/lyric-engraver.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M lily/new-fingering-engraver.cc View 1 chunk +2 lines, -4 lines 0 comments Download
M lily/note-column.cc View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M lily/self-alignment-interface.cc View 1 3 chunks +10 lines, -32 lines 0 comments Download
M ly/engraver-init.ly View 1 chunk +0 lines, -7 lines 0 comments Download
M scm/define-grob-properties.scm View 1 1 chunk +2 lines, -0 lines 0 comments Download
M scm/define-grobs.scm View 1 11 chunks +18 lines, -54 lines 3 comments Download

Messages

Total messages: 15
janek
Since this patch depends on patch for https://code.google.com/p/lilypond/issues/detail?id=3978 (https://codereview.appspot.com/105410046), i have uploaded that code as ...
9 years, 10 months ago (2014-06-29 23:25:50 UTC) #1
janek
Actual patch - always align dynamics and lyrics on "main" notehead
9 years, 10 months ago (2014-06-29 23:27:16 UTC) #2
janek
Hi folks, please review. @Han-Wen: in Script_engraver, you wrote (commit 286fcad779) that aligning stuff like ...
9 years, 10 months ago (2014-06-29 23:40:25 UTC) #3
janek
don't segfault when there are no stems.
9 years, 10 months ago (2014-06-30 18:41:21 UTC) #4
Mark Polesky
This patch is problematic for me. Firstly, when a lyric syllable extends to the next ...
9 years, 10 months ago (2014-07-01 19:35:38 UTC) #5
janek
Hi, 2014-07-01 21:35 GMT+02:00 <markpolesky@gmail.com>: > This patch is problematic for me. > > Firstly, ...
9 years, 9 months ago (2014-07-02 06:27:15 UTC) #6
Mark Polesky
Janek Warchoł wrote: > While I think that it's better to always align lyrics to ...
9 years, 9 months ago (2014-07-02 18:58:11 UTC) #7
janek
Hi, 2014-07-02 20:58 GMT+02:00 <markpolesky@gmail.com>: > Janek Warchoł wrote: >> >> While I think that ...
9 years, 9 months ago (2014-07-02 19:22:30 UTC) #8
janek
PS 2014-07-02 20:58 GMT+02:00 <markpolesky@gmail.com>: > Okay, this is less problematic than I thought it ...
9 years, 9 months ago (2014-07-02 19:26:11 UTC) #9
janek
Hi Mark, do you have any objections against putting this patch on countdown? As i ...
9 years, 9 months ago (2014-07-04 20:47:24 UTC) #10
Mark Polesky
On 2014/07/04 20:47:24, janek wrote: > Hi Mark, > > do you have any objections ...
9 years, 9 months ago (2014-07-04 21:21:47 UTC) #11
janek
2014-07-04 23:21 GMT+02:00 <markpolesky@gmail.com>: > On 2014/07/04 20:47:24, janek wrote: >> Hi Mark, >> do ...
9 years, 9 months ago (2014-07-04 21:40:00 UTC) #12
david.nalesnik
https://codereview.appspot.com/108270044/diff/40001/scm/define-grobs.scm File scm/define-grobs.scm (right): https://codereview.appspot.com/108270044/diff/40001/scm/define-grobs.scm#newcode87 scm/define-grobs.scm:87: (X-extent . ,ly:accidental-interface::width) The old code is used as ...
9 years, 9 months ago (2014-07-05 12:24:36 UTC) #13
Keith
https://codereview.appspot.com/108270044/diff/40001/scm/define-grobs.scm File scm/define-grobs.scm (right): https://codereview.appspot.com/108270044/diff/40001/scm/define-grobs.scm#newcode87 scm/define-grobs.scm:87: (X-extent . ,ly:accidental-interface::width) I opened a tracker item http://code.google.com/p/lilypond/issues/detail?id=3993 ...
9 years, 9 months ago (2014-07-05 18:26:10 UTC) #14
janek
9 years, 9 months ago (2014-07-08 07:22:29 UTC) #15
Pushed as 

commit 59a842eba0f7ad78289a58a7dfa8fa786cdf11ed
Author: Janek Warchoł <lemniskata.bernoullego@gmail.com>
Date:   Wed Mar 27 17:20:03 2013 +0100

    Issue 2245: always align dynamics and lyrics on "main" notehead
    
    Until now, LyricTexts and DynamicTexts had their X-parents set to
    the first NoteHead in the NoteColumn.  This resulted in inconsistent
    alignment - placement of lyrics and dynamics depended on the order
    of notes in the input:
    
    % this was aligned differently
    { <f' g'>1\p <g' f'>\p }
    \addlyrics { la la }
    
    By using NoteColumns themselves as the X-parents, we make sure that
    the input order won't matter.  Since the NoteColumn contains all NoteHeads
    (including suspended ones, which usually should be ignored when aligning),
    as well as Flags and some other objects, we cannot use its X-extent directly
-
    instead, we add a function for calculating X-extent of the "main" part of
the
    NoteColumn, i.e. X-extent of the non-suspended NoteHeads (represented by the
    NoteHead furthest away from the stem).


Thanks for review!
Sign in to reply to this message.

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