humdrum-tools / verovio-humdrum-viewer

Verovio Humdrum Viewer
http://verovio.humdrum.org
37 stars 9 forks source link

myank filter with sustained notes #780

Open WolfgangDrescher opened 1 year ago

WolfgangDrescher commented 1 year ago

When notes are longer or shorter than the time signature would allow in a measure the myank filter seems to break the layout.

Have a look at this example file:

https://verovio.humdrum.org/?file=https://raw.githubusercontent.com/WolfgangDrescher/lassus-geistliche-psalmen/2759de8a59d54d4ee218903068cc050f05eed24e/kern/01-beatus-vir.krn

Measures 10-13:

Bildschirm­foto 2022-12-05 um 22 44 38

myank -m 11-13

Bildschirm­foto 2022-12-05 um 22 46 39

The notes in the measure 11 do not align correctly. Ideally I would expect something like this:

Bildschirm­foto 2022-12-05 um 22 56 48

myank -m 10-13

Bildschirm­foto 2022-12-05 um 22 48 29

myank -m 7-10

Bildschirm­foto 2022-12-05 um 22 50 16

This seems only to happen when the note values of the first of the last measure or the myank range is longer or shorter than the value indicated by the time signature.

I'm not sure, but this could also be related to https://github.com/rism-digital/verovio/issues/2690. 3rd question I have about verovio.

craigsapp commented 1 year ago

When notes are longer or shorter than the time signature would allow in a measure the myank filter seems to break the layout.

Yes, because such cases were not considered when myank was implemented 😛

The current solution is to used the filter tie -s to split notes across barlines with ties.

Screen Shot 2022-12-12 at 12 54 10 PM

Notice the red highlighted note which was created by tie -s before myank -m 11-13 was applied.

I can enhance myank to deal directly with such cases. We can discuss what the visual result should be. For this case there are two main possibilities: (1) would be to create a tied note as in the above example that start at the beginning of the music. (2) would be to add a <space> which would leave an empty spot there.

This is also related to two display options at the end of a measure that cuts a note before it is finished. Either the note can be cut visually and a tied added to the end of the music:

Screen Shot 2022-12-12 at 12 59 47 PM

Or the full duration of the note can be shown without generating a tie, in which case there will be a gestural duration that matches the duration of a tie split note and also there would be the non-tied version which would remain in note@dur/note@dots. (tuplets across barlines would be a bit complex I suspect).

Screen Shot 2022-12-12 at 1 02 39 PM

The barline on the bottom staff is a bit distracting in that case. Here is an example of dashing the overfilled barline which looks nicer:

Screen Shot 2022-12-12 at 1 04 06 PM

Or make it invisible:

Screen Shot 2022-12-12 at 1 05 26 PM

So there is consideration of whether or not that such styling would be automatic (but preferrably that would be handled with a separate program and/or added to the score explicitly).

I think that mensurstrich is now possible in verovio/MEI, although the traditional mensurstrich is quite ugly, but other modern forms could be implemented in MEI.

There is also the question of rests: they cannot be indicated with ties normally, so it would not be obvious when a rest is split due to an extracted example.

WolfgangDrescher commented 1 year ago

The current solution is to used the filter tie -s to split notes across barlines with ties.

Thank you. This improves some cases. However, because I still need to use yank to filter a line range it can still happen that the notes in each voice do not have the same total duration at the beginnings of yanked sections. It would be good to find a generic solution on how to crop sections (measure or line ranges).

We can discuss what the visual result should be. For this case there are two main possibilities: (1) would be to create a tied note as in the above example that start at the beginning of the music. (2) would be to add a which would leave an empty spot there.

I would implement both and add a flag that enables selecting one or the other method. Something like define(c|crop=s) and usage like this -c tie, -c silent or -c space. Best case the tie option would just tie the beginning and end of the (m)yanked section and not the whole score like tie currently does.

The barline on the bottom staff is a bit distracting in that case. Here is an example of dashing the overfilled barline which looks nicer:

Yes, I think with a dotted or invisible bar line is the best solution. Something like this would look odd:

Bildschirm­foto 2022-12-13 um 12 47 37

And even more without the tie and a whole note with dot instead.

What you you think about the lyrics? I think we should just crop them. Otherwiese it could be misleading that a note of a yanked section has a syllable when we are actually in the middle of a melisma.

I think that mensurstrich is now possible in verovio/MEI, although the traditional mensurstrich is quite ugly, but other modern forms could be implemented in MEI.

Do you know how to use this with verovio? I could not find any issue or discussion about this in the verovio repo. Is there already a bar line config in humdrum (something like =| maybe?) or is there a filter to enable this? And maybe even barring style like in CMM 106 that you mentioned in https://github.com/rism-digital/verovio/issues/2690#issuecomment-1059402343 is possible now?