Re: Notehead substitution and Slur overrides

2022-03-09 Thread Matthew Fong
Hello Jean,

Many thanks for the help -- that works beautifully. It seems besides global
settings, I will need to have some per-score settings.

It appears controlling slurs are more complicated than I thought. Per your
advice, will play with the \vshape feature in 2.23 if I need anything more
custom.


Many thanks,
mattfong

On Wed, Mar 9, 2022 at 3:28 PM Jean Abou Samra  wrote:

> Le 09/03/2022 à 17:13, Matthew Fong a écrit :
> > Dear Jean and LilyPond friends,
> >
> > My apologies for not initially including this, and it took time to get
> > this reduction; At the same time, producing this example code raised
> > additional observations about how the slur overrides work with other
> > variables, which I can use some insight about. Thank you all in advance!
> >
> > Please note in the code, I have marked these observations by a comment
> > starting with: % [Interaction: ... ]. Commenting out noted lines out
> > one at a time changes the Slur override behavior, and it seems rather
> > unexpected.
> >
> > File is attached (/_reduction.ly /), containing
> > all the functions and the quilismaPathGreciliae PostScript path.
> >
> > *Observations for Slur above first note group without quilisma*
> > 1/ Changing the staff size has an effect on Slur overrides (Slur too
> > close to notes)
> >
> > 2/ Altering the LyricHyphen.minimum-distance has an effect on Slur
> > overrides (Slur too close to notes)
> >
> > 3/ Changing the lyrics has an effect on Slur overrides (Slur too close
> > to notes)
> >
> > 4/ Interaction between Slur override settings
> > a/ The desired result (nicer slur)
> > \override Slur.height-limit = #2.5
> > \override Slur.details.free-head-distance = #1
> > b/ Increasing Slur.height-limit results in Slur *too close* to notes
> > \override Slur.height-limit = #3
> > \override Slur.details.free-head-distance = #1
> > c/ Increasing Slur.details.free-head-distance gives the desired
> > result, similar to (a)
> > \override Slur.height-limit = #3
> > \override Slur.details.free-head-distance = #1.5
> >
> > 5/ Finally, there is the original question about why the Slur above
> > the first note group *with the quilisma* remains unaffected by any
> > Slur overrides
> >
> > *Graphical explanation*
> > /Desired result [image]
> > /
> > Slur too close [image]
> >
> >
> > Many thanks,
> > Matt
>
>
> Thanks for the examples. This seems to work better:
>
>  \override Slur.height-limit = 1
>  \override Slur.details.head-slur-distance-factor = 1
>
> Honestly, I can't explain why. Slur formatting is a very involved
> process. All these parameters only have an indirect influence on
> the slur appearance. They factor into demerits ("ugliness scores")
> that LilyPond computes for a bunch of possible slurs, to pick the
> best one. That's why you are observing all-or-nothing effects: since
> there is a staff line and LilyPond thinks the slur would be ugly
> if it came too close, depending on the specific values of the parameters,
> it will choose one way or the other, to make the slur cross the staff
> line or to make it stay below it. Also, when you change horizontal
> spacing and such, this modifies the set of configurations that
> LilyPond tests in the first place. This is all quite tricky, and
> designed to yield the best results possible using heuristics at
> the expense of not being very straightforward to tweak. Being no
> expert of the particular code, I can't tell you the details of this
> art. If you require specific slur shapes, it is best to use \shape
> to refine the control points precisely. (In 2.23, you also get
> \vshape which provides a visual aid in this process.)
>
> Best,
> Jean
>
>


Re: Notehead substitution and Slur overrides

2022-03-09 Thread Jean Abou Samra

Le 09/03/2022 à 17:13, Matthew Fong a écrit :

Dear Jean and LilyPond friends,

My apologies for not initially including this, and it took time to get 
this reduction; At the same time, producing this example code raised 
additional observations about how the slur overrides work with other 
variables, which I can use some insight about. Thank you all in advance!


Please note in the code, I have marked these observations by a comment 
starting with: % [Interaction: ... ]. Commenting out noted lines out 
one at a time changes the Slur override behavior, and it seems rather 
unexpected.


File is attached (/_reduction.ly /), containing 
all the functions and the quilismaPathGreciliae PostScript path.


*Observations for Slur above first note group without quilisma*
1/ Changing the staff size has an effect on Slur overrides (Slur too 
close to notes)


2/ Altering the LyricHyphen.minimum-distance has an effect on Slur 
overrides (Slur too close to notes)


3/ Changing the lyrics has an effect on Slur overrides (Slur too close 
to notes)


4/ Interaction between Slur override settings
    a/ The desired result (nicer slur)
    \override Slur.height-limit = #2.5
    \override Slur.details.free-head-distance = #1
    b/ Increasing Slur.height-limit results in Slur *too close* to notes
    \override Slur.height-limit = #3
    \override Slur.details.free-head-distance = #1
    c/ Increasing Slur.details.free-head-distance gives the desired 
result, similar to (a)

    \override Slur.height-limit = #3
    \override Slur.details.free-head-distance = #1.5

5/ Finally, there is the original question about why the Slur above 
the first note group *with the quilisma* remains unaffected by any 
Slur overrides


*Graphical explanation*
/Desired result [image]
/
Slur too close [image]


Many thanks,
Matt



Thanks for the examples. This seems to work better:

    \override Slur.height-limit = 1
    \override Slur.details.head-slur-distance-factor = 1

Honestly, I can't explain why. Slur formatting is a very involved
process. All these parameters only have an indirect influence on
the slur appearance. They factor into demerits ("ugliness scores")
that LilyPond computes for a bunch of possible slurs, to pick the
best one. That's why you are observing all-or-nothing effects: since
there is a staff line and LilyPond thinks the slur would be ugly
if it came too close, depending on the specific values of the parameters,
it will choose one way or the other, to make the slur cross the staff
line or to make it stay below it. Also, when you change horizontal
spacing and such, this modifies the set of configurations that
LilyPond tests in the first place. This is all quite tricky, and
designed to yield the best results possible using heuristics at
the expense of not being very straightforward to tweak. Being no
expert of the particular code, I can't tell you the details of this
art. If you require specific slur shapes, it is best to use \shape
to refine the control points precisely. (In 2.23, you also get
\vshape which provides a visual aid in this process.)

Best,
Jean




Re: Notehead substitution and Slur overrides

2022-03-07 Thread Matthew Fong
Dear Jean,

My apologies for not including code. I will get an example out shortly,
along with the quilismaPathGreciliae.


Many thanks,
mattfong

On Sun, Mar 6, 2022 at 11:06 PM Jean Abou Samra  wrote:

> Le 04/03/2022 à 05:17, Matthew Fong a écrit :
> > Hello everyone,
> >
> > I am having trouble understanding why a notehead substitution function
> > would interfere with some slur overrides. Any insight or help would be
> > deeply appreciated.
>
>
> Could you please provide complete code showing the problem?
> It is currently not possible to reproduce it, as the definition
> of quilismaPathGreciliae is not included.
>
> Thanks,
> Jean
>
>


Re: Notehead substitution and Slur overrides

2022-03-06 Thread Jean Abou Samra

Le 04/03/2022 à 05:17, Matthew Fong a écrit :

Hello everyone,

I am having trouble understanding why a notehead substitution function 
would interfere with some slur overrides. Any insight or help would be 
deeply appreciated.



Could you please provide complete code showing the problem?
It is currently not possible to reproduce it, as the definition
of quilismaPathGreciliae is not included.

Thanks,
Jean