rism-digital / verovio

🎵 Music notation engraving library for MEI with MusicXML and Humdrum support and various toolkits (JavaScript, Python)
https://www.verovio.org
GNU Lesser General Public License v3.0
678 stars 185 forks source link

Cross-staff articulation vertical positions #2875

Closed craigsapp closed 2 years ago

craigsapp commented 2 years ago

Something happened quite recently to cross-staff articulations, where 3.10dev is colliding some of the staccatos with the cross-staff beam:

Screen Shot 2022-05-19 at 8 38 49 AM

Also notice that the clef-beam collision in 3.10dev which is not in 3.9. This is probably related to the stem on the last note of the cross staff note being too short (probably allow stems to be shorted to 4 VU at their shortest when in a beam). The staccatos seem to be tool close to the beams in 3.10dev, and I like the staccato spacing on the cross staff beam in 3.9 the best.

The staccato on the last note in the cross staff beam is too low in both cases (should be in the space just below the note instead of two spaces below).

Click to view MEI data for the above example ```xml Sonata in C minor, L.10, K.84 Verovio

Transcoded from Humdrum

K. 84 Sonata in C minor, L.10, K.84 Scarlatti, Domenico
Sonata in C minor, L.10, K.84     Domenico Scarlatti 1685–1757
```
craigsapp commented 2 years ago

The articulations like to move around based on layout, so they don't exactly know where the beam is located:

Screen Shot 2022-05-21 at 11 03 14 AM

The angle is right, but most likely the beam was moved after the positions of the articulations are assigned.

It could be related to spacing (such as stretching the music after castoff). Here is where I start with a tight spacing with the same music:

Screen Shot 2022-05-21 at 11 05 43 AM

In this case the staccatos on the top beam in the first measure are also being affected, even though it is not a cross-staff beam.

Here is a wide spacing where they are correct:

Screen Shot 2022-05-21 at 11 08 25 AM
brdvd commented 2 years ago

@craigsapp Unfortunately, I cannot reproduce this. Looks ok on my side:

Def1

Can you fill in more details how to reproduce this issue? Which rendering options do you use?

The change in behaviour appeared after #2699 .

craigsapp commented 2 years ago

It is also working for me now, with the staccatos not changing positions, and the staff distance remaining constant at various spacings of the music layout:

Screen Shot 2022-05-31 at 7 42 22 AM Screen Shot 2022-05-31 at 7 42 47 AM

There is a strangeness in that the staccato marks on the cross-staff beam are further away than the regular beams.

Cross staff staccato placement:

Screen Shot 2022-05-31 at 7 47 20 AM

Compared to regular beam placement where the staccatos are closer:

Screen Shot 2022-05-31 at 7 48 06 AM
craigsapp commented 2 years ago

After compiling the most recent PR #2905 to fix the problem, it is still there (the original problem mentioned at the top, not the staccato spacing fix).

It is subtle to produce, and requires more musical content to make it visible.

Here is a demo with the entire score:

https://verovio.humdrum.org/?file=scarlatti/sonatas/L010K084.krn#mh11

Screen Shot 2022-06-01 at 1 07 09 PM

(this view may depend on the width of your browser when viewing the above link).

When I make the musical spacing slightly larger:

https://verovio.humdrum.org/?file=scarlatti/sonatas/L010K084.krn&k=w#mh11

The problem becomes visible:

Screen Shot 2022-06-01 at 1 08 34 PM

It is not directly related to spacingLinear/spacingNonLinear, since I can resize the window with the same spacing and the staccatos are fixed:

Screen Shot 2022-06-01 at 1 09 12 PM

It seems to be related to the justification process, and in particular when the measure has to be stretched out a lot to fill in the system (but if there are only 1 or 2 systems in the the problem does not show or is hard to make show).

Here are the first 14 measures of the test music (measure 11 being the measure of interest):

Click to view MEI data for above example (bars 1–14) ```xml Sonata in C minor, L.10, K.84 Craig Stuart Sapp 2021 Craig Stuart Sapp Licence: (CC BY-NC-SA 4.0) https://creativecommons.org/licenses/by-nc-sa/4.0 Verovio

Transcoded from Humdrum

Encoded by: Kelly Leistikow

Version: 2020/12/21

K. 84 Sonata in C minor, L.10, K.84 Scarlatti, Domenico
Sonata in C minor, L.10, K.84 Domenico Scarlatti: Opere complete per clavicembalo (Milan: Ricordi, 1906-1913)     Craig Stuart Sapp, ed.   Domenico Scarlatti 1685–1757
Allegro ( = 152) f p p p p f p p sf p
```