[MEI-L] Bach chorales in MEI
Craig Sapp
craigsapp at gmail.com
Tue Aug 25 01:53:53 CEST 2009
Hello MEIers,
I have created a converter from Humdrum data into MEI which can currently
handle music of the complexity of Bach chorales:
http://kern.ccarh.org/cgi-bin/ksbrowse?l=371chorales
Click on the title of any of the chorales, then go to the "data format
translation" section,
and to the right of the MEI entry is a link to the automatic conversion into
MEI data. For example, chorale 13 in MEI format:
http://kern.ccarh.org/cgi-bin/ksdata?l=371chorales&file=chor013.krn&f=mei
The intended graphical notation the MEI score is representing
can be found by clicking on the "notation" link for the
ABC+ entry in the data translation section, such as this
one for chorale 13:
http://kern.ccarh.org/cgi-bin/ksdata?l=371chorales&file=chor013.krn&f=abcpdf
Currently the chorales are displayed one part on a staff,
but eventually I will add options for combining two voices
onto a single staff as well, which is the format of the original edition
from which I encoded the music:
http://kern.ccarh.org/cgi-bin/ksdata?l=371chorales&file=chor013.krn&f=pdf
You can send me any bugs you find, suggested improvements in the translation,
or I can update the translation if the MEI definition changes during its ODD
transformation... Things which I still need to add to the conversion:
(1) Cautionary accidentals (accidentals which don't technically need to be
printed, but are provided for easier sight-reading).
(2) Meter changes in a few of the chorales.
(3) Figure out redundant fermata specifications in MEI (I current specify
fermatas as part of the notes, but MEI examples have them
split into two components)
The encodings contains an alteration to the MEI 1.9b specification:
<!ENTITY % att.anl.measure
'corresp IDREFS #IMPLIED
join IDREFS #IMPLIED'>
]>
Which is used in the translations to indicate if two <measures> are
intended to act as one logical measure (for example measure 6 in
chorale 13 is split by a repeat barline). In MEI, I encoded the two
half-measures in separate <measure> containers and then used the
join attribute and the. Here is that measure from chorale 13 for those
interested:
<measure n="6" id="m_sc_59" right="rptend" complete="i" join="m_sc_66">
<staff n="1">
<layer n="1">
<note id="n_sc_60_3" pname="c" oct="5" dur="4"/>
<note id="n_sc_62_3" pname="b" oct="4" dur="4"/>
<note id="n_sc_65_3" pname="a" oct="4" dur="4"
fermata="above"/>
</layer>
</staff>
<staff n="2">
<layer n="1">
<note id="n_sc_60_2" pname="a" oct="4" dur="4"/>
<note id="n_sc_62_2" pname="g" oct="4" dur="4"/>
<note id="n_sc_65_2" pname="e" oct="4" dur="4"
fermata="above"/>
</layer>
</staff>
<staff n="3">
<layer n="1">
<beam>
<note id="n_sc_60_1" pname="f" oct="4" dur="4"/>
<note id="n_sc_61_1" pname="d" oct="4" dur="4"/>
</beam>
<beam>
<note id="n_sc_62_1" pname="b" oct="3" dur="4"/>
<note id="n_sc_63_1" pname="c" oct="4" dur="16"/>
<note id="n_sc_64_1" pname="d" oct="4" dur="16"/>
</beam>
<note id="n_sc_65_1" pname="c" oct="4" dur="4"
fermata="above"/>
</layer>
</staff>
<staff n="4">
<layer n="1">
<note id="n_sc_60_0" pname="d" oct="3" dur="4"/>
<note id="n_sc_62_0" pname="e" oct="3" dur="4"/>
<note id="n_sc_65_0" pname="a" oct="2" dur="4"
fermata="above"/>
</layer>
</staff>
</measure>
</section>
<section id="B">
<measure n="6b" id="m_sc_66" complete="i" join="m_sc_59">
<staff n="1">
<layer n="1">
<note id="n_sc_68_3" pname="e" oct="5" dur="4"/>
</layer>
</staff>
<staff n="2">
<layer n="1">
<note id="n_sc_68_2" pname="a" oct="4" dur="4"/>
</layer>
</staff>
<staff n="3">
<layer n="1">
<note id="n_sc_68_1" pname="c" oct="4" dur="4"/>
</layer>
</staff>
<staff n="4">
<layer n="1">
<note id="n_sc_68_0" pname="a" oct="3" dur="4"/>
</layer>
</staff>
</measure>
Source code for the Humdrum to MEI converter (written in C++):
http://museinfo.sapp.org/examples/humdrum/hum2mei.cpp
It has basic infrastructure for multi-layer staves (such as for piano music)
which I can work on developing before March. For example, I have encoded
all of the Beethoven piano sonatas in Humdrum format which might be nice
to have in MEI format:
http://kern.ccarh.org/cgi-bin/ksbrowse?l=beethoven/sonatas
-=+Craig
More information about the mei-l
mailing list