Open stereomatchingkiss opened 3 hours ago
It should be the second one, @head.shape
. Here is viewing in the most recent version of verovio develop
branch:
Transcoded from Humdrum
<note dur="4" oct="4" pname="c" head.shape="diamond" />
<note dur="4" oct="4" pname="d" head.fill="void" head.shape="diamond" />
<note dur="4" oct="4" pname="e" head.shape="x" />
<note dur="4" oct="4" pname="f" head.shape="slash" />
Thanks, it works. I checked the source codes(StrToHeadshapeList), tried every examples, find out following do not works
<note dur="4" oct="4" pname="f" head.shape="quarter" />
<note dur="4" oct="4" pname="f" head.shape="rectangle" />
<note dur="4" oct="4" pname="f" head.shape="backslash" />
<note dur="4" oct="4" pname="f" head.shape="isotriangle" />
<note dur="4" oct="4" pname="f" head.shape="oval" />
<note dur="4" oct="4" pname="f" head.shape="rtriangle" />
<note dur="4" oct="4" pname="f" head.shape="piewedge" />
<note dur="4" oct="4" pname="f" head.shape="semicircle" />
<note dur="4" oct="4" pname="f" head.shape="square" />
I guess one of them is the default shape(it works, but since it is default shape I do not find out), but not sure which one
About the source codes locate in the file attconverter.cpp
data_HEADSHAPE_list AttConverterBase::StrToHeadshapeList(const std::string &value, bool logWarning) const
{
if (value == "quarter") return HEADSHAPE_list_quarter;
if (value == "half") return HEADSHAPE_list_half;
if (value == "whole") return HEADSHAPE_list_whole;
if (value == "backslash") return HEADSHAPE_list_backslash;
if (value == "circle") return HEADSHAPE_list_circle;
if (value == "+") return HEADSHAPE_list_plus;
if (value == "diamond") return HEADSHAPE_list_diamond;
if (value == "isotriangle") return HEADSHAPE_list_isotriangle;
if (value == "oval") return HEADSHAPE_list_oval;
if (value == "piewedge") return HEADSHAPE_list_piewedge;
if (value == "rectangle") return HEADSHAPE_list_rectangle;
if (value == "rtriangle") return HEADSHAPE_list_rtriangle;
if (value == "semicircle") return HEADSHAPE_list_semicircle;
if (value == "slash") return HEADSHAPE_list_slash;
if (value == "square") return HEADSHAPE_list_square;
if (value == "x") return HEADSHAPE_list_x;
if (logWarning && !value.empty())
LogWarning("Unsupported value '%s' for data.HEADSHAPE.list", value.c_str());
return HEADSHAPE_list_NONE;
}
The notes marked in red have notehead shapes that are not implemented in verovio (but it knows that they are supposed to exist):
Transcoded from Humdrum
Notes in example data:
<note dur="2" oct="4" pname="c" head.shape="quarter" />
<note dur="4" oct="4" pname="d" head.shape="half" />
<note dur="4" oct="4" pname="e" head.shape="whole" />
<note color="red" dur="4" oct="4" pname="f" head.shape="backslash" />
<note color="red" dur="4" oct="4" pname="f" head.shape="circle" />
<note dur="4" oct="4" pname="f" head.shape="+" />
<note dur="4" oct="4" pname="f" head.shape="diamond" />
<note color="red" dur="4" oct="4" pname="f" head.shape="isotriangle" />
<note color="red" dur="4" oct="4" pname="f" head.shape="oval" />
<note color="red" dur="4" oct="4" pname="f" head.shape="piewedge" />
<note color="red" dur="4" oct="4" pname="f" head.shape="rectangle" />
<note color="red" dur="4" oct="4" pname="f" head.shape="rtriangle" />
<note color="red" dur="4" oct="4" pname="f" head.shape="semicirclel" />
<note dur="4" oct="4" pname="f" head.shape="slash" />
<note color="red" dur="4" oct="4" pname="f" head.shape="square" />
<note dur="4" oct="4" pname="f" head.shape="x" />
Here are the SMuFL notehead shapes (not exactly a one-to-one mapping for all MEI notehead shapes, which is probably the main problem with implementation):
https://w3c.github.io/smufl/latest/tables/noteheads.html
But ones that do map:
isotriangle
(SMuFL has duration qualifications for this shape):
square
(they don't look square in SMuFL versions and maybe map better to rectangle
):
+
has duration qualifications, which verovio does not yet address:
triangle
(don't know what rtriangle
is supposed to mean unless it is the same shape other than if the stems are attached to the point rather than the side):
semicircle
might map to SMuFLmoon
:
piewedge
might map to these:
Nothing looks like it maps to oval
, and backslash
is probably in the SMuFL font related to slash
which is not on this page.
Tried to implement square by myself, quite difficult to do. Could you give me some suggestions of implementing this shape for the note? Should I start from SMuFL? Thanks
Verovio version == 4.3.1
What I tried
Everyone of them do not work, do verovio support changing shape? I check the source codes, changelog.md do mentioned
"Support for
note@head.fillwith
@headshape="diammond""
But not sure how could I make this work, thanks
Edit : Tried with diammond too