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

Add support for @letterspacing #3557

Merged
merged 3 commits into from
Dec 12, 2023
Merged

Add support for @letterspacing #3557

merged 3 commits into from
Dec 12, 2023

Conversation

lpugin
Copy link
Contributor

@lpugin lpugin commented Dec 11, 2023

  • Added on syl and rend
  • The value is in MEI vu (default for data.MEASUREMENTSIGNED)
<?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>Letter spacing in lyrics</title>
            <respStmt>
               <persName role="encoder">Laurent Pugin</persName>
            </respStmt>
         </titleStmt>
         <pubStmt>
            <date isodate="2023-12-11" />
         </pubStmt>
         <seriesStmt>
            <title>Verovio test suite</title>
         </seriesStmt>
         <notesStmt>
            <annot>Letter spacing in lyrics can be controlled with syl@letterspacing. The value should be given as MEI vu.</annot>
         </notesStmt>
      </fileDesc>
      <encodingDesc>
         <appInfo>
            <application version="4.1.0" label="0">
               <name>Verovio</name>
            </application>
         </appInfo>
      </encodingDesc>
   </meiHead>
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef>
                  <staffGrp>
                     <staffDef n="1" lines="5" keysig="1f" meter.count="4" meter.unit="4">
                        <label>Alto</label>
                        <labelAbbr>A.</labelAbbr>
                        <clef shape="G" line="2" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section>
                  <measure n="1">
                     <staff n="1">
                        <layer n="1">
                           <note xml:id="n123yyhr" dur="4" oct="4" pname="f">
                              <verse n="1">
                                 <syl con="d" wordpos="i">Nor</syl>
                              </verse>
                           </note>
                           <note xml:id="nfbyegi" dur="4" oct="4" pname="g">
                              <verse n="1">
                                 <syl wordpos="t">mal</syl>
                              </verse>
                           </note>
                           <note xml:id="n1307hjq" dur="4" oct="4" pname="a">
                              <verse n="1">
                                 <syl letterspacing="2.000000" con="d" wordpos="i">wid</syl>
                              </verse>
                           </note>
                           <note xml:id="n1l7mqx4" dur="4" oct="4" pname="b">
                              <verse n="1">
                                 <syl letterspacing="2.000000" wordpos="t">der</syl>
                              </verse>
                              <accid accid.ges="f" />
                           </note>
                        </layer>
                     </staff>
                  </measure>
                  <measure n="2">
                     <staff n="1">
                        <layer n="1">
                           <note xml:id="n1x8gfg1" dur="4" oct="5" pname="c">
                              <verse n="1">
                                 <syl letterspacing="-0.200000" con="d" wordpos="i">nar</syl>
                              </verse>
                           </note>
                           <note xml:id="n1tuzjas" dur="4" oct="4" pname="b">
                              <verse n="1">
                                 <syl letterspacing="-0.200000" con="d" wordpos="m">row</syl>
                              </verse>
                              <accid accid.ges="f" />
                           </note>
                           <rest dur="4" />
                           <note dur="4" oct="4" pname="g" />
                        </layer>
                     </staff>
                  </measure>
                  <measure right="end" n="3">
                     <staff n="1">
                        <layer n="1">
                           <note xml:id="n6lxgga" dur="2" oct="4" pname="f" />
                           <rest dur="2" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>
image
<?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>Letter spacing</title>
            <respStmt>
               <persName role="encoder">Laurent Pugin</persName>
            </respStmt>
         </titleStmt>
         <pubStmt>
            <date isodate="2023-12-11" />
         </pubStmt>
         <seriesStmt>
            <title>Verovio test suite</title>
         </seriesStmt>
         <notesStmt>
            <annot>Letter spacing can be controlled with rend@letterspacing.</annot>
         </notesStmt>
      </fileDesc>
      <encodingDesc>
         <appInfo>
            <application version="4.1.0" label="0">
               <name>Verovio</name>
            </application>
         </appInfo>
      </encodingDesc>
   </meiHead>
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef>
                  <staffGrp>
                     <staffDef n="1" lines="5" keysig="1f" meter.count="4" meter.unit="4">
                        <clef shape="G" line="2" />
                     </staffDef>
                  </staffGrp>
               </scoreDef>
               <section>
                  <measure n="1">
                     <staff n="1">
                        <layer n="1">
                           <note xml:id="n1312x8i" dur="4" oct="4" pname="f" />
                           <note dur="4" oct="4" pname="g" />
                           <note dur="4" oct="4" pname="a" />
                           <note xml:id="n13uobqg" dur="4" oct="4" pname="b">
                              <accid accid.ges="f" />
                           </note>
                        </layer>
                     </staff>
                     <tempo startid="#n1312x8i" midi.bpm="63.000000">
                        <rend>Normal spacing</rend>
                     </tempo>
                     <dir type="mscore-playtech-annotation" startid="#n13uobqg">
                        <rend letterspacing="2.000000">wider</rend>
                     </dir>
                  </measure>
                  <measure n="2">
                     <staff n="1">
                        <layer n="1">
                           <note dur="4" oct="5" pname="c" />
                           <note xml:id="nwmr6bu" dur="4" oct="4" pname="b">
                              <accid accid.ges="f" />
                           </note>
                           <note dur="4" oct="4" pname="a" />
                           <note dur="4" oct="4" pname="g" />
                        </layer>
                     </staff>
                     <dir type="mscore-playtech-annotation" startid="#nwmr6bu">
                        <rend letterspacing="-0.200000">narrower spacing</rend>
                     </dir>
                  </measure>
                  <measure right="end" n="3">
                     <staff n="1">
                        <layer n="1">
                           <note dur="2" oct="4" pname="f" />
                           <rest dur="2" />
                        </layer>
                     </staff>
                  </measure>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>
image

* Added on `syl` and `rend`
* The value is in MEI vu (default for data.MEASUREMENTSIGNED)
@lpugin lpugin merged commit 5fde61a into develop Dec 12, 2023
@lpugin lpugin deleted the develop-letterspacing branch December 12, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant