Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement secondary transpositions #858

Open
craigsapp opened this issue Oct 16, 2023 · 1 comment
Open

Implement secondary transpositions #858

craigsapp opened this issue Oct 16, 2023 · 1 comment

Comments

@craigsapp
Copy link
Member

Only the first transposition (in D) is transferred in the Humdrum-to-MEI conversion:

Screenshot 2023-10-16 at 07 09 16

View in VHV

**kern	**kern
*k[]	*k[]
*I"not transposed	*I"transposed
=	=
*	*ITrd-1c-2
*	*k[]
!	!LO:TX:t=in D
1c	1cc
=||	=||
*	*ITrd1c2
*	*k[]
!	!LO:TX:t=in B-flat
1c	1cc
=||	=||
*	*ITrd2c3
*	*k[]
!	!LO:TX:t=in A
1c	1cc
=||	=||
*	*ITrd-2c-3
*	*k[]
!	!LO:TX:t=in E-flat
1c	1cc
==	==
*-	*-
Click to view MEI conversion of example
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title />
   </titleStmt>
   <pubStmt />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2023-10-16T07:11:01" version="4.1.0-dev-b3d4df4-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="m1f9ss9">
    <score xml:id="srodt2k">
     <scoreDef xml:id="s2r48fs" midi.bpm="400.000000">
      <staffGrp xml:id="sodlprw" bar.thru="true" symbol="brace">
       <staffDef xml:id="staffdef-L1F2" n="1" lines="5" trans.diat="1" trans.semi="2">
        <label xml:id="label-L3F2">transposed</label>
        <clef xml:id="cnbkw06" shape="G" line="2" />
        <keySig xml:id="keysig-L6F2" sig="2f" />
       </staffDef>
       <staffDef xml:id="staffdef-L1F1" n="2" lines="5">
        <label xml:id="label-L3F1">not transposed</label>
        <clef xml:id="c7komp5" shape="G" line="2" />
        <keySig xml:id="keysig-L2F1" sig="0" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" right="dbl">
       <staff xml:id="staff-L1F2" n="1">
        <layer xml:id="layer-L1F2N1" n="1">
         <note xml:id="note-L8F2" dur="1" oct="4" pname="b" accid.ges="f" />
        </layer>
       </staff>
       <staff xml:id="staff-L1F1" n="2">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L8F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L7F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="r4yoq2u" fontstyle="normal">in D</rend>
       </dir>
      </measure>
      <scoreDef xml:id="s1gj6gao">
       <staffGrp xml:id="s1t4h1yd">
        <staffDef xml:id="sojdjge" n="1">
         <keySig xml:id="keysig-L11F2" sig="2s" />
        </staffDef>
       </staffGrp>
      </scoreDef>
      <measure xml:id="measure-L9" right="dbl">
       <staff xml:id="staff-L9F2N1" n="1">
        <layer xml:id="layer-L9F2N1" n="1">
         <note xml:id="note-L13F2" dur="1" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L9F1N1" n="2">
        <layer xml:id="layer-L9F1N1" n="1">
         <note xml:id="note-L13F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L12F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="r1r2xu6g" fontstyle="normal">in B-flat</rend>
       </dir>
      </measure>
      <scoreDef xml:id="s1pvhlov">
       <staffGrp xml:id="s1xd2d2q">
        <staffDef xml:id="s5gt4lw" n="1">
         <keySig xml:id="keysig-L16F2" sig="3f" />
        </staffDef>
       </staffGrp>
      </scoreDef>
      <measure xml:id="measure-L14" right="dbl">
       <staff xml:id="staff-L14F2N1" n="1">
        <layer xml:id="layer-L14F2N1" n="1">
         <note xml:id="note-L18F2" dur="1" oct="5" pname="e" accid.ges="f" />
        </layer>
       </staff>
       <staff xml:id="staff-L14F1N1" n="2">
        <layer xml:id="layer-L14F1N1" n="1">
         <note xml:id="note-L18F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L17F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="r1vnbxbo" fontstyle="normal">in A</rend>
       </dir>
      </measure>
      <scoreDef xml:id="s11ux1xk">
       <staffGrp xml:id="s1hw4lzq">
        <staffDef xml:id="s1kh0tmv" n="1">
         <keySig xml:id="keysig-L21F2" sig="3s" />
        </staffDef>
       </staffGrp>
      </scoreDef>
      <measure xml:id="measure-L19" right="end">
       <staff xml:id="staff-L19F2N1" n="1">
        <layer xml:id="layer-L19F2N1" n="1">
         <note xml:id="note-L23F2" dur="1" oct="4" pname="a" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L19F1N1" n="2">
        <layer xml:id="layer-L19F1N1" n="1">
         <note xml:id="note-L23F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L22F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="r11lstgi" fontstyle="normal">in E-flat</rend>
       </dir>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>

