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
680 stars 185 forks source link

Unison chords with diverging numbers of dots #3838

Open rettinghaus opened 1 week ago

rettinghaus commented 1 week ago

Describe the problem If a unison chord has diverging numbers of dots they are printed directly after the notepads instead after the chord.

To Reproduce Steps to reproduce the behavior:

  1. Load the data attached
  2. Render page X
  3. See error

Expected behavior Two lines of dots should be displayed after the chord, one for each notehead.

Input data

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title>Chords with diverging number of dots</title>
            </titleStmt>
            <pubStmt>
                <respStmt>
                    <persName role="encoder">Klaus Rettinghaus</persName>
                </respStmt>
                <date isodate="2024-10-28">2024-10-28</date>
            </pubStmt>
            <seriesStmt>
                <title>Verovio test suite</title>
            </seriesStmt>
        </fileDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef>
                        <staffGrp>
                            <staffDef n="1" lines="5">
                                <clef shape="G" line="2" visible="false" />
                            </staffDef>
                        </staffGrp>
                    </scoreDef>
                    <section>
                        <measure>
                            <staff n="1">
                                <layer n="1">
                                    <chord dur="2">
                                        <note dots="1" dur="2" oct="5" pname="e" pnum="64" />
                                        <note dots="2" dur="2" oct="5" pname="e" pnum="64" />
                                    </chord>
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

Verovio information

Environment information (as appropriate)

Screenshots

image
lpugin commented 1 week ago

Out of curiosity, do you have a real life example for it?

rettinghaus commented 1 week ago

No, not really. Stumbled upon this with an encoding found online, where the chord and every note has encoded dots.

lpugin commented 1 week ago

FWIW, this is what MuseScore does image However, as far as I know, there is no way to have different numbers of dots. I would suggest closing this issue, it can be reopen if a clear use-case comes up.

rettinghaus commented 1 week ago

I made it low priority. πŸ˜‰ When the dots only are present on the chord Verovio works fine. Not if they are also on the notes (there will be a warning though). Maybe we can at least handle these cases more gracefully?

lpugin commented 1 week ago

I made it low priority. πŸ˜‰

Yes, I saw that. I am suggesting to lower it further πŸ˜‰

Verovio expectation is there should be no note in the chord with a longer duration (including dots) than the chord duration. So something like:

<chord dur="2">
   <note dots="1"/>
   <note dots="1"/>
</chord>

is problematic because the duration of the notes is longer than that of the chord.

This should be fine:

<chord dur="2">
   <note/>
   <note dur="4" dots="1"/>
</chord>