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

Verovio handling of MusicXML lyric placement "above"? #1348

Closed
cambiata opened this issue Mar 20, 2020 · 7 comments
Closed

Verovio handling of MusicXML lyric placement "above"? #1348

cambiata opened this issue Mar 20, 2020 · 7 comments

Comments

@cambiata
Copy link

cambiata commented Mar 20, 2020

When importing a MusicXML file including lyrics with placement above...

<lyric number="1" placement="above"> <syllabic>begin</syllabic> <text>A</text> </lyric>

...these are not rendered correctly (at least not when trying online at https://www.verovio.org/musicxml.html)

Dorico original:
lyrics-dorico

Verovio rendering, using the MusicXML exported from Dorico:
lyrics-verovio
(Doesn't seem to matter if I use Dorico or Sibelius to produce the MusicXML.)

Is this a limitation in the Verovio renderer (not allowing lyrics above staffs, yet)?
Or is it caused in the conversion step from MusicXML to the internal Verovio data format?

Best! / Jonas

@rettinghaus
Copy link
Contributor

Please always send a test file.

@rettinghaus
Copy link
Contributor

Apart from that, it's a limitation and not implemented yet in Verovio.

@cambiata
Copy link
Author

Thank you, Klaus!

Is there a project roadmap/todo-list somewhere (other than https://github.com/rism-ch/verovio/wiki/Low-priority-wish-list)?

Here's the MusicXML used for this example:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise>
  <work>
    <work-title>Untitled Project 1</work-title>
  </work>
  <movement-title>Flow 1</movement-title>
  <identification>
    <encoding>
      <software>Dorico 3.1.0.1021</software>
      <encoding-date>2020-03-20</encoding-date>
    </encoding>
  </identification>
  <part-list>
    <score-part id="P1">
      <part-name>Soprano</part-name>
    </score-part>
  </part-list>
  <part id="P1">
    <measure number="1">
      <attributes>
        <divisions>1</divisions>
        <key number="1">
          <fifths>2</fifths>
          <mode>major</mode>
        </key>
        <time>
          <beats>4</beats>
          <beat-type>4</beat-type>
        </time>
        <staves>1</staves>
        <clef number="1">
          <sign>G</sign>
          <line>2</line>
        </clef>
      </attributes>
      <note>
        <pitch>
          <step>A</step>
          <octave>4</octave>
        </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        <lyric number="1" placement="above">
          <syllabic>begin</syllabic>
          <text>A</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>A</step>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        <lyric number="1" placement="above">
          <syllabic>end</syllabic>
          <text>ve,</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>B</step>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>1</voice>
        <type>quarter</type>
        <stem>up</stem>
        <staff>1</staff>
        <lyric number="1" placement="above">
          <syllabic>begin</syllabic>
          <text>Ma</text>
        </lyric>
      </note>
      <backup>
        <duration>4</duration>
      </backup>
      <note>
        <pitch>
          <step>D</step>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        <lyric number="1" placement="below">
          <syllabic>begin</syllabic>
          <text>A</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>E</step>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        <lyric number="1" placement="below">
          <syllabic>end</syllabic>
          <text>ve,</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        <lyric number="1" placement="below">
          <syllabic>begin</syllabic>
          <text>a</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>D</step>
          <alter>1</alter>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <tie type="start"/>
        <voice>2</voice>
        <type>quarter</type>
        <accidental>sharp</accidental>
        <stem>down</stem>
        <staff>1</staff>
        <notations>
          <tied type="start"/>
        </notations>
        <lyric number="1" placement="below">
          <syllabic>end</syllabic>
          <text>ve,</text>
          <extend/>
        </lyric>
      </note>
    </measure>
    <measure number="2">
      <attributes>
        <divisions>1</divisions>
      </attributes>
      <note>
        <pitch>
          <step>G</step>
          <octave>4</octave>
        </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        <lyric number="1" placement="above">
          <syllabic>middle</syllabic>
          <text>ri</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>A</step>
          <octave>4</octave>
        </pitch>
        <duration>2</duration>
        <voice>1</voice>
        <type>half</type>
        <stem>up</stem>
        <staff>1</staff>
        <lyric number="1" placement="above">
          <syllabic>end</syllabic>
          <text>a,</text>
        </lyric>
      </note>
      <barline location="right">
        <bar-style>light-heavy</bar-style>
      </barline>
      <backup>
        <duration>4</duration>
      </backup>
      <note>
        <pitch>
          <step>D</step>
          <alter>1</alter>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <tie type="stop"/>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        <notations>
          <tied type="stop"/>
        </notations>
      </note>
      <note>
        <pitch>
          <step>F</step>
          <alter>1</alter>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        <lyric number="1" placement="below">
          <syllabic>begin</syllabic>
          <text>Ma</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>E</step>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <stem>down</stem>
        <staff>1</staff>
        <lyric number="1" placement="below">
          <syllabic>middle</syllabic>
          <text>ri</text>
        </lyric>
      </note>
      <note>
        <pitch>
          <step>D</step>
          <octave>4</octave>
        </pitch>
        <duration>1</duration>
        <voice>2</voice>
        <type>quarter</type>
        <accidental>natural</accidental>
        <stem>down</stem>
        <staff>1</staff>
        <lyric number="1" placement="below">
          <syllabic>end</syllabic>
          <text>a,</text>
        </lyric>
      </note>
    </measure>
  </part>
</score-partwise>```



@craigsapp
Copy link
Contributor

Or is it caused in the conversion step from MusicXML to the internal Verovio data format?

There is an additional complication in this example: both verses are using @number="1" and then using @placement to distinguish between them. In other words, they are conceptually attached to layers rather than to the staff.

@cambiata
Copy link
Author

@craigsapp Yes, and that is how text is treated in lots of choir music. (The majority of a-cappella choir music editions from the romantic era and onwards, I would guess.)
Per layer-lyrics would be a welcome feature! :-)

@craigsapp
Copy link
Contributor

craigsapp commented Mar 20, 2020

The best way to encode in MEI at the moment is similar to MusicXML with MEI:@n equivalent to MusicXML:@number and MEI@place equivalent to MusicXML@placement. MusicXML is using the two attributes to indicate that there are separate streams of text sung at the same time, which would be useful to encode more explicitly, such as attached to the layer rather than the staff.

MEI's verse@n technically is a word rather than a number:
https://music-encoding.org/guidelines/v4/data-types/data.word.html
so another possibility is to encode the layer information in @n, such as @n="1.1" for verse 1 attached to layer 1 and @n="1.2" for verse 1 attached to layer 2. This would remove the need for @place, which can then be inferred from the layer to which the verse is attached.

This would allow for cases where the lyrics for both layers need to be shown above or below the staff at the same time (otherwise, one of the @n would have to be changed to 2 in this case.

The layer could be inferred from the note's layer, but this would not work in generally since lyrics can be embedded in piano music, and the lyrics would typically be attached to layer 1 but need to be displayed below the staff.

Another possibility is that verse@layer be invented, such that <verse n="1" layer="1"> would imply that the lyrics should be placed above, and to force below, <verse n="1" layer="1" place="below"> would be used.

@craigsapp
Copy link
Contributor

Also, somewhat related to issue #1329, where lyrics are conceptually attached to different layers, but both are shown below the staff.

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

3 participants