A secondary problem is that there should be a flat sign on the B-flat in D and E-flat in A when there are no key signatures (this is often needed for French horns, for example):

Screenshot 2023-10-16 at 07 17 25

View in VHV

The MEI conversion places the accidental in @accid.ges, but they should be in @accid:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.0/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.0">
 <meiHead>
  <fileDesc>
   <titleStmt>
    <title />
   </titleStmt>
   <pubStmt />
  </fileDesc>
  <encodingDesc>
   <appInfo>
    <application isodate="2023-10-16T07:21:35" version="4.1.0-dev-b3d4df4-dirty">
     <name>Verovio</name>
     <p>Transcoded from Humdrum</p>
    </application>
   </appInfo>
  </encodingDesc>
  <workList>
   <work>
    <title />
   </work>
  </workList>
 </meiHead>
 <music>
  <body>
   <mdiv xml:id="mow63q5">
    <score xml:id="s17r2rtg">
     <scoreDef xml:id="s2bo3b3" midi.bpm="400.000000">
      <staffGrp xml:id="s1547gwq" bar.thru="true" symbol="brace">
       <staffDef xml:id="staffdef-L1F2" n="1" lines="5" trans.diat="1" trans.semi="2">
        <label xml:id="label-L2F2">transposed</label>
        <clef xml:id="c1cr96gv" shape="G" line="2" />
       </staffDef>
       <staffDef xml:id="staffdef-L1F1" n="2" lines="5">
        <label xml:id="label-L2F1">not transposed</label>
        <clef xml:id="c1hyrlf0" shape="G" line="2" />
       </staffDef>
      </staffGrp>
     </scoreDef>
     <section xml:id="section-L1F1">
      <measure xml:id="measure-L1" right="dbl">
       <staff xml:id="staff-L1F2" n="1">
        <layer xml:id="layer-L1F2N1" n="1">
         <note xml:id="note-L6F2" dur="1" oct="4" pname="b" accid.ges="f" />
        </layer>
       </staff>
       <staff xml:id="staff-L1F1" n="2">
        <layer xml:id="layer-L1F1N1" n="1">
         <note xml:id="note-L6F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L5F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="rnw3uby" fontstyle="normal">in D</rend>
       </dir>
      </measure>
      <scoreDef xml:id="s4k1cau">
       <staffGrp xml:id="s1pvybqc">
        <staffDef xml:id="s1chk8pr" n="1" />
       </staffGrp>
      </scoreDef>
      <measure xml:id="measure-L7" right="dbl">
       <staff xml:id="staff-L7F2N1" n="1">
        <layer xml:id="layer-L7F2N1" n="1">
         <note xml:id="note-L10F2" dur="1" oct="5" pname="d" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L7F1N1" n="2">
        <layer xml:id="layer-L7F1N1" n="1">
         <note xml:id="note-L10F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L9F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="r197nb0u" fontstyle="normal">in B-flat</rend>
       </dir>
      </measure>
      <scoreDef xml:id="smlfoji">
       <staffGrp xml:id="s1rarjhi">
        <staffDef xml:id="sydtw1b" n="1" />
       </staffGrp>
      </scoreDef>
      <measure xml:id="measure-L11" right="dbl">
       <staff xml:id="staff-L11F2N1" n="1">
        <layer xml:id="layer-L11F2N1" n="1">
         <note xml:id="note-L14F2" dur="1" oct="5" pname="e" accid.ges="f" />
        </layer>
       </staff>
       <staff xml:id="staff-L11F1N1" n="2">
        <layer xml:id="layer-L11F1N1" n="1">
         <note xml:id="note-L14F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L13F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="r1ovf5gj" fontstyle="normal">in A</rend>
       </dir>
      </measure>
      <scoreDef xml:id="s66qora">
       <staffGrp xml:id="s17pzkcg">
        <staffDef xml:id="s1pkwj7j" n="1" />
       </staffGrp>
      </scoreDef>
      <measure xml:id="measure-L15" right="end">
       <staff xml:id="staff-L15F2N1" n="1">
        <layer xml:id="layer-L15F2N1" n="1">
         <note xml:id="note-L18F2" dur="1" oct="4" pname="a" accid.ges="n" />
        </layer>
       </staff>
       <staff xml:id="staff-L15F1N1" n="2">
        <layer xml:id="layer-L15F1N1" n="1">
         <note xml:id="note-L18F1" dur="1" oct="4" pname="c" accid.ges="n" />
        </layer>
       </staff>
       <dir xml:id="dir-L17F2" place="above" staff="1" tstamp="1.000000">
        <rend xml:id="rj72elv" fontstyle="normal">in E-flat</rend>
       </dir>
      </measure>
     </section>
    </score>
   </mdiv>
  </body>
 </music>
</mei>
@craigsapp
Copy link
Member Author

craigsapp commented Oct 16, 2023

Related to issue #549

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant