Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-11 Thread Torsten Hämmerle
Thomas Morley-2 wrote
> this weekend I'll have not much time and I'll be completely offline
> next week for holidays.

No need to hurry, Happy Holidays ;) (oh no, that was politically correct and
is restricted Christmas time use only).



Thomas Morley-2 wrote
> In my initial testing I experienced different behaviour, for no other
> reason than different finger-numbers, i.e. small differences in their
> extents.
> Especially for right positioned fingers.
> So I recommend thorough testings ...

Yes, the slightest deviations in the number extents may just be over a
threshold or not.
The right-positioning problems, in any case, can't be solved by just
translating the stencil, so it's no wonder you very unstable results when
testing.
When taking all the dots into account, however, they make up a solid barrier
so that no fingering can slip through any more and everything will be stable
and robust against tiny extent variations.



Thomas Morley-2 wrote
> The curvy positioning is bad, imho.
> But I agree it might be a different issue.

Yes, that's a question of design and is definitely not linked to the
overlapping problem of issues 3692 or 5393. It should definitely get its own
issue (as well as the generally overlapping circled string numbers...)



Thomas Morley-2 wrote
>> But, as I said, I consider this expected behaviour, even if it seems odd
>> at
>> first glance.
>> Would you agree?
> 
> Yes, so far. :)

Well, then. I'm just wondering about the self-alignment functionality that
correctly adjusts the Y-offset depending on self-alignment-Y and
parent-alignment-Y, only it's via callback and too late for positioning and
thus the collisions happen.
I don't the idea of unnecessarily aligning the stencil twice -- first for
correct positioning, and then again when the self-alignment callback kicks
in.

All the best and enjoy your week off
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-11 Thread Thomas Morley
2018-08-11 15:00 GMT+02:00 Torsten Hämmerle :
> Thomas Morley-2 wrote
>> I tried to Y-center the Fingering-stencil.
>>
>> Though, with the example below the result is not all that convincing.
>> […]
>> Additionally, if fingeringOrientations contains 'left or 'right a
>> FingeringColumn is built at Staff-level, so the 'snap-radius-property
>> comes into play.
>>
>> No real clue how to proceed...
>

Hi Torsten,

this weekend I'll have not much time and I'll be completely offline
next week for holidays.

That said...

> Hi Harm,
>
> From my point of view, the Y-centering of the fingering stencil is perfectly
> OK (we just need a "proper" solution), the dot collision problem has
> bettered and can be completely cured by considering all the dots of the
> chord.

In my initial testing I experienced different behaviour, for no other
reason than different finger-numbers, i.e. small differences in their
extents.
Especially for right positioned fingers.
So I recommend thorough testings ...

>
> So, your remaining concern is the strange (?) behaviour of the
> FingeringColumn with respect to the snap-radius.
> This looks admittedly odd and I was wondering why the heck the outer
> fingerings don't come closer to their noteheads, respectively why are they
> arranged in a circular shape even if there is no accidental in the way.
> But, looking deeper into this, it is the expected behaviour and everything
> works as designed. If we don't like this, it would be another issue to
> change FingeringColumn algorithm, but, in any case, this is no unwanted
> side-effect of our stencil manipulations.

The curvy positioning is bad, imho.
But I agree it might be a different issue.

> To illustrate this, I've switched off any padding values, put a box around
> the fingering numbers and gradually changed the font size from very small to
> big in order to be able to observe the evolution of fingering placement.
> I've used just one flat because of its straight left border.
>
> 
>
> Starting off with a very small font size, there's enough space for each
> fingering to take its ideal Y-position, exactly centred on its notehead.
>
>
> *Rule: A fingering must never get in between accidentals and noteheads.*
>
>
> *In (1)*, the fingering "1" hardly touches the blue line signifying the
> lower end of the flat accidental. It still can stick to its notehead.
> Fingerings 2, 3, and 4 clearly have to go outside the flat and are pushed
> away from the notehead because of The Rule.
>
> *In (2)*, the font size has been increased so that the "1" just slightly
> gets into the "forbidden" flat area and therefore is pushed away from the
> notehead, too.  The "5" still has enough space.
>
> *In (3) and (4)*, the increasing height of the numbers starts spreading them
> vertically, away from their original Y position.  In (4), it is clearly
> visible that the "1" does not interfere with the flat anymore, but still (!)
> keeps its outside position.
>
> *In (5)*, finally, all the fingering number keep a distance from their
> noteheads, even if the "1" and the "5" are actually quite far away from the
> accidental.
>
> The (intended) reason for this is that, even if there seems to be enough
> space in the direct vicinity of their noteheads, these fingerings stay
> "outside" because at their original Y position, they'd get in between
> accidentals and noteheads. That's the simple reason why they stay "outside":
> their X position is determined by the accidentals, calculated as if the
> fingerings had their original Y position (i.e. the notehead's Y position).
> In a second step, their Y position will be spread out due to stacking, while
> keeping the X position.
>
> If there are more than on accidentals involved (or sharps with their more
> complex left skyline), the stacked fingerings may take on alignments along a
> curved path.
>
> In the end, snap-radius is used to avoid very small irregularities by
> positioning the fingering in a straight line if they have "nearly" the same
> X position to avoid an irregular, look.
>
> But, as I said, I consider this expected behaviour, even if it seems odd at
> first glance.
> Would you agree?

Yes, so far. :)

