diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp index 257a672f04b8..228ea1769c0f 100644 --- a/importexport/musicxml/importmxmlpass2.cpp +++ b/importexport/musicxml/importmxmlpass2.cpp @@ -5364,7 +5364,10 @@ void MusicXMLParserLyric::parse() const auto l = lyric.release(); _numberedLyrics[lyricNo] = l; - if (hasExtend && (extendType == "" || extendType == "start")) + if (hasExtend + && (extendType == "" || extendType == "start") + && (l->syllabic() == Lyrics::Syllabic::SINGLE || l->syllabic() == Lyrics::Syllabic::END) + ) _extendedLyrics.insert(l); Q_ASSERT(_e.isEndElement() && _e.name() == "lyric"); diff --git a/mtest/musicxml/io/testLyricExtensions.xml b/mtest/musicxml/io/testLyricExtensions.xml new file mode 100644 index 000000000000..09e4a3ef81ff --- /dev/null +++ b/mtest/musicxml/io/testLyricExtensions.xml @@ -0,0 +1,275 @@ + + + + + MuseScore testfile + Lyric Extensions + + + Henry Ives + + MuseScore 0.7.0 + 2007-09-10 + + + + + + + + + + Piano + + Staff 1 + + + + 1 + 1 + 78.7402 + 0 + + + + + + + 2 + + 2 + + + + G + 2 + + + + + F + 1 + 4 + + 2 + 1 + quarter + up + + single + Oh + + + + + F + 1 + 4 + + 2 + 1 + quarter + up + + single + say + + + + + G + 4 + + 2 + 1 + quarter + up + + single + can + + + + + A + 4 + + 2 + 1 + quarter + up + + single + you + + + + + + + A + 4 + + 2 + 1 + quarter + up + + single + see + + + + + G + 4 + + 2 + 1 + quarter + up + + single + by + + + + + F + 1 + 4 + + 2 + 1 + quarter + up + + single + the + + + + + E + 4 + + 2 + 1 + quarter + up + + + + + single + dawn's + + + + + + + + D + 4 + + 2 + 1 + quarter + up + + + + + + + D + 4 + + 2 + 1 + quarter + up + + + + + begin + ear + + + + + E + 4 + + 2 + 1 + quarter + up + + + + F + 1 + 4 + + 2 + 1 + quarter + up + + + + + + F + 1 + 4 + + 3 + 1 + quarter + + up + + + + + + + E + 4 + + 1 + 1 + eighth + up + + single + ly + + + + + E + 4 + + 4 + 1 + half + up + + single + light? + + + + light-heavy + + + + diff --git a/mtest/musicxml/io/testLyricExtensions_ref.mscx b/mtest/musicxml/io/testLyricExtensions_ref.mscx new file mode 100644 index 000000000000..a7f9bd3a3490 --- /dev/null +++ b/mtest/musicxml/io/testLyricExtensions_ref.mscx @@ -0,0 +1,332 @@ + + + + + 0 + 480 + + 1 + 1 + 1 + 0 + + Henry Ives + + + + + + + + MuseScore testfile + Lyric Extensions + + + + stdNormal + + + Piano + + Piano + Staff 1 + 21 + 108 + 21 + 108 + keyboard.piano + F + 0 + + 100 + 95 + + + 100 + 33 + + + 100 + 50 + + + 100 + 67 + + + 100 + 100 + + + 120 + 67 + + + 150 + 100 + + + 150 + 50 + + + 120 + 50 + + + 120 + 100 + + + + + + + + + + 10 + + + Lyric Extensions + + + + MuseScore testfile + + + + Henry Ives + + + + + + G + G + + + 2 + + + 4 + 4 + + + quarter + + Oh + + up + + 66 + 20 + + + + quarter + + say + + up + + 66 + 20 + + + + quarter + + can + + up + + 67 + 15 + + + + quarter + + you + + up + + 69 + 17 + + + + + + + + quarter + + see + + up + + 69 + 17 + + + + quarter + + by + + up + + 67 + 15 + + + + quarter + + the + + up + + 66 + 20 + + + + quarter + + 480 + 1/4 + dawn's + + + + down + + + + 1 + -3/4 + + + + up + + 64 + 18 + + + + + + + + quarter + + + + -1 + 3/4 + + + + up + + 62 + 16 + + + + quarter + + begin + ear + + + + down + + + + 1 + -1/4 + + + + up + + 62 + 16 + + + + quarter + up + + 64 + 18 + + + + quarter + up + + 66 + 20 + + + + + + + + 1 + quarter + + + + -1 + 1/4 + + + + up + + 66 + 20 + + + + no + eighth + + ly + + up + + 64 + 18 + + + + half + + light? + + up + + 64 + 18 + + + + end + + + + + + diff --git a/mtest/musicxml/io/tst_mxml_io.cpp b/mtest/musicxml/io/tst_mxml_io.cpp index b57147596456..4cec9b56eb16 100644 --- a/mtest/musicxml/io/tst_mxml_io.cpp +++ b/mtest/musicxml/io/tst_mxml_io.cpp @@ -136,6 +136,8 @@ private slots: void lines4() { mxmlMscxExportTestRef("testLines4"); } void lyricColor() { mxmlIoTest("testLyricColor"); } void lyrics1() { mxmlIoTestRef("testLyrics1"); } + void lyricExtensions1() { mxmlIoTest("testLyricExtensions"); } + void lyricExtensions2() { mxmlImportTestRef("testLyricExtensions"); } void lyricsVoice2a() { mxmlIoTest("testLyricsVoice2a"); } void lyricsVoice2b() { mxmlIoTestRef("testLyricsVoice2b"); } void measureLength() { mxmlIoTestRef("testMeasureLength"); }