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

Render oblique ligatures with curve shapes #3962

Merged
merged 8 commits into from
Feb 24, 2025
Merged

Conversation

lpugin
Copy link
Contributor

@lpugin lpugin commented Feb 22, 2025

The PR render oblique ligatures with curved shapes.

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="https://music-encoding.org/schema/5.1/mei-all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="https://music-encoding.org/schema/5.1/mei-all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<mei xmlns="http://www.music-encoding.org/ns/mei" meiversion="5.1">
   <meiHead>
      <fileDesc>
         <titleStmt>
            <title>Ligatures (second to octave)</title>
            <respStmt>
               <persName role="encoder">Laurent Pugin</persName>
            </respStmt>
         </titleStmt>
         <pubStmt>
            <date isodate="2025-02-21"/>
         </pubStmt>
         <seriesStmt>
            <title>Verovio test suite</title>
         </seriesStmt>
         <notesStmt>
            <annot />
         </notesStmt>
      </fileDesc>
      <encodingDesc>
         <appInfo>
            <application version="5.1.0" label="2">
               <name>Verovio</name>
            </application>
         </appInfo>
      </encodingDesc>
      <extMeta><![CDATA[ { "evenNoteSpacing": true }]]></extMeta>
   </meiHead>
   <music>
      <body>
         <mdiv>
            <score>
               <scoreDef>
                  <staffGrp>
                     <staffDef n="1" notationtype="mensural.black" lines="5" clef.shape="C" clef.line="1" />
                  </staffGrp>
               </scoreDef>
               <section>
                  <staff n="1">
                     <layer n="1">
                        <ligature>
                           <note dur="brevis" oct="4" pname="e" />
                           <note dur="brevis" oct="4" pname="c" />
                        </ligature>
                        <ligature>
                           <note dur="brevis" oct="4" pname="f" />
                           <note dur="brevis" oct="4" pname="c" />
                        </ligature>
                        <ligature>
                           <note dur="brevis" oct="4" pname="g" />
                           <note dur="brevis" oct="4" pname="c" />
                        </ligature>
                        <ligature>
                           <note dur="brevis" oct="4" pname="a" />
                           <note dur="brevis" oct="4" pname="c" />
                        </ligature>
                        <ligature>
                           <note dur="brevis" oct="4" pname="b" />
                           <note dur="brevis" oct="4" pname="c" />
                        </ligature>
                        <ligature>
                           <note dur="brevis" oct="5" pname="c" />
                           <note dur="brevis" oct="4" pname="c" />
                        </ligature>
                        <!-- c.o.p. -->
                        <ligature form="obliqua">
                           <note dur="semibrevis" oct="4" pname="c" />
                           <note dur="semibrevis" oct="4" pname="d" />
                        </ligature>
                        <ligature form="obliqua">
                           <note dur="semibrevis" oct="4" pname="c" />
                           <note dur="semibrevis" oct="4" pname="e" />
                        </ligature>
                        <ligature form="obliqua">
                           <note dur="semibrevis" oct="4" pname="c" />
                           <note dur="semibrevis" oct="4" pname="f" />
                        </ligature>
                        <ligature form="obliqua">
                           <note dur="semibrevis" oct="4" pname="c" />
                           <note dur="semibrevis" oct="4" pname="g" />
                        </ligature>
                        <ligature form="obliqua">
                           <note dur="semibrevis" oct="4" pname="c" />
                           <note dur="semibrevis" oct="4" pname="b" />
                        </ligature>
                        <ligature form="obliqua">
                           <note dur="semibrevis" oct="4" pname="c" />
                           <note dur="semibrevis" oct="5" pname="c" />
                        </ligature>
                     </layer>
                  </staff>
               </section>
            </score>
         </mdiv>
      </body>
   </music>
</mei>
image

Straight polygons can still be obtained with --ligature-straight

@craigsapp
Copy link
Contributor

craigsapp commented Feb 22, 2025

Black notation oblique ligatures are usually curved:

Screenshot 2025-02-22 at 00 19 58

https://www.loc.gov/resource/gdcwdl.wdl_14175/?sp=23&st=image&r=-0.16,0.55,1.02,0.466,0

But white notation ones are usually not:

Screenshot 2025-02-22 at 00 36 08

https://digi.vatlib.it/view/MSS_Capp.Sist.160

[Note the dot above the starting note of the oblique ligature's first note near the middle of the second line.]

Will white notation oblique ligatures remain straight? If not, it would be good to have them straight as a default. And in that case the option would be

--ligature [auto|curved|straight]

Or

--ligature-oblique [auto|curved|straight]

where auto would be the default, which in black notation would be curved, and in white notation it would be straight.

It might be useful to use this option style in case you add curves to white notation oblique ligatures in the future in any case.

(These examples are two random samples I was looking at today.)

@rettinghaus
Copy link
Contributor

I agree with @craigsapp, the white mensural ligatures do look a bit weird after this change.

grafik

@lpugin
Copy link
Contributor Author

lpugin commented Feb 22, 2025

I'll change the option as suggested by @craigsapp

@craigsapp
Copy link
Contributor

Looking in Thomas Morley's book A Plain and Easie Introduction to Practicall Musicke (1771, second edition), I do see some (printed) curved oblique ligatures (first oblique ligature on two successive pages in the examples below):

Screenshot 2025-02-22 at 02 18 41

https://vmirror.imslp.org/files/imglnks/usimg/8/81/IMSLP284437-PMLP09691-plaineasyintrodu00morl_1771.pdf#page=31

First edition (1597) is the same, usually straight, sometimes curved:

Screenshot 2025-02-22 at 02 29 40

https://s9.imslp.org/files/imglnks/usimg/d/d4/IMSLP278915-PMLP09691-a_plaine_and_easie_introduction.pdf#page=8

But they are mostly straight.

@rettinghaus
Copy link
Contributor

Maybe something for the Mensural Interest Group to see if there is a desire to encode curved ligatures individually …

@lpugin
Copy link
Contributor Author

lpugin commented Feb 22, 2025

I don't think this is really an encoding question. Black notation is essentially handwritten, whereas white is equally handwritten and printed, so we see more of a mixed between curved and straight. As I said, I am happy to change it and have white ligatures straight by default.

@craigsapp
Copy link
Contributor

craigsapp commented Feb 22, 2025

I was thinking about individual ligature control as well, but as @lpugin notes, handwritten music will be variable without always having intention or meaning. The Morley example is curious since the curved/straight difference must be intentional. Maybe the music typesetter was working from a manuscript that had an exaggerated curvature to that particular ligature and they duplicated it to be safe rather than normalize it.

That is why the curved ligatures in the Morley print are interesting.


The white notation example I gave is straight but handwritten 😜

Screenshot 2025-02-22 at 00 36 08

With lots of illuminations:

Screenshot 2025-02-22 at 07 09 23

Clearly a luxury edition... It would be harder to keep the lines parallel if they are curved, so the cursive style of black notation probably fell out of favor when switching to white notation.

@lpugin lpugin requested a review from ahankinson February 24, 2025 08:20
@ahankinson
Copy link
Contributor

Is there an example of how the two options look now?

@lpugin
Copy link
Contributor Author

lpugin commented Feb 24, 2025

I added one here (with option --ligature-oblique straight)

@ahankinson
Copy link
Contributor

Am I supposed to be able to tell the difference between these two examples?

image

@craigsapp
Copy link
Contributor

Yes: these two examples are the same but the curved one should be different.

@lpugin
Copy link
Contributor Author

lpugin commented Feb 24, 2025

No, because:

  • currently 049 is still rendered straight
  • currently 050 does not do anything with --ligature-oblique straight

This is what you can see in the GH action for 049 (before and after):
image

050 is supposed to remain as before, and since the action is not detecting any difference, it is looking that it does remain the same

@lpugin
Copy link
Contributor Author

lpugin commented Feb 24, 2025

(I agree this is all very confusing, sorry)

@ahankinson
Copy link
Contributor

Ah, right. That won't change until this is merged.

Will do so.

@ahankinson ahankinson merged commit f094ea4 into develop Feb 24, 2025
9 checks passed
@lpugin lpugin deleted the develop-mensural branch February 24, 2025 12:00
@lpugin lpugin restored the develop-mensural branch February 24, 2025 12:00
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.

4 participants