Thanks,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-11 Thread Torsten Hämmerle
Thomas Morley-2 wrote
> I tried to Y-center the Fingering-stencil.
> 
> Though, with the example below the result is not all that convincing.
> […]
> Additionally, if fingeringOrientations contains 'left or 'right a
> FingeringColumn is built at Staff-level, so the 'snap-radius-property
> comes into play.
> 
> No real clue how to proceed...


Hi Harm,

From my point of view, the Y-centering of the fingering stencil is perfectly
OK (we just need a "proper" solution), the dot collision problem has
bettered and can be completely cured by considering all the dots of the
chord.

So, your remaining concern is the strange (?) behaviour of the
FingeringColumn with respect to the snap-radius.
This looks admittedly odd and I was wondering why the heck the outer
fingerings don't come closer to their noteheads, respectively why are they
arranged in a circular shape even if there is no accidental in the way.
But, looking deeper into this, it is the expected behaviour and everything
works as designed. If we don't like this, it would be another issue to
change FingeringColumn algorithm, but, in any case, this is no unwanted
side-effect of our stencil manipulations.

To illustrate this, I've switched off any padding values, put a box around
the fingering numbers and gradually changed the font size from very small to
big in order to be able to observe the evolution of fingering placement.
I've used just one flat because of its straight left border.

 

Starting off with a very small font size, there's enough space for each
fingering to take its ideal Y-position, exactly centred on its notehead.


*Rule: A fingering must never get in between accidentals and noteheads.*


*In (1)*, the fingering "1" hardly touches the blue line signifying the
lower end of the flat accidental. It still can stick to its notehead. 
Fingerings 2, 3, and 4 clearly have to go outside the flat and are pushed
away from the notehead because of The Rule.

*In (2)*, the font size has been increased so that the "1" just slightly
gets into the "forbidden" flat area and therefore is pushed away from the
notehead, too.  The "5" still has enough space.

*In (3) and (4)*, the increasing height of the numbers starts spreading them
vertically, away from their original Y position.  In (4), it is clearly
visible that the "1" does not interfere with the flat anymore, but still (!)
keeps its outside position.

*In (5)*, finally, all the fingering number keep a distance from their
noteheads, even if the "1" and the "5" are actually quite far away from the
accidental.

