Merge pull request #2047 from trig-ger/midi_lyrics
Fix #63716: MIDI lyrics import bug (missing lyrics text)
This commit is contained in:
commit
316d7e743d
7 changed files with 694 additions and 36 deletions
|
@ -3136,17 +3136,23 @@ void Score::addLyrics(int tick, int staffIdx, const QString& txt)
|
|||
qPrintable(txt), tick);
|
||||
return;
|
||||
}
|
||||
int track = staffIdx * VOICES;
|
||||
ChordRest* cr = static_cast<ChordRest*>(seg->element(track));
|
||||
if (cr) {
|
||||
Lyrics* l = new Lyrics(this);
|
||||
l->setXmlText(txt);
|
||||
l->setTrack(track);
|
||||
cr->add(l);
|
||||
|
||||
bool lyricsAdded = false;
|
||||
for (int voice = 0; voice < VOICES; ++voice) {
|
||||
int track = staffIdx * VOICES + voice;
|
||||
ChordRest* cr = static_cast<ChordRest*>(seg->element(track));
|
||||
if (cr) {
|
||||
Lyrics* l = new Lyrics(this);
|
||||
l->setXmlText(txt);
|
||||
l->setTrack(track);
|
||||
cr->add(l);
|
||||
lyricsAdded = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!lyricsAdded) {
|
||||
qDebug("no chord/rest for lyrics<%s> at tick %d, staff %d",
|
||||
qPrintable(txt), tick, staffIdx);
|
||||
qPrintable(txt), tick, staffIdx);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -135,26 +135,28 @@ BestTrack findBestTrack(
|
|||
return bestTrack;
|
||||
}
|
||||
|
||||
void addTitle(Score *score, const QString &string, int *textCounter)
|
||||
bool isTitlePrefix(const QString &text)
|
||||
{
|
||||
if (string.left(TEXT_PREFIX.size()) == QString::fromStdString(TEXT_PREFIX)) {
|
||||
++*textCounter;
|
||||
Text* text = new Text(score);
|
||||
if (*textCounter == 1)
|
||||
text->setTextStyleType(TextStyleType::TITLE);
|
||||
else if (*textCounter == 2)
|
||||
text->setTextStyleType(TextStyleType::COMPOSER);
|
||||
text->setPlainText(string.right(string.size() - TEXT_PREFIX.size()));
|
||||
return (text.left(TEXT_PREFIX.size()) == QString::fromStdString(TEXT_PREFIX));
|
||||
}
|
||||
|
||||
MeasureBase* measure = score->first();
|
||||
if (measure->type() != Element::Type::VBOX) {
|
||||
measure = new VBox(score);
|
||||
measure->setTick(0);
|
||||
measure->setNext(score->first());
|
||||
score->measures()->add(measure);
|
||||
}
|
||||
measure->add(text);
|
||||
void addTitleToScore(Score *score, const QString &string, int textCounter)
|
||||
{
|
||||
Text* text = new Text(score);
|
||||
if (textCounter == 1)
|
||||
text->setTextStyleType(TextStyleType::TITLE);
|
||||
else if (textCounter == 2)
|
||||
text->setTextStyleType(TextStyleType::COMPOSER);
|
||||
text->setPlainText(string.right(string.size() - TEXT_PREFIX.size()));
|
||||
|
||||
MeasureBase* measure = score->first();
|
||||
if (measure->type() != Element::Type::VBOX) {
|
||||
measure = new VBox(score);
|
||||
measure->setTick(0);
|
||||
measure->setNext(score->first());
|
||||
score->measures()->add(measure);
|
||||
}
|
||||
measure->add(text);
|
||||
}
|
||||
|
||||
// remove slashes in kar format
|
||||
|
@ -176,19 +178,31 @@ std::string removeSlashes(const std::string &text)
|
|||
return str;
|
||||
}
|
||||
|
||||
void addTitleIfAny(const std::multimap<ReducedFraction, std::string> &lyricTrack, Score *score)
|
||||
{
|
||||
int textCounter = 0;
|
||||
for (const auto &lyric: lyricTrack) {
|
||||
if (lyric.first == ReducedFraction(0, 1)) {
|
||||
QString text = MidiCharset::convertToCharset(lyric.second);
|
||||
if (isTitlePrefix(text)) {
|
||||
++textCounter;
|
||||
addTitleToScore(score, text, textCounter);
|
||||
}
|
||||
}
|
||||
else if (lyric.first > ReducedFraction(0, 1)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addLyricsToScore(
|
||||
const std::multimap<ReducedFraction, std::string> &lyricTrack,
|
||||
const std::vector<std::pair<ReducedFraction, ReducedFraction>> &matchedLyricTimes,
|
||||
const Staff *staffAddTo)
|
||||
{
|
||||
Score *score = staffAddTo->score();
|
||||
int textCounter = 0;
|
||||
for (const auto &lyric: lyricTrack) {
|
||||
if (lyric.first == ReducedFraction(0, 1)) {
|
||||
QString text = MidiCharset::convertToCharset(lyric.second);
|
||||
addTitle(score, text, &textCounter);
|
||||
}
|
||||
}
|
||||
|
||||
addTitleIfAny(lyricTrack, score);
|
||||
|
||||
for (const auto &timePair: matchedLyricTimes) {
|
||||
const auto quantizedTime = timePair.first;
|
||||
|
@ -198,9 +212,10 @@ void addLyricsToScore(
|
|||
Q_ASSERT_X(it != lyricTrack.end(),
|
||||
"MidiLyrics::addLyricsToScore", "Lyric time not found");
|
||||
|
||||
if (originalTime != ReducedFraction(0, 1)) { // not title
|
||||
QString text = MidiCharset::convertToCharset(it->second);
|
||||
score->addLyrics(quantizedTime.ticks(), staffAddTo->idx(), removeSlashes(text));
|
||||
QString text = MidiCharset::convertToCharset(it->second);
|
||||
if (originalTime != ReducedFraction(0, 1) || !isTitlePrefix(text)) { // not title
|
||||
score->addLyrics(quantizedTime.ticks(), staffAddTo->idx(),
|
||||
removeSlashes(text));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
BIN
mtest/importmidi/lyrics_time_0.mid
Normal file
BIN
mtest/importmidi/lyrics_time_0.mid
Normal file
Binary file not shown.
210
mtest/importmidi/lyrics_time_0.mscx
Normal file
210
mtest/importmidi/lyrics_time_0.mscx
Normal file
|
@ -0,0 +1,210 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.00">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
<Division>480</Division>
|
||||
<Style>
|
||||
<page-layout>
|
||||
<page-height>1683.78</page-height>
|
||||
<page-width>1190.55</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>
|
||||
<Spatium>1.76389</Spatium>
|
||||
</Style>
|
||||
<showInvisible>1</showInvisible>
|
||||
<showUnprintable>1</showUnprintable>
|
||||
<showFrames>1</showFrames>
|
||||
<showMargins>0</showMargins>
|
||||
<metaTag name="arranger"></metaTag>
|
||||
<metaTag name="composer"></metaTag>
|
||||
<metaTag name="copyright"></metaTag>
|
||||
<metaTag name="lyricist"></metaTag>
|
||||
<metaTag name="movementNumber"></metaTag>
|
||||
<metaTag name="movementTitle"></metaTag>
|
||||
<metaTag name="poet"></metaTag>
|
||||
<metaTag name="source"></metaTag>
|
||||
<metaTag name="translator"></metaTag>
|
||||
<metaTag name="workNumber"></metaTag>
|
||||
<metaTag name="workTitle"></metaTag>
|
||||
<PageList>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
</StaffType>
|
||||
<bracket type="1" span="2"/>
|
||||
<barLineSpan>2</barLineSpan>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<StaffType group="pitched">
|
||||
</StaffType>
|
||||
<defaultClef>F</defaultClef>
|
||||
</Staff>
|
||||
<trackName>Piano, untitled</trackName>
|
||||
<Instrument>
|
||||
<longName>Piano, untitled</longName>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<instrumentId>keyboard.piano</instrumentId>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>G</concertClefType>
|
||||
<transposingClefType>G</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>1</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>3</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<text>G_maj_0 </text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>67</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>71</pitch>
|
||||
<tpc>19</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>F</concertClefType>
|
||||
<transposingClefType>F</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>1</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>3</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<Note>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<pitch>59</pitch>
|
||||
<tpc>19</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<pitch>62</pitch>
|
||||
<tpc>16</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>57</pitch>
|
||||
<tpc>17</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
BIN
mtest/importmidi/lyrics_voice_1.mid
Normal file
BIN
mtest/importmidi/lyrics_voice_1.mid
Normal file
Binary file not shown.
423
mtest/importmidi/lyrics_voice_1.mscx
Normal file
423
mtest/importmidi/lyrics_voice_1.mscx
Normal file
|
@ -0,0 +1,423 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="2.00">
|
||||
<Score>
|
||||
<LayerTag id="0" tag="default"></LayerTag>
|
||||
<currentLayer>0</currentLayer>
|
||||
<Division>480</Division>
|
||||
<Style>
|
||||
<page-layout>
|
||||
<page-height>1683.78</page-height>
|
||||
<page-width>1190.55</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>
|
||||
<Spatium>1.76389</Spatium>
|
||||
</Style>
|
||||
<showInvisible>1</showInvisible>
|
||||
<showUnprintable>1</showUnprintable>
|
||||
<showFrames>1</showFrames>
|
||||
<showMargins>0</showMargins>
|
||||
<metaTag name="arranger"></metaTag>
|
||||
<metaTag name="composer"></metaTag>
|
||||
<metaTag name="copyright"></metaTag>
|
||||
<metaTag name="lyricist"></metaTag>
|
||||
<metaTag name="movementNumber"></metaTag>
|
||||
<metaTag name="movementTitle"></metaTag>
|
||||
<metaTag name="poet"></metaTag>
|
||||
<metaTag name="source"></metaTag>
|
||||
<metaTag name="translator"></metaTag>
|
||||
<metaTag name="workNumber"></metaTag>
|
||||
<metaTag name="workTitle"></metaTag>
|
||||
<PageList>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
</StaffType>
|
||||
<bracket type="1" span="2"/>
|
||||
<barLineSpan>2</barLineSpan>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<StaffType group="pitched">
|
||||
</StaffType>
|
||||
<defaultClef>F</defaultClef>
|
||||
</Staff>
|
||||
<trackName>Piano, untitled</trackName>
|
||||
<Instrument>
|
||||
<longName>Piano, untitled</longName>
|
||||
<shortName>Pno.</shortName>
|
||||
<trackName>Piano</trackName>
|
||||
<minPitchP>21</minPitchP>
|
||||
<maxPitchP>108</maxPitchP>
|
||||
<minPitchA>21</minPitchA>
|
||||
<maxPitchA>108</maxPitchA>
|
||||
<instrumentId>keyboard.piano</instrumentId>
|
||||
<clef staff="2">F</clef>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>95</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccatissimo">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>33</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="portato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="marcato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>67</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="0"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>G</concertClefType>
|
||||
<transposingClefType>G</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>3</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="2">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="3">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="4">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="5">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="6">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="7">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="8">
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<text>C_min_0 </text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<tick>10080</tick>
|
||||
<Rest>
|
||||
<track>1</track>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<track>1</track>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Chord>
|
||||
<track>1</track>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<Tie id="2">
|
||||
<track>1</track>
|
||||
</Tie>
|
||||
<pitch>63</pitch>
|
||||
<tpc>11</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
</Measure>
|
||||
<Measure number="9">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
<tick>11520</tick>
|
||||
<Chord>
|
||||
<track>1</track>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<Tie id="3">
|
||||
<track>1</track>
|
||||
</Tie>
|
||||
<endSpanner id="2"/>
|
||||
<pitch>63</pitch>
|
||||
<tpc>11</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<pitch>67</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<track>1</track>
|
||||
<durationType>eighth</durationType>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<endSpanner id="3"/>
|
||||
<pitch>63</pitch>
|
||||
<tpc>11</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<pitch>69</pitch>
|
||||
<tpc>17</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<track>1</track>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<track>1</track>
|
||||
<text>G_min_0 </text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<pitch>62</pitch>
|
||||
<tpc>16</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<pitch>70</pitch>
|
||||
<tpc>12</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<track>1</track>
|
||||
<durationType>quarter</durationType>
|
||||
<Lyrics>
|
||||
<track>1</track>
|
||||
<text>C_min_0 </text>
|
||||
</Lyrics>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<pitch>63</pitch>
|
||||
<tpc>11</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<track>1</track>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
</Measure>
|
||||
</Staff>
|
||||
<Staff id="2">
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>F</concertClefType>
|
||||
<transposingClefType>F</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>-2</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>3</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="2">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="3">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="4">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="5">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="6">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="7">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="3" n="4"/>
|
||||
</Rest>
|
||||
</Measure>
|
||||
<Measure number="8">
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<Tie id="4">
|
||||
</Tie>
|
||||
<pitch>48</pitch>
|
||||
<tpc>14</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<Tie id="5">
|
||||
</Tie>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
</Measure>
|
||||
<Measure number="9">
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<endSpanner id="4"/>
|
||||
<pitch>48</pitch>
|
||||
<tpc>14</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<endSpanner id="5"/>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>43</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>48</pitch>
|
||||
<tpc>14</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
<Note>
|
||||
<pitch>55</pitch>
|
||||
<tpc>15</tpc>
|
||||
<velocity>64</velocity>
|
||||
<veloType>user</veloType>
|
||||
</Note>
|
||||
</Chord>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -398,6 +398,10 @@ class TestImportMidi : public QObject, public MTest
|
|||
void instrument3StaffOrgan() { mf("instrument_3staff_organ"); }
|
||||
void instrumentClef() { noTempoText("instrument_clef"); }
|
||||
|
||||
// lyrics
|
||||
void lyricsTime0() { noTempoText("lyrics_time_0"); }
|
||||
void lyricsVoice1() { noTempoText("lyrics_voice_1"); }
|
||||
|
||||
// gui - tracks model
|
||||
void testGuiTracksModel();
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue