|
|
Created:
7 years, 8 months ago by pkx166h Modified:
7 years, 8 months ago CC:
lilypond-devel_gnu.org, richard_rshann.plus.com Visibility:
Public. |
DescriptionCentering bass figures on whole notes and longer
This is a patch that fixes
the centering of single bass
figures over notes of duration
whole note and more.
The duration is tested and a
translate applied horizontally
if needed.
Patch Set 1 #
MessagesTotal messages: 15
I'm afraid this patch does not fix the problem as wished. See my comment on the tracker: https://sourceforge.net/p/testlilyissues/issues/5154/#1933
Sign in to reply to this message.
On Sat, 2017-07-15 at 00:09 -0700, thomasmorley65@gmail.com wrote: > I'm afraid this patch does not fix the problem as wished. It solves the problem of single bass figures and isolated accidentals on notes of duration longer than whole note as the comment says. You give an example of multiple bass figures on a note, I'm not sure what you would wish to see for that case, but what LilyPond does in that case is quite readable - I can't suggest any improvement for that case. I wouldn't want to see the whole group of figures centered on the note centre since they would seem to start before the note - I'm not sure what the 19th c academic style might be... Richard
Sign in to reply to this message.
On 2017/07/15 07:25:37, richard_rshann.plus.com wrote: > On Sat, 2017-07-15 at 00:09 -0700, mailto:thomasmorley65@gmail.com wrote: > > I'm afraid this patch does not fix the problem as wished. > You give an example of multiple bass figures on a note, I'm not sure > what you would wish to see for that case, In << \relative c' { c1 c1 } \figures { <6+>2 <6+>2 <6+>1 } >> I would expect same aligning for first and second BassFigure related to the note.
Sign in to reply to this message.
On 2017/07/15 07:40:01, thomasmorley651 wrote: > On 2017/07/15 07:25:37, http://richard_rshann.plus.com wrote: > > On Sat, 2017-07-15 at 00:09 -0700, mailto:thomasmorley65@gmail.com wrote: > > > I'm afraid this patch does not fix the problem as wished. > > > You give an example of multiple bass figures on a note, I'm not sure > > what you would wish to see for that case, > > In > << > \relative c' { c1 c1 } > \figures { <6+>2 <6+>2 <6+>1 } > >> > I would expect same aligning for first and second BassFigure related to the > note. Aargh, should read: I would expect same aligning for first and third BassFigure
Sign in to reply to this message.
On 2017/07/15 07:51:11, thomasmorley651 wrote: > On 2017/07/15 07:40:01, thomasmorley651 wrote: > > > > In > > << > > \relative c' { c1 c1 } > > \figures { <6+>2 <6+>2 <6+>1 } > > >> > > I would expect same aligning for first and second BassFigure related to the > > note. > > Aargh, should read: > I would expect same aligning for first and third BassFigure I think it quite unusual to have a figure without a note. But the other way round (note without figure) is very common and leads to the same problem of the length of the figure being different from the length of the note it purportedly aligns to.
Sign in to reply to this message.
On Sat, 2017-07-15 at 00:40 -0700, thomasmorley65@gmail.com wrote: > On 2017/07/15 07:25:37, richard_rshann.plus.com wrote: > > On Sat, 2017-07-15 at 00:09 -0700, mailto:thomasmorley65@gmail.com > wrote: > > > I'm afraid this patch does not fix the problem as wished. > > > You give an example of multiple bass figures on a note, I'm not sure > > what you would wish to see for that case, > > In > << > \relative c' { c1 c1 } > \figures { <6+>2 <6+>2 <6+>1 } > > I would expect same aligning for first and second BassFigure related to > the note. (understood: first and second *group* of bass figures) That would be ok, although when you have multiple figures on a note allowing a bit more space for them can be good sometimes. You could always move the whole group along by inserting a short duration note with no figure in the bass figures if there was a particular case where this seemed obtrusive (hacky of course). So I think you could validly object that you didn't like them being treated differently. But that wouldn't justify sticking with the horrible effect you see when there is a single figure/lone accidental. Richard
Sign in to reply to this message.
On 2017/07/15 08:06:41, richard_rshann.plus.com wrote: > So I think you could validly object that you didn't like them being > treated differently. If you look at the following, namely the colored BassFigures cbf = \once \override BassFigure.color = #red << \relative c' { c1 c8 d e f g f e d c1 c1 } \figures { <_!>2 <_!>2 \cbf <_!>1 <_!>2 <_!>2 \cbf <_!>1 } >> You'll see your patch improves the second colored BassFigure, but the first one is turned worse. > But that wouldn't justify sticking with the > horrible effect you see when there is a single figure/lone accidental. Indeed. Hence my suggestion to code a callback looking at the related NoteColumn.
Sign in to reply to this message.
On Sat, 2017-07-15 at 08:51 +0100, Richard Shann wrote: > On Sat, 2017-07-15 at 00:40 -0700, thomasmorley65@gmail.com wrote: > > On 2017/07/15 07:25:37, richard_rshann.plus.com wrote: > > > On Sat, 2017-07-15 at 00:09 -0700, mailto:thomasmorley65@gmail.com > > wrote: > > > > I'm afraid this patch does not fix the problem as wished. > > > > > You give an example of multiple bass figures on a note, I'm not > sure > > > what you would wish to see for that case, > > > > In > > << > > \relative c' { c1 c1 } > > \figures { <6+>2 <6+>2 <6+>1 } > > > > I would expect same aligning for first and second BassFigure related > to > > the note. > (understood: first and second *group* of bass figures) > > That would be ok, although when you have multiple figures on a note > allowing a bit more space for them can be good sometimes. You could > always move the whole group along by inserting a short duration note > with no figure in the bass figures if there was a particular case > where > this seemed obtrusive (hacky of course). > > So I think you could validly object that you didn't like them being > treated differently. Ha! I think I was being over-generous to your case here :) consider << \relative c' { c1 c2 } \figures { <_+>2 <6+>2 <_+>4 <4>4} >> In the current LilyPond the two groups of figures are aligned differently. So, my patch constitutes an improvement to the current situation, even though it doesn't fix this case, (which, as I said, is not really a worry - it's quite difficult to spot). Richard
Sign in to reply to this message.
On Sat, 2017-07-15 at 01:50 -0700, thomasmorley65@gmail.com wrote: > On 2017/07/15 08:06:41, richard_rshann.plus.com wrote: > > > So I think you could validly object that you didn't like them being > > treated differently. > > If you look at the following, namely the colored BassFigures > > cbf = \once \override BassFigure.color = #red > << > \relative c' { c1 c8 d e f g f e d c1 c1 } > \figures { <_!>2 <_!>2 \cbf <_!>1 <_!>2 <_!>2 \cbf <_!>1 } > > > You'll see your patch improves the second colored BassFigure, but the > first one is turned worse. Ah, yes I see. If you create a single figure of a duration to cover a whole series of shorter duration notes you run into trouble. A better approach to the problem would be needed to avoid you having to re-code the bass figure duration to match the note it applies to. Richard
Sign in to reply to this message.
On 2017/07/15 08:55:43, richard_rshann.plus.com wrote: > On Sat, 2017-07-15 at 08:51 +0100, Richard Shann wrote: > > On Sat, 2017-07-15 at 00:40 -0700, mailto:thomasmorley65@gmail.com wrote: > > > On 2017/07/15 07:25:37, http://richard_rshann.plus.com wrote: > > > > On Sat, 2017-07-15 at 00:09 -0700, mailto:thomasmorley65@gmail.com > > > wrote: > > > > > I'm afraid this patch does not fix the problem as wished. > > > > > > > You give an example of multiple bass figures on a note, I'm not > > sure > > > > what you would wish to see for that case, > > > > > > In > > > << > > > \relative c' { c1 c1 } > > > \figures { <6+>2 <6+>2 <6+>1 } > > > > > > I would expect same aligning for first and second BassFigure related > > to > > > the note. > > (understood: first and second *group* of bass figures) > > > > That would be ok, although when you have multiple figures on a note > > allowing a bit more space for them can be good sometimes. You could > > always move the whole group along by inserting a short duration note > > with no figure in the bass figures if there was a particular case > > where > > this seemed obtrusive (hacky of course). > > > > So I think you could validly object that you didn't like them being > > treated differently. > Ha! I think I was being over-generous to your case here :) > consider > > << > \relative c' { c1 c2 } > \figures { <_+>2 <6+>2 <_+>4 <4>4} > > >> > > In the current LilyPond the two groups of figures are aligned > differently. As a debugging-helper I coded a visualization.tool: \layout { \context { \FiguredBass \override BassFigure.after-line-breaking = #(lambda (grob) (let ((line (ly:make-stencil (ly:stencil-expr (make-filled-box-stencil '(0 . 0) '(0 . 10))) '(0 . 0) '(0 . 0)))) (format #t "\nX-extent:\t~a" (interval-length (ly:grob-property grob 'X-extent))) (ly:grob-set-property! grob 'stencil (box-stencil (ly:stencil-combine-at-edge (ly:stencil-combine-at-edge line Y RIGHT (ly:text-interface::print grob) 0) X RIGHT line 0) 0 0)))) } } After applying it to your example I'm not sure what you mean. I don't see a significant difference.
Sign in to reply to this message.
On 2017/07/15 09:03:30, richard_rshann.plus.com wrote: > On Sat, 2017-07-15 at 01:50 -0700, mailto:thomasmorley65@gmail.com wrote: > > On 2017/07/15 08:06:41, http://richard_rshann.plus.com wrote: > > > > > So I think you could validly object that you didn't like them being > > > treated differently. > > > > If you look at the following, namely the colored BassFigures > > > > cbf = \once \override BassFigure.color = #red > > << > > \relative c' { c1 c8 d e f g f e d c1 c1 } > > \figures { <_!>2 <_!>2 \cbf <_!>1 <_!>2 <_!>2 \cbf <_!>1 } > > > > > > You'll see your patch improves the second colored BassFigure, but the > > first one is turned worse. > > Ah, yes I see. If you create a single figure of a duration to cover a > whole series of shorter duration notes you run into trouble. A better > approach to the problem would be needed to avoid you having to re-code > the bass figure duration to match the note it applies to. > > Richard > > If you try \override BassFigure.X-offset = #ly:self-alignment-interface::centered-on-x-parent you'll see improvements in some cases (others are worse). Therefore I think ly:self-alignment-interface::centered-on-x-parent is not the correct tool, but something similiar could do the trick.
Sign in to reply to this message.
On Sat, 2017-07-15 at 02:09 -0700, thomasmorley65@gmail.com wrote: > On 2017/07/15 08:55:43, richard_rshann.plus.com wrote: > > On Sat, 2017-07-15 at 08:51 +0100, Richard Shann wrote: > > > On Sat, 2017-07-15 at 00:40 -0700, mailto:thomasmorley65@gmail.com > wrote: > > > > On 2017/07/15 07:25:37, http://richard_rshann.plus.com wrote: > > > > > On Sat, 2017-07-15 at 00:09 -0700, > mailto:thomasmorley65@gmail.com > > > > wrote: > > > > > > I'm afraid this patch does not fix the problem as wished. > > > > > > > > > You give an example of multiple bass figures on a note, I'm not > > > sure > > > > > what you would wish to see for that case, > > > > > > > > In > > > > << > > > > \relative c' { c1 c1 } > > > > \figures { <6+>2 <6+>2 <6+>1 } > > > > > > > > I would expect same aligning for first and second BassFigure > related > > > to > > > > the note. > > > (understood: first and second *group* of bass figures) > > > > > > That would be ok, although when you have multiple figures on a note > > > allowing a bit more space for them can be good sometimes. You could > > > always move the whole group along by inserting a short duration note > > > with no figure in the bass figures if there was a particular case > > > where > > > this seemed obtrusive (hacky of course). > > > > > > So I think you could validly object that you didn't like them being > > > treated differently. > > Ha! I think I was being over-generous to your case here :) > > consider > > > << > > \relative c' { c1 c2 } > > \figures { <_+>2 <6+>2 <_+>4 <4>4} > > > >> > > > In the current LilyPond the two groups of figures are aligned > > differently. > > As a debugging-helper I coded a visualization.tool: > > \layout { > \context { > \FiguredBass > \override BassFigure.after-line-breaking = > #(lambda (grob) > (let ((line > (ly:make-stencil > (ly:stencil-expr (make-filled-box-stencil '(0 . 0) '(0 > . 10))) > '(0 . 0) > '(0 . 0)))) > (format #t "\nX-extent:\t~a" > (interval-length (ly:grob-property grob 'X-extent))) > (ly:grob-set-property! grob 'stencil > (box-stencil > (ly:stencil-combine-at-edge > (ly:stencil-combine-at-edge > line Y RIGHT (ly:text-interface::print grob) 0) > X RIGHT line 0) > 0 0)))) > } > } > > After applying it to your example I'm not sure what you mean. I don't > see a significant difference. Your visualization tool reveals the problem. They are aligned the same: the left hand edge of the figure is aligned with the left hand edge of the note. However, because the whole note is wider visual impression is that the figure appears centered on the note for the shorter duration notes but to the left for the whole note. So the problem is perhaps that the choice of alignment point is unfortunate. Richard
Sign in to reply to this message.
On 2017/07/15 09:13:08, thomasmorley651 wrote: > If you try > \override BassFigure.X-offset = > #ly:self-alignment-interface::centered-on-x-parent > you'll see improvements in some cases (others are worse). > Therefore I think ly:self-alignment-interface::centered-on-x-parent is not the > correct tool, but something similiar could do the trick. https://sourceforge.net/p/testlilyissues/issues/5154/#ce35 May be a starting point/proof of concept.
Sign in to reply to this message.
On Sat, 2017-07-15 at 16:15 -0700, thomasmorley65@gmail.com wrote: > On 2017/07/15 09:13:08, thomasmorley651 wrote: > > > If you try > > \override BassFigure.X-offset = > > #ly:self-alignment-interface::centered-on-x-parent > > you'll see improvements in some cases (others are worse). > > Therefore I think ly:self-alignment-interface::centered-on-x-parent is > not the > > correct tool, but something similiar could do the trick. > > https://sourceforge.net/p/testlilyissues/issues/5154/#ce35 > May be a starting point/proof of concept. You seem to have things under control with this code. I think \centerOnNoteColumn should be the default, I've been scouring the "Golden Age" of engraving that LilyPond aspires to for examples and I noticed that the failure to center isolated figures on whole-notes only becomes an eyesore when the figures are in a small font size, at larger font sizes the figure fills out the width of the note more. This can be seen, e.g., in Augener's edition of the Corelli chamber sonatas. I've attached an example from Denkmäler deutscher Tonkunst, Erste Folge; Bd.18 Leipzig: Breitkopf und Härtel, 1904. Plate D.D.T. XVIII. which shows them centering the figure under a whole note in the first bar shown and then aligning the first of two figures with the right edge of the whole note in the second bar. At this font size it is quite subtle though. Richard
Sign in to reply to this message.
On Sun, 2017-07-16 at 10:09 +0100, Richard Shann wrote: > which shows them centering the figure under a whole note well, actually, *over* a whole note inthis case. The fact that the whole note is so far away from the figure (because of its pitch) makes the effect still more subtle, it becomes more obvious if the figure is right above/below the note. Richard
Sign in to reply to this message.
|