The (intended) reason for this is that, even if there seems to be enough
space in the direct vicinity of their noteheads, these fingerings stay
"outside" because at their original Y position, they'd get in between
accidentals and noteheads. That's the simple reason why they stay "outside":
their X position is determined by the accidentals, calculated as if the
fingerings had their original Y position (i.e. the notehead's Y position).
In a second step, their Y position will be spread out due to stacking, while
keeping the X position.

If there are more than on accidentals involved (or sharps with their more
complex left skyline), the stacked fingerings may take on alignments along a
curved path.

In the end, snap-radius is used to avoid very small irregularities by
positioning the fingering in a straight line if they have "nearly" the same
X position to avoid an irregular, look.

But, as I said, I consider this expected behaviour, even if it seems odd at
first glance.
Would you agree?

All the best,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-02 Thread Torsten Hämmerle
Thomas Morley-2 wrote
> […]
>   \mark "Fingerings right"
>   \set fingeringOrientations = #'(right)
> […]


Hi Harm,

When setting fingeringOrientations to #'(right), the occasional collision of
fingering and dots are a result of dots moving vertically away too far from
their noteheads.

Intervals of a second in combinations with "quantized" dot placements
between lines may lead to 1 staff-space Y distance between notehead and dot,
i.e. the fingering does not collide with the dot of its own notehead, but
runs into a neighbouring dot:

 

I'll try to to also take care of the neighbouring dots (i.e. make them known
to the side-position-interface...

Let's see,
Torsten





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-02 Thread Torsten Hämmerle
Simon Albrecht-2 wrote
> I created one and tried to include all the analyses yet presented.
> https://sourceforge.net/p/testlilyissues/issues/5393/;

Thanks, Simon. I think makes sense trying to improve the fingering placement
step by step.
And everything that can get ...Orientations (fingeringOrientations,
strokeFingerOrientations, stringNumberOrientations) is affected.

All the best,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-02 Thread Torsten Hämmerle
Hi Harm,

Yes, fingerings are quite a large construction zone (and right hand
fingerings or string numbers as well).
Issue 3692 hasn't been solved yet, and your examples show that there is also
a general dot collision problem for right fingerings.

When increasing snap-radius, fingerings may overlap when forced into one
vertical column.



Thomas Morley-2 wrote
> I tried to Y-center the Fingering-stencil.
> […]

This is pretty much what I did (using a much more primitive hard-coded
markup just to see the effect).
This centering at least solves the accidental interaction problem, but it is
only one step of many.

And of course the LilyPond coding should be corrected without having to
manipulate the stencil.

All in all, fingering placement is awfully challenging, using standard
interfaces and avoiding collisions with anything that might get into the way
(other fingerings, right hand fingerings, string numbers, accidentals, dots,
scripts, ties, slurs, …)

In any case, your examples add another level of difficulties, as the close
notehead positions require additional vertical shifting of fingerings and
dots. Phew...

All the best,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-02 Thread Simon Albrecht

On 02.08.2018 12:10, Torsten Hämmerle wrote:

I think this should get its own tracker issue.


I created one and tried to include all the analyses yet presented.


Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-02 Thread Thomas Morley
2018-08-02 12:10 GMT+02:00 Torsten Hämmerle :
> Simon Albrecht-2 wrote
>> I went to the issue tracker so this doesn’t get lost – it seems to be
>> related to or a subset of
>> https://sourceforge.net/p/testlilyissues/issues/3692/;.
>
> Hi Simon,
>
> While the descriptive title "Fingering collision with accidentals" of issue
> 3692 more or less describes our current problem, I think this has to be
> technically separated.
>
>
> Fingering positions at the left concerned:
> 1. Why aren't the numbers placed below the accidental even if there's plenty
> of space?
> 2. Why do numbers above an accidental overlap?
>
> This strange effect can be perfectly explained when assuming that horizontal
> positioning is done in a state where the numbers still sit on their
> baselines and these baselines are at the height of their corresponding
> notehead.
> After horizontal positioning, these numbers will be centred vertically, i.e.
> shifted down by half a staff-space (because they happen to be about a
> staff-space high).
> This shift will make them either overlap an accidental below or create an
> unnecessary gap.
>
> I've tried to illustrate this in the following PDF:
> test-accidental-fingering2.pdf
> 
>
> I think this should get its own tracker issue.
>
> All the best,
> Torsten


Hi Torsten,

I tried to Y-center the Fingering-stencil.

Though, with the example below the result is not all that convincing.
If fingerings are 'right the default is already inconsistent, for
different numbers.
Additionally, if fingeringOrientations contains 'left or 'right a
FingeringColumn is built at Staff-level, so the 'snap-radius-property
comes into play.

No real clue how to proceed...

Here my testings:

yCenterFingeringStil =
  \override Fingering.stencil =
#(lambda (grob)
  (ly:stencil-aligned-to (ly:text-interface::print grob) Y CENTER))

mus = {
4. r8
4. r8
}

{
\time 2/4
\mark "Fingerings left"
\set fingeringOrientations = #'(left)
<>^"default"
\mus
\yCenterFingeringStil
<>^"tweaked"
\mus
<>^"snap-radius tweaked as well"
\override Staff.FingeringColumn.snap-radius = 1
\mus
}

{
\time 2/4
\mark "Fingerings right"
\set fingeringOrientations = #'(right)
<>^"default"
\mus
\yCenterFingeringStil
<>^"tweaked"
\mus
<>^"snap-radius tweaked as well"
\override Staff.FingeringColumn.snap-radius = 1
\mus
}


Cheers,
  Harm
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-02 Thread Torsten Hämmerle
Simon Albrecht-2 wrote
> I went to the issue tracker so this doesn’t get lost – it seems to be 
> related to or a subset of 
> https://sourceforge.net/p/testlilyissues/issues/3692/;.

Hi Simon,

