humlib icon indicating copy to clipboard operation
humlib copied to clipboard

Preserve instrument names in mei2hum

Open craigsapp opened this issue 7 years ago • 0 comments

When converting from MEI to Humdrum with the mei2hum tool, the instrument names should be preserved.

An example is found on the page . http://plugins.humdrum.org/topic/mei

Where the scoreDef element:

                  <scoreDef xml:id="scoredef-0000001205720306">
                        <staffGrp xml:id="staffgrp-0000001379034265" bar.thru="false">
                            <staffDef xml:id="staffdef-0000000879784629" clef.shape="G" clef.line="2" clef.dis="8" clef.dis.place="below" key.sig="4s" meter.count="3" meter.unit="4" n="1" lines="5">
                                <label xml:id="label-0000000665763348">Tenor 1</label>
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000478264066" clef.shape="G" clef.line="2" clef.dis="8" clef.dis.place="below" key.sig="4s" meter.count="3" meter.unit="4" n="2" lines="5">
                                <label xml:id="label-0000000421618405">Tenor 2</label>
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000932329301" clef.shape="F" clef.line="4" key.sig="4s" meter.count="3" meter.unit="4" n="3" lines="5">
                                <label xml:id="label-0000000112074548">Bass 1</label>
                            </staffDef>
                            <staffDef xml:id="staffdef-0000000324409866" clef.shape="F" clef.line="4" key.sig="4s" meter.count="3" meter.unit="4" n="4" lines="5">
                                <label xml:id="label-0000000210608024">Bass 2</label>
                            </staffDef>
                        </staffGrp>
                        <pgHead xml:id="pghead-0000001418995525">
                            <rend xml:id="rend-0000001251888740" halign="center" valign="middle">
                                <rend xml:id="rend-0000001596763521" fontsize="x-large">Vier Lieder</rend>
                                <lb xml:id="lb-0000001589211302" /> 
<lb xml:id="lb-0000001196580865" /> </rend>
                            <rend xml:id="rend-0000000679757185" halign="right" valign="bottom" fontsize="small">Felix Mendelssohn</rend>
                        </pgHead>
                    </scoreDef>

contains <label> elements for each staff. These need to be converted into *I" records in the Humdrum file:

*I"Bass 2	*I"Bass 1	*I"Tenor 2	*I"Tenor 1

craigsapp avatar Dec 24 '18 15:12 craigsapp