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

first and second ending #91

Open
sannedubois opened this issue May 9, 2018 · 1 comment
Open

first and second ending #91

sannedubois opened this issue May 9, 2018 · 1 comment
Assignees

Comments

@sannedubois
Copy link

I saw a conversation about the first and second ending in rism-digital/verovio#404

Would it be possible to have this implemented in the vhv? Importing music xml unfortunately does not yet display first and second endings.

Manually entering this works fine:

**kern
*clefG2
*M4/4
*>A
=2
*>A1
1d
=3:||
*>A2
1e
==
*-```
@craigsapp
Copy link
Member

MusicXML test data:

screen shot 2018-11-18 at 11 25 32 pm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="3.1">
  <work>
    <work-title>Title</work-title>
    </work>
  <identification>
    <creator type="composer">Composer</creator>
    <encoding>
      <software>MuseScore 2.3.2</software>
      <encoding-date>2018-11-18</encoding-date>
      <supports element="accidental" type="yes"/>
      <supports element="beam" type="yes"/>
      <supports element="print" attribute="new-page" type="yes" value="yes"/>
      <supports element="print" attribute="new-system" type="yes" value="yes"/>
      <supports element="stem" type="yes"/>
      </encoding>
    </identification>
  <defaults>
    <scaling>
      <millimeters>7.05556</millimeters>
      <tenths>40</tenths>
      </scaling>
    <page-layout>
      <page-height>1683.36</page-height>
      <page-width>1190.88</page-width>
      <page-margins type="even">
        <left-margin>56.6929</left-margin>
        <right-margin>56.6929</right-margin>
        <top-margin>56.6929</top-margin>
        <bottom-margin>113.386</bottom-margin>
        </page-margins>
      <page-margins type="odd">
        <left-margin>56.6929</left-margin>
        <right-margin>56.6929</right-margin>
        <top-margin>56.6929</top-margin>
        <bottom-margin>113.386</bottom-margin>
        </page-margins>
      </page-layout>
    <word-font font-family="FreeSerif" font-size="10"/>
    <lyric-font font-family="FreeSerif" font-size="11"/>
    </defaults>
  <credit page="1">
    <credit-words default-x="595.44" default-y="1626.67" justify="center" valign="top" font-size="24">Title</credit-words>
    </credit>
  <credit page="1">
    <credit-words default-x="1134.19" default-y="1526.67" justify="right" valign="bottom" font-size="12">Composer</credit-words>
    </credit>
  <part-list>
    <score-part id="P1">
      <part-name>Piano</part-name>
      <part-abbreviation>Pno.</part-abbreviation>
      <score-instrument id="P1-I1">
        <instrument-name>Piano</instrument-name>
        </score-instrument>
      <midi-device id="P1-I1" port="1"></midi-device>
      <midi-instrument id="P1-I1">
        <midi-channel>1</midi-channel>
        <midi-program>1</midi-program>
        <volume>78.7402</volume>
        <pan>0</pan>
        </midi-instrument>
      </score-part>
    </part-list>
  <part id="P1">
    <measure number="1" width="572.06">
      <print>
        <system-layout>
          <system-margins>
            <left-margin>0.00</left-margin>
            <right-margin>-0.00</right-margin>
            </system-margins>
          <top-system-distance>170.00</top-system-distance>
          </system-layout>
        </print>
      <barline location="left">
        <ending number="1" type="start" default-y="30.00"/>
        </barline>
      <attributes>
        <divisions>1</divisions>
        <key>
          <fifths>0</fifths>
          </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
          </time>
        <clef>
          <sign>G</sign>
          <line>2</line>
          </clef>
        </attributes>
      <note default-x="75.17" default-y="-45.00">
        <pitch>
          <step>D</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        <ending number="1" type="stop"/>
        <repeat direction="backward"/>
        </barline>
      </measure>
    <measure number="2" width="505.43">
      <barline location="left">
        <ending number="2" type="start" default-y="30.00"/>
        </barline>
      <note default-x="12.00" default-y="-40.00">
        <pitch>
          <step>E</step>
          <octave>4</octave>
          </pitch>
        <duration>4</duration>
        <voice>1</voice>
        <type>whole</type>
        </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
        <ending number="2" type="stop"/>
        </barline>
      </measure>
    </part>
  </score-partwise>

Current rendering in VHV:

screen shot 2018-11-18 at 11 27 40 pm

Label analysis should be done on the MusicXML data, and probably result in:

**kern
*>[A1,A1,A2]
*>norep[A1,A2]
*clefG2
*k[]
*M4/4
*>A1
=1
1d
=2:|!
*>A2
1e
==
*-

screen shot 2018-11-18 at 11 33 16 pm

The line

*>[A1,A1,A2]

Means that the expansion (for performance) is the A1 section followed by A1 again, followed by A2.

The line

*>norep[A1,A2]

is a labeled expansion list which explains how to expand with only second repeats (technically maybe this would normally expand to only A2, but the example is very short).

The labels:

*>A1
*>A2

are used to mark the first and second repeats. This is a convention which is triggered by numbers at the end of the label.

Examples of MEI endings: rism-digital/verovio#631

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

2 participants