While the descriptive title "Fingering collision with accidentals" of issue
3692 more or less describes our current problem, I think this has to be
technically separated.


Fingering positions at the left concerned:
1. Why aren't the numbers placed below the accidental even if there's plenty
of space?
2. Why do numbers above an accidental overlap?

This strange effect can be perfectly explained when assuming that horizontal
positioning is done in a state where the numbers still sit on their
baselines and these baselines are at the height of their corresponding
notehead.
After horizontal positioning, these numbers will be centred vertically, i.e.
shifted down by half a staff-space (because they happen to be about a
staff-space high).
This shift will make them either overlap an accidental below or create an
unnecessary gap.

I've tried to illustrate this in the following PDF:
test-accidental-fingering2.pdf

  

I think this should get its own tracker issue.

All the best,
Torsten






--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-08-01 Thread Simon Albrecht

On 31.07.2018 18:12, Torsten Hämmerle wrote:

David Kastrup wrote

A feature of the placement algorithm and a bug of the character design
maybe?


The sharp glyph design looks OK to me:



left: fingering and accidental skylines taken from the example (stave
removed)
right: MetaFont glyph proof printout with bounding box.

But something definitely does not work quite as intended: fingerings above
accidentals even tend to overlap the accidental to some degree, whereas
below the accidental the is an unnecessarily large gap.


I went to the issue tracker so this doesn’t get lost – it seems to be 
related to or a subset of 
.

There are also two older, fixed issues with related subjects:
 and
.

Best, Simon

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-07-31 Thread Torsten Hämmerle
David Kastrup wrote
> A feature of the placement algorithm and a bug of the character design
> maybe?


The sharp glyph design looks OK to me:

 

left: fingering and accidental skylines taken from the example (stave
removed)
right: MetaFont glyph proof printout with bounding box.

But something definitely does not work quite as intended: fingerings above
accidentals even tend to overlap the accidental to some degree, whereas
below the accidental the is an unnecessarily large gap.

Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-07-31 Thread David Kastrup
Torsten Hämmerle  writes:

> Schneidy wrote
>> The first fingerings are independently positioned while the second
>> integrate the accidental sign to calculate the padding.
>> This happend with sharp glyph only.
>> I guess it has something to do with upper 'Y-extent from the fingering --
>> not from the glyph(?) --, however I did not find any issue.
>> Any idea?
>
>
> Hi Pierre,
>
> Yes, it's the sharp glyph that pushes the fingering away.
> More precisely, it's the horizontal skylines. You can easily verify this by
> reducing Staff.Accidental.font-size until the 2 fits beneath the sharp
> accidental.
>
> So this isn't a bug, it's a feature.

A feature of the placement algorithm and a bug of the character design
maybe?

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Fingering position in polyphony face to sharp glyph. Bug?

2018-07-31 Thread Torsten Hämmerle
Schneidy wrote
> The first fingerings are independently positioned while the second
> integrate the accidental sign to calculate the padding.
> This happend with sharp glyph only.
> I guess it has something to do with upper 'Y-extent from the fingering --
> not from the glyph(?) --, however I did not find any issue.
> Any idea?


Hi Pierre,

Yes, it's the sharp glyph that pushes the fingering away.
More precisely, it's the horizontal skylines. You can easily verify this by
reducing Staff.Accidental.font-size until the 2 fits beneath the sharp
accidental.

So this isn't a bug, it's a feature. But admittedly, the automatic result
isn't quite satisfactory.
Anyway, in tight conditions like that I don't consider it a particularly
good idea to squeeze the fingering numbers in between the notes. It's hard
to tell which note belongs to zhe 1 between the F# and the G# in the upper
voice. Adding more padding would affect the spacing too much.

All the best,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Fingering position in polyphony face to sharp glyph. Bug?

2018-07-30 Thread Pierre Perol-Schneider
Hi List,

please consider the following example:

\version "2.18.2" % or 2.19

<<
   \clef "G_8"
   \time 2/4 {
 \set fingeringOrientations = #'(left)
 | % mes.7
  8 fis  a
   } \\ {
 \set fingeringOrientations = #'(left)
 | % mes.7
  8 a,
  %% uncomment the following line:
  %\once \override Fingering.Y-extent = #'()
   c
   }
>>

The first fingerings are independently positioned while the second
integrate the accidental sign to calculate the padding.
This happend with sharp glyph only.
I guess it has something to do with upper 'Y-extent from the fingering --
not from the glyph(?) --, however I did not find any issue.
Any idea?

Cheers,
Pierre
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user