forked from musescore/MuseScore
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #321751 - [MusicXML import] use note type instead of note duratio…
…n to determine note length Currently, the importer uses MusicXML note duration instead of note length as calculated from the MusicXML note type, dots, time-modification etcetera to determine how long a note takes and where to place the next note. When the MusicXML note duration does not match the calculated value, various types of corruption occur. When using the calculated duration, none of these problems occur. This change does not affect correctly encoded MusicXML files. Duplicate of musescore#8282, resp. backport of musescore#8429, part 1
- Loading branch information
1 parent
8baa05d
commit d1dd35c
Showing
7 changed files
with
252 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> | ||
<score-partwise version="3.1"> | ||
<work> | ||
<work-number>MuseScore testfile</work-number> | ||
<work-title>Duration Large Error</work-title> | ||
</work> | ||
<identification> | ||
<creator type="composer">Leon Vinken</creator> | ||
<encoding> | ||
<software>MuseScore 0.7.0</software> | ||
<encoding-date>2007-09-10</encoding-date> | ||
<supports element="accidental" type="yes"/> | ||
<supports element="beam" type="yes"/> | ||
<supports element="print" attribute="new-page" type="no"/> | ||
<supports element="print" attribute="new-system" type="no"/> | ||
<supports element="stem" type="yes"/> | ||
</encoding> | ||
<miscellaneous> | ||
<miscellaneous-field name="description"> | ||
Test handling of large errors in durations (larger than rounding errors). | ||
Expect MuseScore to use the calculated duration, resulting in a normal | ||
MusicXML file (with divsions 1 and duration 2 for the half notes). | ||
</miscellaneous-field> | ||
</miscellaneous> | ||
</identification> | ||
<part-list> | ||
<score-part id="P1"> | ||
<part-name>Voice</part-name> | ||
<part-abbreviation>Vo.</part-abbreviation> | ||
<score-instrument id="P1-I1"> | ||
<instrument-name>Voice</instrument-name> | ||
</score-instrument> | ||
<midi-device id="P1-I1" port="1"></midi-device> | ||
<midi-instrument id="P1-I1"> | ||
<midi-channel>1</midi-channel> | ||
<midi-program>53</midi-program> | ||
<volume>78.7402</volume> | ||
<pan>0</pan> | ||
</midi-instrument> | ||
</score-part> | ||
</part-list> | ||
<part id="P1"> | ||
<measure number="1"> | ||
<attributes> | ||
<divisions>100</divisions> | ||
<key> | ||
<fifths>0</fifths> | ||
</key> | ||
<time> | ||
<beats>4</beats> | ||
<beat-type>4</beat-type> | ||
</time> | ||
<clef> | ||
<sign>G</sign> | ||
<line>2</line> | ||
</clef> | ||
</attributes> | ||
<note> | ||
<pitch> | ||
<step>G</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>180</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>up</stem> | ||
</note> | ||
<note> | ||
<pitch> | ||
<step>A</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>200</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>up</stem> | ||
</note> | ||
</measure> | ||
<measure number="2"> | ||
<note> | ||
<pitch> | ||
<step>B</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>220</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>down</stem> | ||
</note> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>5</octave> | ||
</pitch> | ||
<duration>200</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>down</stem> | ||
</note> | ||
<barline location="right"> | ||
<bar-style>light-heavy</bar-style> | ||
</barline> | ||
</measure> | ||
</part> | ||
</score-partwise> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 3.1 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd"> | ||
<score-partwise version="3.1"> | ||
<work> | ||
<work-number>MuseScore testfile</work-number> | ||
<work-title>Duration Large Error</work-title> | ||
</work> | ||
<identification> | ||
<creator type="composer">Leon Vinken</creator> | ||
<encoding> | ||
<software>MuseScore 0.7.0</software> | ||
<encoding-date>2007-09-10</encoding-date> | ||
<supports element="accidental" type="yes"/> | ||
<supports element="beam" type="yes"/> | ||
<supports element="print" attribute="new-page" type="no"/> | ||
<supports element="print" attribute="new-system" type="no"/> | ||
<supports element="stem" type="yes"/> | ||
</encoding> | ||
</identification> | ||
<part-list> | ||
<score-part id="P1"> | ||
<part-name>Voice</part-name> | ||
<part-abbreviation>Vo.</part-abbreviation> | ||
<score-instrument id="P1-I1"> | ||
<instrument-name>Voice</instrument-name> | ||
</score-instrument> | ||
<midi-device id="P1-I1" port="1"></midi-device> | ||
<midi-instrument id="P1-I1"> | ||
<midi-channel>1</midi-channel> | ||
<midi-program>53</midi-program> | ||
<volume>78.7402</volume> | ||
<pan>0</pan> | ||
</midi-instrument> | ||
</score-part> | ||
</part-list> | ||
<part id="P1"> | ||
<measure number="1"> | ||
<attributes> | ||
<divisions>1</divisions> | ||
<key> | ||
<fifths>0</fifths> | ||
</key> | ||
<time> | ||
<beats>4</beats> | ||
<beat-type>4</beat-type> | ||
</time> | ||
<clef> | ||
<sign>G</sign> | ||
<line>2</line> | ||
</clef> | ||
</attributes> | ||
<note> | ||
<pitch> | ||
<step>G</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>2</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>up</stem> | ||
</note> | ||
<note> | ||
<pitch> | ||
<step>A</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>2</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>up</stem> | ||
</note> | ||
</measure> | ||
<measure number="2"> | ||
<note> | ||
<pitch> | ||
<step>B</step> | ||
<octave>4</octave> | ||
</pitch> | ||
<duration>2</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>down</stem> | ||
</note> | ||
<note> | ||
<pitch> | ||
<step>C</step> | ||
<octave>5</octave> | ||
</pitch> | ||
<duration>2</duration> | ||
<voice>1</voice> | ||
<type>half</type> | ||
<stem>down</stem> | ||
</note> | ||
<barline location="right"> | ||
<bar-style>light-heavy</bar-style> | ||
</barline> | ||
</measure> | ||
</part> | ||
</score-partwise> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters