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

Order of accidentals in altered unisons #1656

Closed rettinghaus closed 2 years ago

rettinghaus commented 4 years ago

Accidentals in altered unisons are engraved in the encoding order. To avoid confusion, the natural should always be the last accidental.

altered-unison

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/4.0.1/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0" ?>
<?xml-model href="https://music-encoding.org/schema/4.0.1/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron" ?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="4.0.1">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt />
        </fileDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef>
                        <staffGrp>
                            <staffDef clef.shape="G" clef.line="2" n="1" lines="5" />
                        </staffGrp>
                    </scoreDef>
                    <section>
                        <measure>
                            <staff n="1">
                                <layer>
                                    <chord dur="4">
                                        <note pname="g" accid="f" oct="4" />
                                        <note pname="g" accid="n" oct="4" />
                                    </chord>
                                    <chord dur="4">
                                        <note pname="g" accid="n" oct="4" />
                                        <note pname="g" accid="f" oct="4" />
                                    </chord>
                                    <chord dur="4">
                                        <note pname="g" accid="s" oct="4" />
                                        <note pname="g" accid="n" oct="4" />
                                    </chord>
                                    <chord dur="4">
                                        <note pname="g" accid="n" oct="4" />
                                        <note pname="g" accid="s" oct="4" />
                                    </chord>
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>
lpugin commented 4 years ago

Good luck ;-)

lpugin commented 4 years ago

image

rettinghaus commented 4 years ago

That was quick. Thanks!

o-sapov commented 2 years ago

In case, when notes are encoded in different layers, other rules should be applied, for instance:

K310_m95_nma

(W. A. Mozart K. 310/001, m95)


Cf. E. Gould, Behind bars, p. 95:

Gould: Behind Bars, p.95

Currently Verovio (v3.4.1) renders this way:

K310_m95_mei
Click to view MEI data for above example.

```xml Placing of accidentals in altered unisons.

```

lpugin commented 2 years ago

Example added to the test suite for image https://github.com/rism-digital/verovio.org/commit/5ecbbb432fecccbba971a63e0e2e0a6ae2a08df5