diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp
index 22689ea638b8..0d2dd69c8c45 100644
--- a/importexport/musicxml/importmxmlpass2.cpp
+++ b/importexport/musicxml/importmxmlpass2.cpp
@@ -2629,6 +2629,7 @@ void MusicXMLParserDirection::direction(const QString& partId,
}
handleRepeats(measure, track, tick + _offset);
+ handleNmiCmi(measure, track, tick + _offset, delayedDirections);
// fix for Sibelius 7.1.3 (direct export) which creates metronomes without :
// if necessary, use the value calculated by metronome()
@@ -3241,6 +3242,26 @@ void MusicXMLParserDirection::handleRepeats(Measure* measure, const int track, c
}
}
+//---------------------------------------------------------
+// handleNmiCmi
+// Dolet strangely exports N.C. chord symbols as the
+// text direction "NmiCmi".
+//---------------------------------------------------------
+
+void MusicXMLParserDirection::handleNmiCmi(Measure* measure, const int track, const Fraction tick, DelayedDirectionsList& delayedDirections)
+ {
+ if (!_wordsText.contains("NmiCmi"))
+ return;
+ Harmony* ha = new Harmony(_score);
+ ha->setRootTpc(Tpc::TPC_INVALID);
+ ha->setId(-1);
+ ha->setTextName("N.C.");
+ ha->setTrack(track);
+ MusicXMLDelayedDirectionElement* delayedDirection = new MusicXMLDelayedDirectionElement(totalY(), ha, track, "above", measure, tick);
+ delayedDirections.push_back(delayedDirection);
+ _wordsText.replace("NmiCmi", "");
+ }
+
//---------------------------------------------------------
// bracket
//---------------------------------------------------------
diff --git a/importexport/musicxml/importmxmlpass2.h b/importexport/musicxml/importmxmlpass2.h
index ad0c6c968cad..55d8633e68c6 100644
--- a/importexport/musicxml/importmxmlpass2.h
+++ b/importexport/musicxml/importmxmlpass2.h
@@ -397,6 +397,7 @@ class MusicXMLParserDirection {
void sound();
void dynamics();
void handleRepeats(Measure* measure, const int track, const Fraction tick);
+ void handleNmiCmi(Measure* measure, const int track, const Fraction tick, DelayedDirectionsList& delayedDirections);
QString matchRepeat() const;
bool isLikelyFingering() const;
bool isLikelyCredit(const Fraction& tick) const;
diff --git a/mtest/musicxml/io/testTextQuirkInference.xml b/mtest/musicxml/io/testTextQuirkInference.xml
new file mode 100644
index 000000000000..206fb36a9838
--- /dev/null
+++ b/mtest/musicxml/io/testTextQuirkInference.xml
@@ -0,0 +1,907 @@
+
+
+
+
+ Text Quirk Inference
+
+
+ Henry Ives
+
+ MuseScore 0.7.0
+ 2007-09-10
+
+
+
+
+
+
+
+
+
+ 7
+ 40
+
+
+ 1697.14
+ 1200
+
+ 85.7143
+ 85.7143
+ 85.7143
+ 85.7143
+
+
+ 85.7143
+ 85.7143
+ 85.7143
+ 85.7143
+
+
+
+
+
+
+ title
+ Text Quirk Inference
+
+
+ subtitle
+ MuseScore Testcase
+
+
+ composer
+ Henry Ives
+
+
+
+ brace
+
+
+ Piano
+ Pno.
+
+ Piano
+
+
+
+ 1
+ 1
+ 78.7402
+ 0
+
+
+
+
+
+
+
+
+ 50.00
+ 0.00
+
+ 170.00
+
+
+
+ 2
+
+ 0
+
+
+
+ G
+ 2
+
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+
+ NmiCmi
+
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ begin
+
+
+
+
+ C
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ end
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+ 4
+ 1
+ half
+
+
+
+
+
+ C
+ 4
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+
+ C
+ 6
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+ A
+ 4
+
+ 1
+ 1
+ eighth
+ up
+ begin
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ up
+ continue
+
+
+
+ G
+ 4
+
+ 1
+ 1
+ eighth
+ up
+ end
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+
+
+ NmiCmi
+
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ begin
+
+
+
+ D
+ 5
+
+ 1
+ 1
+ eighth
+ down
+ continue
+
+
+
+ A
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ end
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+ C
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+ A
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ begin
+
+
+
+
+ D
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ C
+ 5
+
+ 1
+ 1
+ eighth
+ down
+ end
+
+
+
+
+ D
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+
+
+ C
+
+ none
+
+
+
+ G
+ 4
+
+ 1
+ 1
+ eighth
+ up
+ begin
+
+
+
+
+ A
+ 4
+
+ 1
+ 1
+ eighth
+ up
+
+
+
+ G
+ 4
+
+ 1
+ 1
+ eighth
+ up
+ end
+
+
+
+ 2
+ 1
+ quarter
+
+
+
+ A
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ begin
+
+
+
+
+ E
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ A
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ continue
+
+
+
+ D
+ 5
+
+ 1
+ 1
+ eighth
+ down
+ continue
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ end
+
+
+
+
+
+ G
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ begin
+
+
+
+
+ C
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+
+ E
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ C
+ 5
+
+ 1
+ 1
+ eighth
+ down
+ continue
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+ continue
+
+
+
+
+ D
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ F
+ 4
+
+ 1
+ 1
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ighth
+ down
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+
+
+ G
+ 4
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+
+ B
+ 4
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+
+ F
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+
+ A
+ 5
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ 1
+ 1
+ eighth
+
+
+
+ A
+ 5
+
+ 1
+ 1
+ eighth
+ down
+ begin
+
+
+
+ E
+ 5
+
+ 1
+ 1
+ eighth
+ down
+ end
+
+
+
+
+ C
+ 6
+
+ 1
+ 1
+ eighth
+ down
+
+
+
+ 4
+ 1
+ half
+
+
+ light-heavy
+
+
+
+
diff --git a/mtest/musicxml/io/testTextQuirkInference_ref.mscx b/mtest/musicxml/io/testTextQuirkInference_ref.mscx
new file mode 100644
index 000000000000..7a41069efbf7
--- /dev/null
+++ b/mtest/musicxml/io/testTextQuirkInference_ref.mscx
@@ -0,0 +1,725 @@
+
+
+
+
+ 0
+ 480
+
+ 1
+ 1
+ 1
+ 0
+
+ Henry Ives
+
+
+
+
+
+
+
+
+ Text Quirk Inference
+
+
+
+ stdNormal
+
+ 3
+
+ Piano
+
+ Piano
+ Pno.
+ Piano
+ 21
+ 108
+ 21
+ 108
+ keyboard.piano
+ F
+
+ 100
+ 95
+
+
+ 100
+ 33
+
+
+ 100
+ 50
+
+
+ 100
+ 67
+
+
+ 100
+ 100
+
+
+ 120
+ 67
+
+
+ 150
+ 100
+
+
+ 150
+ 50
+
+
+ 120
+ 50
+
+
+ 120
+ 100
+
+
+
+
+
+
+
+
+
+ 12.5
+
+
+
+ Text Quirk Inference
+
+
+
+
+ MuseScore Testcase
+
+
+
+ right,top
+
+ Henry Ives
+
+
+
+
+
+ G
+ G
+
+
+ 4
+ 4
+
+
+ eighth
+
+
+ N.C.
+
+
+ down
+ 20
+ 20
+
+
+ begin
+ eighth
+
+ 71
+ 19
+
+
+ 72
+ 14
+
+
+
+ mid
+ eighth
+
+ 71
+ 19
+
+
+
+ eighth
+
+
+ half
+
+
+
+
+
+
+ no
+ eighth
+ down
+
+ 60
+ 14
+
+
+ 84
+ 14
+
+
+
+ eighth
+
+
+ no
+ eighth
+ down
+
+ 71
+ 19
+
+
+
+ eighth
+
+
+ up
+ -3
+ -3
+
+
+ begin
+ eighth
+
+ 69
+ 17
+
+
+
+ mid
+ eighth
+
+ 71
+ 19
+
+
+
+ mid
+ eighth
+
+ 67
+ 15
+
+
+
+ eighth
+
+
+
+
+
+
+ N.C.
+
+
+ down
+ 22
+ 23
+
+
+ begin
+ eighth
+
+ 71
+ 19
+
+
+
+ mid
+ eighth
+
+ 74
+ 16
+
+
+
+ mid
+ eighth
+
+ 69
+ 17
+
+
+
+ eighth
+
+
+ no
+ eighth
+ down
+
+ 72
+ 14
+
+
+
+ eighth
+
+
+ down
+ 21
+ 19
+
+
+ begin
+ eighth
+
+ 69
+ 17
+
+
+ 74
+ 16
+
+
+
+ mid
+ eighth
+
+ 72
+ 14
+
+
+ 74
+ 16
+
+
+
+
+
+
+
+ N.C.
+
+
+ up
+ -1
+ 0
+
+
+ begin
+ eighth
+
+ 67
+ 15
+
+
+ 69
+ 17
+
+
+
+ mid
+ eighth
+
+ 67
+ 15
+
+
+
+ quarter
+
+
+ down
+ 21
+ 20
+
+
+ begin
+ eighth
+
+ 69
+ 17
+
+
+ 76
+ 18
+
+
+
+ mid
+ eighth
+
+ 69
+ 17
+
+
+
+ mid
+ eighth
+
+ 74
+ 16
+
+
+
+ mid
+ eighth
+
+ 71
+ 19
+
+
+
+
+
+
+
+ down
+ 26
+ 27
+
+
+ begin
+ eighth
+
+ 67
+ 15
+
+
+ 72
+ 14
+
+
+ 76
+ 18
+
+
+
+ mid
+ eighth
+
+ 72
+ 14
+
+
+
+ mid
+ eighth
+
+ 71
+ 19
+
+
+ 74
+ 16
+
+
+
+ mid
+ eighth
+
+ 65
+ 13
+
+
+ 71
+ 19
+
+
+
+ no
+ eighth
+ down
+
+ 69
+ 17
+
+
+ 76
+ 18
+
+
+
+ eighth
+
+
+ down
+ 21
+ 21
+
+
+ begin
+ eighth
+
+ 69
+ 17
+
+
+ 72
+ 14
+
+
+ 74
+ 16
+
+
+
+ mid
+ eighth
+
+ 69
+ 17
+
+
+ 76
+ 18
+
+
+
+
+
+
+
+ no
+ eighth
+ down
+
+ 71
+ 19
+
+
+
+ eighth
+
+
+ no
+ eighth
+ down
+
+ 74
+ 16
+
+
+
+ eighth
+
+
+ half
+
+
+
+
+
+
+ down
+ 20
+ 25
+
+
+ begin
+ eighth
+
+ 74
+ 16
+
+
+
+ mid
+ eighth
+
+ 69
+ 17
+
+
+ 71
+ 19
+
+
+
+ mid
+ eighth
+
+ 71
+ 19
+
+
+
+ mid
+ eighth
+
+ 67
+ 15
+
+
+
+ no
+ eighth
+ down
+
+ 81
+ 17
+
+
+
+ eighth
+
+
+ quarter
+
+
+
+
+
+
+ up
+ -3
+ -3
+
+
+ begin
+ eighth
+
+ 67
+ 15
+
+
+
+ mid
+ eighth
+
+ 71
+ 19
+
+
+
+ mid
+ eighth
+
+ 69
+ 17
+
+
+
+ eighth
+
+
+ no
+ eighth
+ down
+
+ 79
+ 15
+
+
+
+ eighth
+
+
+ no
+ eighth
+ down
+
+ 71
+ 19
+
+
+
+ eighth
+
+
+
+
+
+
+ no
+ eighth
+ down
+
+ 67
+ 15
+
+
+ 71
+ 19
+
+
+ 77
+ 13
+
+
+ 81
+ 17
+
+
+
+ eighth
+
+
+ down
+ 9
+ 13
+
+
+ begin
+ eighth
+
+ 81
+ 17
+
+
+
+ mid
+ eighth
+
+ 76
+ 18
+
+
+ 84
+ 14
+
+
+
+ half
+
+
+ end
+
+
+
+
+
+
diff --git a/mtest/musicxml/io/tst_mxml_io.cpp b/mtest/musicxml/io/tst_mxml_io.cpp
index 3ecc2c2820bc..71b77d4893d9 100644
--- a/mtest/musicxml/io/tst_mxml_io.cpp
+++ b/mtest/musicxml/io/tst_mxml_io.cpp
@@ -230,6 +230,7 @@ private slots:
void tempoTextSpace2() { mxmlImportTestRef("testTempoTextSpace2"); }
void textLines() { mxmlMscxExportTestRef("testTextLines"); }
void textOrder() { mxmlImportTestRef("testTextOrder"); }
+ void textQuirkInference() { mxmlImportTestRef("testTextQuirkInference"); }
void timesig1() { mxmlIoTest("testTimesig1"); }
void timesig3() { mxmlIoTest("testTimesig3"); }
void trackHandling() { mxmlIoTest("testTrackHandling"); }