diff --git a/importexport/musicxml/importmxmlpass1.cpp b/importexport/musicxml/importmxmlpass1.cpp index 6b2d096e15e7c..9b5e1ec79feca 100644 --- a/importexport/musicxml/importmxmlpass1.cpp +++ b/importexport/musicxml/importmxmlpass1.cpp @@ -1101,8 +1101,12 @@ void MusicXMLParserPass1::identification() else if (_e.name() == "encoding") { // TODO while (_e.readNextStartElement()) { - if (_e.name() == "supports" && _e.attributes().value("element") == "beam" && _e.attributes().value("type") == "yes") - _hasBeamingInfo = true; + if (_e.name() == "supports" ) { + if (_e.attributes().value("element") == "beam" && _e.attributes().value("type") == "yes") + _hasBeamingInfo = true; + else if (_e.attributes().value("element") == "transpose") + _supportsTranspose = _e.attributes().value("type").toString(); + } _e.skipCurrentElement(); } // _score->setMetaTag("encoding", _e.readElementText()); works with DOM but not with pull parser @@ -1798,6 +1802,23 @@ static const InstrumentTemplate* findInstrument(const QString& instrSound) } #endif +//--------------------------------------------------------- +// addInferredTranspose +//--------------------------------------------------------- +/** + In the case that transposition information is missing, + instrument-level transpositions are inferred here. + This changes the *written* pitch, but retains the sounding pitch. + */ +void MusicXMLParserPass1::addInferredTranspose(const QString& partId) + { + if (_parts[partId].getName().contains("guitar", Qt::CaseInsensitive) + && !_parts[partId].hasTab()) { + _parts[partId]._inferredTranspose = Interval(12); + _parts[partId]._intervals[Fraction(0, 1)] = Interval(-12); + } + } + //--------------------------------------------------------- // scorePart //--------------------------------------------------------- @@ -2374,7 +2395,7 @@ void MusicXMLParserPass1::attributes(const QString& partId, const Fraction cTime TODO: Store the clef type, to simplify staff type setting in pass 2. */ -void MusicXMLParserPass1::clef(const QString& /* partId */) +void MusicXMLParserPass1::clef(const QString& partId) { Q_ASSERT(_e.isStartElement() && _e.name() == "clef"); _logger->logDebugTrace("MusicXMLParserPass1::clef", &_e); @@ -2394,8 +2415,11 @@ void MusicXMLParserPass1::clef(const QString& /* partId */) while (_e.readNextStartElement()) { if (_e.name() == "line") _e.skipCurrentElement(); // skip but don't log - else if (_e.name() == "sign") + else if (_e.name() == "sign") { QString sign = _e.readElementText(); + if (sign == "TAB") + _parts[partId].hasTab(true); + } else skipLogCurrElem(); } diff --git a/importexport/musicxml/importmxmlpass1.h b/importexport/musicxml/importmxmlpass1.h index 48a68e05408bd..c0f4d37a9ad5a 100644 --- a/importexport/musicxml/importmxmlpass1.h +++ b/importexport/musicxml/importmxmlpass1.h @@ -167,6 +167,8 @@ class MusicXMLParserPass1 { const CreditWordsList& credits() const { return _credits; } bool hasBeamingInfo() const { return _hasBeamingInfo; } static VBox* createAndAddVBoxForCreditWords(Score* const score, const int miny = 0, const int maxy = 75); + QString supportsTranspose() const { return _supportsTranspose; } + void addInferredTranspose(const QString& partId); private: // functions @@ -186,6 +188,7 @@ class MusicXMLParserPass1 { Score* _score; ///< MuseScore score MxmlLogger* _logger; ///< Error logger bool _hasBeamingInfo; ///< Whether the score supports or contains beaming info + QString _supportsTranspose; ///< Whether the score supports transposition info // part specific data (TODO: move to part-specific class) Fraction _timeSigDura; ///< Measure duration according to last timesig read diff --git a/importexport/musicxml/importmxmlpass2.cpp b/importexport/musicxml/importmxmlpass2.cpp index 26d33f6212ae7..fe3a54673e3da 100644 --- a/importexport/musicxml/importmxmlpass2.cpp +++ b/importexport/musicxml/importmxmlpass2.cpp @@ -216,7 +216,7 @@ static int MusicXMLStepAltOct2Pitch(int step, int alter, int octave) Note that n's staff and track have not been set yet */ -static void xmlSetPitch(Note* n, int step, int alter, int octave, const int octaveShift, const Instrument* const instr) +static void xmlSetPitch(Note* n, int step, int alter, int octave, const int octaveShift, const Instrument* const instr, Interval inferredTranspose = Interval(0)) { //qDebug("xmlSetPitch(n=%p, step=%d, alter=%d, octave=%d, octaveShift=%d)", // n, step, alter, octave, octaveShift); @@ -225,18 +225,20 @@ static void xmlSetPitch(Note* n, int step, int alter, int octave, const int octa //const Instrument* instr = staff->part()->instr(); const Interval intval = instr->transpose(); - + const Interval combinedIntval(intval.diatonic + inferredTranspose.diatonic, intval.chromatic + inferredTranspose.chromatic); //qDebug(" staff=%p instr=%p dia=%d chro=%d", // staff, instr, static_cast(intval.diatonic), static_cast(intval.chromatic)); int pitch = MusicXMLStepAltOct2Pitch(step, alter, octave); pitch += intval.chromatic; // assume not in concert pitch pitch += 12 * octaveShift; // correct for octave shift + pitch += inferredTranspose.chromatic; // ensure sane values pitch = limit(pitch, 0, 127); int tpc2 = step2tpc(step, AccidentalVal(alter)); - int tpc1 = Ms::transposeTpc(tpc2, intval, true); + tpc2 = Ms::transposeTpc(tpc2, inferredTranspose, true); + int tpc1 = Ms::transposeTpc(tpc2, combinedIntval, true); n->setPitch(pitch, tpc1, tpc2); //qDebug(" pitch=%d tpc1=%d tpc2=%d", n->pitch(), n->tpc1(), n->tpc2()); } @@ -1666,6 +1668,9 @@ void MusicXMLParserPass2::part() _hasDrumset = hasDrumset(instruments); // set the parts first instrument + + if (_pass1.supportsTranspose() == "no") + _pass1.addInferredTranspose(id); setPartInstruments(_logger, &_e, _pass1.getPart(id), id, _score, _pass1.getInstrList(id), _pass1.getIntervals(id), instruments); // set the part name @@ -4540,7 +4545,7 @@ static void setPitch(Note* note, MusicXMLParserPass1& pass1, const QString& part } } else { - xmlSetPitch(note, mnp.step(), mnp.alter(), mnp.octave(), octaveShift, instrument); + xmlSetPitch(note, mnp.step(), mnp.alter(), mnp.octave(), octaveShift, instrument, pass1.getMusicXmlPart(partId)._inferredTranspose); } } diff --git a/importexport/musicxml/importxmlfirstpass.h b/importexport/musicxml/importxmlfirstpass.h index d8b75e4d7bdff..3c68b89220899 100644 --- a/importexport/musicxml/importxmlfirstpass.h +++ b/importexport/musicxml/importxmlfirstpass.h @@ -65,6 +65,7 @@ class MusicXmlPart { int nMeasures() const { return measureDurations.size(); } MusicXmlInstrList _instrList; // TODO: make private MusicXmlIntervalList _intervals; ///< Transpositions + Interval _inferredTranspose; Interval interval(const Fraction f) const; int octaveShift(const int staff, const Fraction f) const; void addOctaveShift(const int staff, const int shift, const Fraction f); @@ -77,6 +78,8 @@ class MusicXmlPart { QString getAbbr() const { return abbr; } void setPrintAbbr(bool b) { printAbbr = b; } bool getPrintAbbr() const { return printAbbr; } + bool hasTab() const { return _hasTab; } + void hasTab(const bool b) { _hasTab = b; } LyricNumberHandler& lyricNumberHandler() { return _lyricNumberHandler; } const LyricNumberHandler& lyricNumberHandler() const { return _lyricNumberHandler; } void setMaxStaff(const int staff); @@ -87,6 +90,7 @@ class MusicXmlPart { bool printName = true; QString abbr; bool printAbbr = true; + bool _hasTab = false; QStringList measureNumbers; // MusicXML measure number attribute QList measureDurations; // duration in fraction for every measure QVector octaveShifts; // octave shift list for every staff diff --git a/mtest/musicxml/io/testInferredTransposition.xml b/mtest/musicxml/io/testInferredTransposition.xml new file mode 100644 index 0000000000000..dbe8384648fba --- /dev/null +++ b/mtest/musicxml/io/testInferredTransposition.xml @@ -0,0 +1,2425 @@ + + + + + Inferred Transposition + + + 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 + Inferred Transposition + + + subtitle + MuseScore Testcase + + + composer + Henry Ives + + + + Guitar + Guit. + + Classical Guitar + + + + 1 + 25 + 78.7402 + 0 + + + + Classical Guitar + Guit. + + Classical Guitar (Tablature) + + + + 4 + 25 + 78.7402 + 0 + + + + + + + + + 161.19 + 0.00 + + 170.00 + + + + 32 + + 0 + + + + G + 2 + + + + + G + 3 + + 16 + 1 + eighth + up + + + + 16 + 1 + eighth + + + + C + 4 + + 32 + 1 + quarter + up + + + + A + 3 + + 32 + 1 + quarter + up + + + + A + 3 + + 8 + 1 + 16th + up + begin + begin + + + + D + 4 + + 8 + 1 + 16th + up + continue + end + + + + D + 4 + + 16 + 1 + eighth + up + end + + + + + + G + 3 + + 32 + 1 + quarter + up + + + + C + 4 + + 8 + 1 + 16th + up + + + + 8 + 1 + 16th + + + + A + 3 + + 8 + 1 + 16th + up + + + + 8 + 1 + 16th + + + + G + 3 + + 32 + 1 + quarter + up + + + + A + 3 + + 32 + 1 + quarter + up + + + + + D + 4 + + 32 + 1 + quarter + up + + + + + + G + 3 + + 4 + 1 + 32nd + up + + + + 4 + 1 + 32nd + + + + B + 3 + + 8 + 1 + 16th + up + begin + forward hook + + + + + C + 4 + + 8 + 1 + 16th + up + + + + + E + 4 + + 8 + 1 + 16th + up + + + + B + 3 + + 16 + 1 + eighth + up + end + + + + + C + 4 + + 16 + 1 + eighth + up + + + + + E + 4 + + 16 + 1 + eighth + up + + + + B + 3 + + 16 + 1 + eighth + up + begin + + + + A + 3 + + 16 + 1 + eighth + up + end + + + + G + 3 + + 32 + 1 + quarter + up + + + + G + 2 + + 8 + 1 + 16th + up + begin + begin + + + + C + 4 + + 8 + 1 + 16th + up + continue + end + + + + + E + 4 + + 8 + 1 + 16th + up + + + + C + 4 + + 16 + 1 + eighth + up + end + + + + + E + 4 + + 16 + 1 + eighth + up + + + + + + B + 3 + + 32 + 1 + quarter + up + + + + C + 3 + + 8 + 1 + 16th + up + begin + begin + + + + F + 3 + + 8 + 1 + 16th + up + continue + end + + + + + E + 4 + + 8 + 1 + 16th + up + + + + E + 4 + + 16 + 1 + eighth + up + end + + + + A + 3 + + 32 + 1 + quarter + up + + + + C + 3 + + 8 + 1 + 16th + up + + + + 8 + 1 + 16th + + + + 16 + 1 + eighth + + + + + + D + 3 + + 8 + 1 + 16th + up + begin + begin + + + + C + 4 + + 8 + 1 + 16th + up + continue + end + + + + + D + 4 + + 8 + 1 + 16th + up + + + + C + 4 + + 16 + 1 + eighth + up + end + + + + + D + 4 + + 16 + 1 + eighth + up + + + + D + 3 + + 8 + 1 + 16th + up + + + + 8 + 1 + 16th + + + + 16 + 1 + eighth + + + + G + 4 + + 4 + 1 + 32nd + up + begin + begin + begin + + + + F + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + F + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + E + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + C + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + A + 3 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + G + 3 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + E + 3 + + 4 + 1 + 32nd + up + end + end + end + + + + F + 3 + + 4 + 1 + 32nd + up + begin + begin + begin + + + + A + 3 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + A + 3 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + C + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + D + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + C + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + D + 4 + + 4 + 1 + 32nd + up + continue + continue + continue + + + + C + 4 + + 4 + 1 + 32nd + up + end + end + end + + + + + + B + 3 + + 32 + 1 + quarter + up + + + + G + 3 + + 32 + 1 + quarter + up + + + + + E + 4 + + 32 + 1 + quarter + up + + + + G + 3 + + 32 + 1 + quarter + up + + + + 32 + 1 + quarter + + + + + + A + 3 + + 32 + 1 + quarter + up + + + + + D + 4 + + 32 + 1 + quarter + up + + + + 32 + 1 + quarter + + + + 64 + 1 + half + + + + + + B + 3 + + 32 + 1 + quarter + up + + + + G + 3 + + 32 + 1 + quarter + up + + + + + E + 4 + + 32 + 1 + quarter + up + + + + G + 3 + + 32 + 1 + quarter + up + + + + 32 + 1 + quarter + + + + + + A + 3 + + 32 + 1 + quarter + up + + + + + D + 4 + + 32 + 1 + quarter + up + + + + 32 + 1 + quarter + + + + 64 + 1 + half + + + + + + C + 4 + + 1 + 1 + 128th + up + + + + 1 + 1 + 128th + + + + 2 + 1 + 64th + + + + 4 + 1 + 32nd + + + + 8 + 1 + 16th + + + + 16 + 1 + eighth + + + + 32 + 1 + quarter + + + + 64 + 1 + half + + + light-heavy + + + + + + + + 112.52 + + + + 32 + + 0 + + + + TAB + 5 + + + 6 + + E + 2 + + + A + 2 + + + D + 3 + + + G + 3 + + + B + 3 + + + E + 4 + + + + + + G + 3 + + 16 + 1 + eighth + down + + + 3 + 0 + + + + + + 16 + 1 + eighth + + + + C + 4 + + 32 + 1 + quarter + down + + + 2 + 1 + + + + + + A + 3 + + 32 + 1 + quarter + down + + + 3 + 2 + + + + + + A + 3 + + 8 + 1 + 16th + down + begin + begin + + + 3 + 2 + + + + + + D + 4 + + 8 + 1 + 16th + down + continue + end + + + 2 + 3 + + + + + + D + 4 + + 16 + 1 + eighth + down + end + + + 2 + 3 + + + + + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + C + 4 + + 8 + 1 + 16th + down + + + 2 + 1 + + + + + + 8 + 1 + 16th + + + + A + 3 + + 8 + 1 + 16th + down + + + 3 + 2 + + + + + + 8 + 1 + 16th + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + A + 3 + + 32 + 1 + quarter + down + + + 3 + 2 + + + + + + + D + 4 + + 32 + 1 + quarter + down + + + 2 + 3 + + + + + + + + G + 3 + + 4 + 1 + 32nd + down + + + 3 + 0 + + + + + + 4 + 1 + 32nd + + + + B + 3 + + 8 + 1 + 16th + down + begin + forward hook + + + 3 + 4 + + + + + + + C + 4 + + 8 + 1 + 16th + down + + + 2 + 1 + + + + + + + E + 4 + + 8 + 1 + 16th + down + + + 1 + 0 + + + + + + B + 3 + + 16 + 1 + eighth + down + end + + + 3 + 4 + + + + + + + C + 4 + + 16 + 1 + eighth + down + + + 2 + 1 + + + + + + + E + 4 + + 16 + 1 + eighth + down + + + 1 + 0 + + + + + + B + 3 + + 16 + 1 + eighth + down + begin + + + 2 + 0 + + + + + + A + 3 + + 16 + 1 + eighth + down + end + + + 3 + 2 + + + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + G + 2 + + 8 + 1 + 16th + down + begin + begin + + + 6 + 3 + + + + + + C + 4 + + 8 + 1 + 16th + down + continue + end + + + 2 + 1 + + + + + + + E + 4 + + 8 + 1 + 16th + down + + + 1 + 0 + + + + + + C + 4 + + 16 + 1 + eighth + down + end + + + 2 + 1 + + + + + + + E + 4 + + 16 + 1 + eighth + down + + + 1 + 0 + + + + + + + + B + 3 + + 32 + 1 + quarter + down + + + 2 + 0 + + + + + + C + 3 + + 8 + 1 + 16th + down + begin + begin + + + 5 + 3 + + + + + + F + 3 + + 8 + 1 + 16th + down + continue + end + + + 4 + 3 + + + + + + + E + 4 + + 8 + 1 + 16th + down + + + 1 + 0 + + + + + + E + 4 + + 16 + 1 + eighth + down + end + + + 1 + 0 + + + + + + A + 3 + + 32 + 1 + quarter + down + + + 3 + 2 + + + + + + C + 3 + + 8 + 1 + 16th + down + + + 5 + 3 + + + + + + 8 + 1 + 16th + + + + 16 + 1 + eighth + + + + + + D + 3 + + 8 + 1 + 16th + down + begin + begin + + + 4 + 0 + + + + + + C + 4 + + 8 + 1 + 16th + down + continue + end + + + 2 + 1 + + + + + + + D + 4 + + 8 + 1 + 16th + down + + + 3 + 7 + + + + + + C + 4 + + 16 + 1 + eighth + down + end + + + 2 + 1 + + + + + + + D + 4 + + 16 + 1 + eighth + down + + + 3 + 7 + + + + + + D + 3 + + 8 + 1 + 16th + down + + + 4 + 0 + + + + + + 8 + 1 + 16th + + + + 16 + 1 + eighth + + + + G + 4 + + 4 + 1 + 32nd + down + begin + begin + begin + + + 1 + 3 + + + + + + F + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 1 + 1 + + + + + + F + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 1 + 1 + + + + + + E + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 1 + 0 + + + + + + C + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 2 + 1 + + + + + + A + 3 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 3 + 2 + + + + + + G + 3 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 3 + 0 + + + + + + E + 3 + + 4 + 1 + 32nd + down + end + end + end + + + 4 + 2 + + + + + + F + 3 + + 4 + 1 + 32nd + down + begin + begin + begin + + + 4 + 3 + + + + + + A + 3 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 3 + 2 + + + + + + A + 3 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 3 + 2 + + + + + + C + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 2 + 1 + + + + + + D + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 2 + 3 + + + + + + C + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 2 + 1 + + + + + + D + 4 + + 4 + 1 + 32nd + down + continue + continue + continue + + + 2 + 3 + + + + + + C + 4 + + 4 + 1 + 32nd + down + end + end + end + + + 2 + 1 + + + + + + + + B + 3 + + 32 + 1 + quarter + down + + + 2 + 0 + + + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + + E + 4 + + 32 + 1 + quarter + down + + + 1 + 0 + + + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + 32 + 1 + quarter + + + + + + A + 3 + + 32 + 1 + quarter + down + + + 3 + 2 + + + + + + + D + 4 + + 32 + 1 + quarter + down + + + 2 + 3 + + + + + + 32 + 1 + quarter + + + + 64 + 1 + half + + + + + + B + 3 + + 32 + 1 + quarter + down + + + 2 + 0 + + + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + + E + 4 + + 32 + 1 + quarter + down + + + 1 + 0 + + + + + + G + 3 + + 32 + 1 + quarter + down + + + 3 + 0 + + + + + + 32 + 1 + quarter + + + + + + A + 3 + + 32 + 1 + quarter + down + + + 3 + 2 + + + + + + + D + 4 + + 32 + 1 + quarter + down + + + 2 + 3 + + + + + + 32 + 1 + quarter + + + + 64 + 1 + half + + + + + + C + 4 + + 1 + 1 + 128th + down + + + 2 + 1 + + + + + + 1 + 1 + 128th + + + + 2 + 1 + 64th + + + + 4 + 1 + 32nd + + + + 8 + 1 + 16th + + + + 16 + 1 + eighth + + + + 32 + 1 + quarter + + + + 64 + 1 + half + + + light-heavy + + + + diff --git a/mtest/musicxml/io/testInferredTransposition_ref.mscx b/mtest/musicxml/io/testInferredTransposition_ref.mscx new file mode 100644 index 0000000000000..d626b2e4a518e --- /dev/null +++ b/mtest/musicxml/io/testInferredTransposition_ref.mscx @@ -0,0 +1,1712 @@ + + + + + 0 + 480 + + 1 + 1 + 1 + 0 + + Henry Ives + + + + + + + + + Inferred Transposition + + + + stdNormal + + 3 + + Guitar + + Guitar + Guit. + Classical Guitar + 40 + 83 + 40 + 83 + -7 + -12 + pluck.guitar.nylon-string + G8vb + 0 + + 19 + 40 + 45 + 50 + 55 + 59 + 64 + + + 100 + 100 + + + 100 + 33 + + + 100 + 50 + + + 100 + 67 + + + 100 + 100 + + + 120 + 67 + + + 150 + 100 + + + 150 + 50 + + + 120 + 50 + + + 120 + 100 + + + + + 0 + 0 + + + + 0 + 1 + + + + + + + tab6StrCommon + 6 + 1.5 + 0 + 0 + MuseScore Tab Modern + 15 + 0 + MuseScore Tab Serif + 9 + 0 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 1 + + 3 + + Classical Guitar + + Classical Guitar + Guit. + Classical Guitar (Tablature) + 40 + 83 + 40 + 83 + pluck.guitar.nylon-string + G8vb + 0 + + 19 + 40 + 45 + 50 + 55 + 59 + 64 + + + 100 + 100 + + + 100 + 33 + + + 100 + 50 + + + 100 + 67 + + + 100 + 100 + + + 120 + 67 + + + 150 + 100 + + + 150 + 50 + + + 120 + 50 + + + 120 + 100 + + + + + 0 + 3 + + + + 0 + 2 + + + + + + 12.5 + + + + Inferred Transposition + + + + + MuseScore Testcase + + + + right,top + + Henry Ives + + + + + + G + G + + + 4 + 4 + + + no + eighth + up + + 55 + 15 + + + + eighth + + + quarter + up + + 60 + 14 + + + + quarter + up + + 57 + 17 + + + + up + -8 + -8 + + + begin + 16th + + 57 + 17 + + + + mid + 16th + + 62 + 16 + + + + mid + eighth + + 62 + 16 + + + + + + + + quarter + up + + 55 + 15 + + + + no + 16th + up + + 60 + 14 + + + + 16th + + + no + 16th + up + + 57 + 17 + + + + 16th + + + quarter + up + + 55 + 15 + + + + quarter + up + + 57 + 17 + + + 62 + 16 + + + + + + + + no + 32nd + up + + 55 + 15 + + + + 32nd + + + up + -11 + -11 + + + begin + 16th + + 59 + 19 + + + 60 + 14 + + + 64 + 18 + + + + mid + eighth + + 59 + 19 + + + 60 + 14 + + + 64 + 18 + + + + up + -4 + -3 + + + begin + eighth + + 59 + 19 + + + + mid + eighth + + 57 + 17 + + + + quarter + up + + 55 + 15 + + + + up + -11 + -11 + + + begin + 16th + + 43 + 15 + + + + mid + 16th + + 60 + 14 + + + 64 + 18 + + + + mid + eighth + + 60 + 14 + + + 64 + 18 + + + + + + + + quarter + up + + 59 + 19 + + + + up + -11 + -11 + + + begin + 16th + + 48 + 14 + + + + mid + 16th + + 53 + 13 + + + 64 + 18 + + + + mid + eighth + + 64 + 18 + + + + quarter + up + + 57 + 17 + + + + no + 16th + up + + 48 + 14 + + + + 16th + + + eighth + + + + + + + up + -8 + -8 + + + begin + 16th + + 50 + 16 + + + + mid + 16th + + 60 + 14 + + + 62 + 16 + + + + mid + eighth + + 60 + 14 + + + 62 + 16 + + + + no + 16th + up + + 50 + 16 + + + + 16th + + + eighth + + + up + -19 + -15 + + + begin + 32nd + + 67 + 15 + + + + mid + 32nd + + 65 + 13 + + + + mid + 32nd + + 65 + 13 + + + + mid + 32nd + + 64 + 18 + + + + mid + 32nd + + 60 + 14 + + + + mid + 32nd + + 57 + 17 + + + + mid + 32nd + + 55 + 15 + + + + mid + 32nd + + 52 + 18 + + + + up + -11 + -11 + + + begin + 32nd + + 53 + 13 + + + + mid + 32nd + + 57 + 17 + + + + mid + 32nd + + 57 + 17 + + + + mid + 32nd + + 60 + 14 + + + + mid + 32nd + + 62 + 16 + + + + mid + 32nd + + 60 + 14 + + + + mid + 32nd + + 62 + 16 + + + + mid + 32nd + + 60 + 14 + + + + + + + + quarter + up + + 59 + 19 + + + + quarter + up + + 55 + 15 + + + 64 + 18 + + + + quarter + up + + 55 + 15 + + + + quarter + + + + + + + quarter + up + + 57 + 17 + + + 62 + 16 + + + + quarter + + + half + + + + + + + quarter + up + + 59 + 19 + + + + quarter + up + + 55 + 15 + + + 64 + 18 + + + + quarter + up + + 55 + 15 + + + + quarter + + + + + + + quarter + up + + 57 + 17 + + + 62 + 16 + + + + quarter + + + half + + + + + + + no + 128th + up + + 60 + 14 + + + + 128th + + + 64th + + + 32nd + + + 16th + + + eighth + + + quarter + + + half + + + end + + + + + + + + + TAB + TAB + + + 4 + 4 + + + no + eighth + down + + 55 + 15 + 0 + 2 + + + + eighth + + + quarter + down + + 60 + 14 + 1 + 1 + + + + quarter + down + + 57 + 17 + 2 + 2 + + + + down + 46 + 46 + + + begin + 16th + + 57 + 17 + 2 + 2 + + + + mid + 16th + + 62 + 16 + 3 + 1 + + + + mid + eighth + + 62 + 16 + 3 + 1 + + + + + + + + quarter + down + + 55 + 15 + 0 + 2 + + + + no + 16th + down + + 60 + 14 + 1 + 1 + + + + 16th + + + no + 16th + down + + 57 + 17 + 2 + 2 + + + + 16th + + + quarter + down + + 55 + 15 + 0 + 2 + + + + quarter + down + + 57 + 17 + 2 + 2 + + + 62 + 16 + 3 + 1 + + + + + + + + no + 32nd + down + + 55 + 15 + 0 + 2 + + + + 32nd + + + down + 46 + 46 + + + begin + 16th + + 59 + 19 + 4 + 2 + + + 60 + 14 + 1 + 1 + + + 64 + 18 + 0 + 0 + + + + mid + eighth + + 59 + 19 + 4 + 2 + + + 60 + 14 + 1 + 1 + + + 64 + 18 + 0 + 0 + + + + down + 46 + 46 + + + begin + eighth + + 59 + 19 + 0 + 1 + + + + mid + eighth + + 57 + 17 + 2 + 2 + + + + quarter + down + + 55 + 15 + 0 + 2 + + + + down + 46 + 46 + + + begin + 16th + + 43 + 15 + 3 + 5 + + + + mid + 16th + + 60 + 14 + 1 + 1 + + + 64 + 18 + 0 + 0 + + + + mid + eighth + + 60 + 14 + 1 + 1 + + + 64 + 18 + 0 + 0 + + + + + + + + quarter + down + + 59 + 19 + 0 + 1 + + + + down + 46 + 46 + + + begin + 16th + + 48 + 14 + 3 + 4 + + + + mid + 16th + + 53 + 13 + 3 + 3 + + + 64 + 18 + 0 + 0 + + + + mid + eighth + + 64 + 18 + 0 + 0 + + + + quarter + down + + 57 + 17 + 2 + 2 + + + + no + 16th + down + + 48 + 14 + 3 + 4 + + + + 16th + + + eighth + + + + + + + down + 46 + 46 + + + begin + 16th + + 50 + 16 + 0 + 3 + + + + mid + 16th + + 60 + 14 + 1 + 1 + + + 62 + 16 + 7 + 2 + + + + mid + eighth + + 60 + 14 + 1 + 1 + + + 62 + 16 + 7 + 2 + + + + no + 16th + down + + 50 + 16 + 0 + 3 + + + + 16th + + + eighth + + + down + 46 + 46 + + + begin + 32nd + + 67 + 15 + 3 + 0 + + + + mid + 32nd + + 65 + 13 + 1 + 0 + + + + mid + 32nd + + 65 + 13 + 1 + 0 + + + + mid + 32nd + + 64 + 18 + 0 + 0 + + + + mid + 32nd + + 60 + 14 + 1 + 1 + + + + mid + 32nd + + 57 + 17 + 2 + 2 + + + + mid + 32nd + + 55 + 15 + 0 + 2 + + + + mid + 32nd + + 52 + 18 + 2 + 3 + + + + down + 46 + 46 + + + begin + 32nd + + 53 + 13 + 3 + 3 + + + + mid + 32nd + + 57 + 17 + 2 + 2 + + + + mid + 32nd + + 57 + 17 + 2 + 2 + + + + mid + 32nd + + 60 + 14 + 1 + 1 + + + + mid + 32nd + + 62 + 16 + 3 + 1 + + + + mid + 32nd + + 60 + 14 + 1 + 1 + + + + mid + 32nd + + 62 + 16 + 3 + 1 + + + + mid + 32nd + + 60 + 14 + 1 + 1 + + + + + + + + quarter + down + + 59 + 19 + 0 + 1 + + + + quarter + down + + 55 + 15 + 0 + 2 + + + 64 + 18 + 0 + 0 + + + + quarter + down + + 55 + 15 + 0 + 2 + + + + quarter + + + + + + + quarter + down + + 57 + 17 + 2 + 2 + + + 62 + 16 + 3 + 1 + + + + quarter + + + half + + + + + + + quarter + down + + 59 + 19 + 0 + 1 + + + + quarter + down + + 55 + 15 + 0 + 2 + + + 64 + 18 + 0 + 0 + + + + quarter + down + + 55 + 15 + 0 + 2 + + + + quarter + + + + + + + quarter + down + + 57 + 17 + 2 + 2 + + + 62 + 16 + 3 + 1 + + + + quarter + + + half + + + + + + + no + 128th + down + + 60 + 14 + 1 + 1 + + + + 128th + + + 64th + + + 32nd + + + 16th + + + eighth + + + quarter + + + half + + + end + + + + + + diff --git a/mtest/musicxml/io/tst_mxml_io.cpp b/mtest/musicxml/io/tst_mxml_io.cpp index f2f026e65a018..d449d683c6932 100644 --- a/mtest/musicxml/io/tst_mxml_io.cpp +++ b/mtest/musicxml/io/tst_mxml_io.cpp @@ -132,6 +132,7 @@ private slots: void incorrectStaffNumber2() { mxmlIoTestRef("testIncorrectStaffNumber2"); } void inferredCredits() { mxmlImportTestRef("testInferredCredits"); } void inferredFingerings() { mxmlImportTestRef("testInferredFingerings"); } + void inferredTransposition() { mxmlImportTestRef("testInferredTransposition"); } void instrumentChangeMIDIportExport() { mxmlMscxExportTestRef("testInstrumentChangeMIDIportExport"); } void instrumentSound() { mxmlIoTestRef("testInstrumentSound"); } void invalidTimesig() { mxmlIoTestRef("testInvalidTimesig"); }