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
689 stars 186 forks source link

Printing system-level dir/tempo in condensed scores #3650

Open craigsapp opened 7 months ago

craigsapp commented 7 months ago

Related to issue https://github.com/music-encoding/music-encoding/issues/1450

It would be useful to implement dir@type="system" and tempo@type="system" to label dirs/tempos as "system level" text that should still be displayed if a staff has been condensed on a particular system that has dir/tempo that should still be displayed in the music.

Example:

Screenshot 2024-04-19 at 10 23 54 AM
Click to view MEI data for above example. ```xml Grave This MEI file was created by Verovio's Humdrum converter. When published, this unpub element should be removed, and the enclosing pubStmt element should be properly filled out. Verovio

Transcoded from Humdrum

<titlePart type="movementName" analog="humdrum:OMD">Grave</titlePart> reference OMD Grave reference verovio condense auto reference system-decoration [(s1,s2)][(s3,s4)]
Grave Allegro
```

The two tempos would include @type="system":

<tempo xml:id="tempo-L1F1" type="system" staff="1 3" tstamp="1.000000">Grave</tempo>
<tempo xml:id="dir-L12F1" place="above" type="system" staff="1 3" tstamp="1.000000">Allegro</tempo>

When condensing a tempo or dir that contains a @type="system", then the staff assignments for the text would be adjusted automatically:

The basic algorithm for <dir type="system" staff="1 3"> when condensing would be to place the staff 1 text on staff 2 if staff 1 is condensed. If staff 1 and 2 are condensed, then there would be no extra text displayed on staff 3, since the system-level text is already displayed there. If only staff 3 is condensed, then staff 4 would be used for the text instead. If staff 1 and 3 are condensed, then the system-level text would be displayed on staff 2 and 4.

lpugin commented 7 months ago

The @type attribute is meant to remain free for application-specific uses. We need to find another solution

craigsapp commented 7 months ago

My suggestion on https://github.com/music-encoding/music-encoding/issues/1450 is to use @func. There is currently no dir@func, but there is tempo@func.