-
Notifications
You must be signed in to change notification settings - Fork 9
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
line break in tempo marking interaction with square brackets #869
Comments
Commit rism-digital/verovio@55ec0f8 forces text with newline ( However there is a strange behavior in verovio: when converting from Humdrum into verovio directly, the When converting Humdrum data into MEI and then loading that MEI data into verovio, the Example: **kern
!LO:TX:a:t=Allegro\n[quarter]=120
1c
*- Direct rendering with verovio: Click to view MEI data for above example (output conversion from Humdrum data)<?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>
<unpub>This MEI file was created by Verovio's Humdrum converter. When published, this unpub element should be removed, and the enclosing pubStmt element should be properly filled out.</unpub>
</pubStmt>
</fileDesc>
<encodingDesc>
<appInfo>
<application isodate="2024-01-22T22:55:51" version="4.2.0-dev-80ec72d">
<name>Verovio</name>
<p>Transcoded from Humdrum</p>
</application>
</appInfo>
</encodingDesc>
<extMeta>
<frames xmlns="http://www.humdrum.org/ns/humxml" />
</extMeta>
</meiHead>
<music>
<body>
<mdiv xml:id="m1h8vudq">
<score xml:id="scqoc7k">
<scoreDef xml:id="sls267m" midi.bpm="400.000000">
<staffGrp xml:id="stnyj44">
<staffDef xml:id="staffdef-L1F1" n="1" lines="5">
<clef xml:id="cpnl3w7" shape="G" line="2" />
</staffDef>
</staffGrp>
</scoreDef>
<section xml:id="section-L1F1">
<measure xml:id="measure-L1" right="invis">
<staff xml:id="staff-L1F1" n="1">
<layer xml:id="layer-L1F1N1" n="1">
<note xml:id="note-L3F1" dur="1" oct="4" pname="c" accid.ges="n" />
</layer>
</staff>
<tempo xml:id="tempo-L3F1" place="above" staff="1" tstamp="1.000000">
<rend xml:id="rgi3w8m">Allegro<lb xml:id="lsqb6fi" />
<symbol xml:id="swk2v3e" glyph.auth="smufl" glyph.name="metNoteQuarterUp" fontsize="70.00%" /> = 120</rend>
</tempo>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei> If the converted MEI is then loaded into verovio, the line break is present as expected in the output SVG: If a space is added before the **kern
!LO:TX:a:t=Allegro\n [quarter]=120
1c
*- The direct conversion from Humdrum to SVG with verovio will add the linebreak: Click to view MEI conversion of above Humdrum data<?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>
<unpub>This MEI file was created by Verovio's Humdrum converter. When published, this unpub element should be removed, and the enclosing pubStmt element should be properly filled out.</unpub>
</pubStmt>
</fileDesc>
<encodingDesc>
<appInfo>
<application isodate="2024-01-22T23:01:11" version="4.2.0-dev-80ec72d">
<name>Verovio</name>
<p>Transcoded from Humdrum</p>
</application>
</appInfo>
</encodingDesc>
<extMeta>
<frames xmlns="http://www.humdrum.org/ns/humxml" />
</extMeta>
</meiHead>
<music>
<body>
<mdiv xml:id="m18tw7lh">
<score xml:id="s1ssfxay">
<scoreDef xml:id="svpalys" midi.bpm="400.000000">
<staffGrp xml:id="seln8j8">
<staffDef xml:id="staffdef-L1F1" n="1" lines="5">
<clef xml:id="c1iou3zg" shape="G" line="2" />
</staffDef>
</staffGrp>
</scoreDef>
<section xml:id="section-L1F1">
<measure xml:id="measure-L1" right="invis">
<staff xml:id="staff-L1F1" n="1">
<layer xml:id="layer-L1F1N1" n="1">
<note xml:id="note-L3F1" dur="1" oct="4" pname="c" accid.ges="n" />
</layer>
</staff>
<tempo xml:id="tempo-L3F1" place="above" staff="1" tstamp="1.000000">
<rend xml:id="rjuj5r1">Allegro<lb xml:id="lg8e0nj" /> <symbol xml:id="s1royt93" glyph.auth="smufl" glyph.name="metNoteQuarterUp" fontsize="70.00%" /> = 120</rend>
</tempo>
</measure>
</section>
</score>
</mdiv>
</body>
</music>
</mei> The converted <tempo xml:id="tempo-L3F1" place="above" staff="1" tstamp="1.000000">
<rend xml:id="rgi3w8m">Allegro<lb xml:id="lsqb6fi" />
<symbol xml:id="swk2v3e" glyph.auth="smufl" glyph.name="metNoteQuarterUp" fontsize="70.00%" /> = 120</rend>
</tempo> And the converted <tempo xml:id="tempo-L3F1" place="above" staff="1" tstamp="1.000000">
<rend xml:id="rjuj5r1">Allegro<lb xml:id="lg8e0nj" /> <symbol xml:id="s1royt93" glyph.auth="smufl" glyph.name="metNoteQuarterUp" fontsize="70.00%" /> = 120</rend>
</tempo> One possible solution is to force a space after a newline when processing Humdrum data, although that will shift the text on the second line slightly to the right. |
See issue rism-digital/verovio#3576 |
In this example:
There should be a line break after
mosso
, but the square bracket is preventing the linebreak:The text was updated successfully, but these errors were encountered: