Skip to content

Add support for entering single, double, and ending barlines#123

Open
martha-thomae wants to merge 5 commits intoMeasuringPolyphony:masterfrom
martha-thomae:double_barlines
Open

Add support for entering single, double, and ending barlines#123
martha-thomae wants to merge 5 commits intoMeasuringPolyphony:masterfrom
martha-thomae:double_barlines

Conversation

@martha-thomae
Copy link
Copy Markdown
Contributor

Fix Issue #121

  • single barline is entered with keystroke /
  • double barlines with |
  • and final barline with =

The table shows the encodings in Humdrum and MEI:

Type of Barline Keystroke Humdrum Encoding MEI Encoding
single barline / = or =| @form = single
double barline | =|| @form = dbl
final barline = == @form = end

Proof:

Rendering of keystrokes: c a b / a b | a b =

Screenshot 2026-04-16 at 1 14 32 AM

Humdrum

**mens	**text
*clefC3	*
sA	.
sB	.
=|	.
sA	.
sB	.
=||	.
sA	.
sB	.
==	.
=-	=-
*-	*-
!!!RDF**kern: @ = marked note

MEI

<score>
  <scoreDef midi.bpm="600">
    <staffGrp symbol="bracket">
      <staffDef n="1" lines="5" notationtype="mensural.white" xml:id="triplum" clef.shape="C" clef.line="3">
        <label>triplum</label>
        <mensur/>
      </staffDef>
    </staffGrp>
  </scoreDef>
  <section>
    <staff n="1">
      <layer n="1">
        <note xml:id="m-0ee77b8f-558f-405d-80ed-b3097b885ecd" dur="semibrevis" oct="3" pname="a"/>
        <note xml:id="m-c3369498-dab3-429e-9099-ddd1c5dfcf03" dur="semibrevis" oct="3" pname="b"/>
        <barLine xml:id="m-d6f953a0-95f1-4973-b7dc-5f36d70dcc62" form="single"/>
        <note xml:id="m-e070d9ef-f145-4800-b752-7f67b4d76052" dur="semibrevis" oct="3" pname="a"/>
        <note xml:id="m-6ae9338c-e2b3-4425-abb3-f7dd6c7fb0b7" dur="semibrevis" oct="3" pname="b"/>
        <barLine xml:id="m-8e75a3af-e2cf-4ee8-93c9-e7eb25e664fa" form="dbl"/>
        <note xml:id="m-0db27652-e97a-41dc-b197-86fa41018185" dur="semibrevis" oct="3" pname="a"/>
        <note xml:id="m-53b20ef6-e55e-4aa6-a64c-dc7264c17f1e" dur="semibrevis" oct="3" pname="b"/>
        <barLine xml:id="m-9e59d659-ab7d-4560-a07d-d76e46424730" form="end"/>
      </layer>
    </staff>
  </section>
</score>

Keystrokes for single ('|') and double/end ('=') barlines which are rendered and saved in Humdrum (as single '=' and double '==', respectively). When exported into MEI (which naturally uses Humdrum functionality to convert to MEI), the double/end barline ('==') is encoded as 'form=end', the single one ('=') is not parsed into any attribute form (because Humdrum does not encode it into MEI, it is used in KERN for measures).
Missing: parsing the MEI barlines correctly.
It does not seem to be working yet.
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