Closed frakel closed 2 years ago
Potentially related to issue https://github.com/rism-digital/verovio/issues/2621
Here is a related example, which has the additional complication of a tuplet number:
Transcoded from Humdrum
Notice the F#
slur in m. 178 which did not trigger the steep slur algorithm. There could be a "short slur" algorithm which could be implemented: in manual typesetting, short slurs are not drawn freehand but rather with a stamp (limiting the shapes of short slurs): https://www.youtube.com/watch?v=m5uPPJj_M_o&t=234s
Here is the manual typesetting for the example:
Note that there is an exception for slurs and accidentals overlapping in difficult cases, with one given in this example:
And this slur and sharp are exceptionally close (yet there is no visual merging so it is not objectionable due to the intersection angles being close to 90 degrees):
Also note the notehead placement of the slur endpoints on these examples: the slur is lengthened horizontally by having the slur start point left justified on the notehead, and the slur end point is somewhat right justified on the notehead.
Here is how I would manually typeset the first example above (without referring to the original edition):
The original placement in version 3.6 is better because it almost looks like the placement here. In tight spacing, slurs are allowed to cross the stems of flats (but not to enter the lower portion of the flat as in the 3.6 rendering).
One problem is that the kerning of the notes is being counter-productive for the placement of these two slurs. I am using a very slight kerning of the flat over the previous note so that the rhythmic spacing of the noteheads is not disturbed. In the long term the slur placement algorithm should be able to identify that kerning was done between these two notes, and it would have the ability to cancel or reduce the kerning (i.e., there would be a kerning variable that would keep track of kerning decisions, and then this value could be set to 0 by the slur rendering algorithm).
Another thing that I did was move the first forte dynamic to the left. This make reading the first chord it applies to easier. This is something that is hard for a computer to decide to do, so ideally there would be an MEI attribute to indicate this (a boolean for placing the forte before the chord, before having to rely on a fixed horizontal offset).
From 3.7 onwards Verovio renders slurs in certain contexts apparently worse than previous versions. Here is an example from Mozart K.475 m.144.146:
Click here for the MEI code:
```xml
K475 m.144.146 slur regression
dime/fk
f
f
```
Thank you for fixing this.