[MEI-L] Colouring a note head

Craig Sapp craigsapp at gmail.com
Mon Oct 16 07:45:40 CEST 2017


Hello Reinier,

Verovio does not (yet) support note at head.color, but it does support
note at color which will color the entire note (notehead, accidental, stem,
and articulation):
[image: Inline images 1]
Example MEI data:
<note dur="4" oct="4" pname="c" accid.ges="n" />
<note dur="4" oct="4" pname="d" color="limegreen" accid="f" />
<note dur="4" oct="4" pname="e" color="violet" accid="s" />
<note dur="4" oct="4" pname="f" color="chocolate" accid="x" artic="acc" />

Full example:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://music-encoding.org/schema/4.0.0/mei-all.rng"
type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://music-encoding.org/schema/4.0.0/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.0">
    <meiHead>
        <fileDesc>
            <titleStmt>
                <title />
            </titleStmt>
            <pubStmt />
        </fileDesc>
        <encodingDesc>
            <appInfo>
                <application isodate="2017-10-15T22:33:19"
version="2.0.0-dev-ae70647-dirty">
                    <name>Verovio</name>
                    <p>Transcoded from Humdrum</p>
                </application>
            </appInfo>
        </encodingDesc>
        <workDesc>
            <work>
                <titleStmt>
                    <title />
                </titleStmt>
            </work>
        </workDesc>
    </meiHead>
    <music>
        <body>
            <mdiv>
                <score>
                    <scoreDef xml:id="scoredef-0000000149144877">
                        <staffGrp xml:id="staffgrp-0000000843432731">
                            <staffDef xml:id="staffdef-0000001439065492"
clef.shape="G" clef.line="2" meter.count="4" meter.unit="4" n="1" lines="5"
/>
                        </staffGrp>
                    </scoreDef>
                    <section xml:id="section-0000001557757882">
                        <measure xml:id="measure-L3" right="end" n="1">
                            <staff xml:id="staff-L3F1N1" n="1">
                                <layer xml:id="layer-L3F1N1" n="1">
                                    <note xml:id="note-L4F1" dur="4"
oct="4" pname="c" accid.ges="n" />
                                    <note xml:id="note-L5F1" type="marked"
dur="4" oct="4" pname="d" color="limegreen" accid="f" />
                                    <note xml:id="note-L6F1" type="marked"
dur="4" oct="4" pname="e" color="violet" accid="s" />
                                    <note xml:id="note-L7F1" type="marked"
dur="4" oct="4" pname="f" color="chocolate" accid="x">
                                        <artic xml:id="artic-L7F1"
artic="acc" />
                                    </note>
                                </layer>
                            </staff>
                        </measure>
                    </section>
                </score>
            </mdiv>
        </body>
    </music>
</mei>

If that is not good enough, I could explain how to use note at type and CSS to
color only the notehead (I would have to test that method first).

-=+Craig



On 14 October 2017 at 12:08, Reinier de Valk <reinierdevalk at gmail.com>
wrote:

> Hi all,
>
> A question with a probably very simple answer: how do I colour a note so
> that only the note head, and not the stem too (as with @color), is affected?
>
> @head.color seems to be what I'm after, but that does not work in my
> version of Verovio (1.1.6):
>
> <note pname='c' oct='5' dur='8' head.color='red'/>
>
> Any help much appreciated!
>
> Thanks,
> Reinier
>
> _______________________________________________
> mei-l mailing list
> mei-l at lists.uni-paderborn.de
> https://lists.uni-paderborn.de/mailman/listinfo/mei-l
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20171015/54ae8e3a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-10-15 at 10.32.53 PM.png
Type: image/png
Size: 19463 bytes
Desc: not available
URL: <http://lists.uni-paderborn.de/pipermail/mei-l/attachments/20171015/54ae8e3a/attachment.png>


More information about the mei-l mailing list