Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH#26453: Change tie import exclusion #801

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion importexport/musicxml/importmxmlpass2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8154,7 +8154,8 @@ static void addTie(const Notation& notation, Note* note, const int track, MusicX
qInfo() << "endMeasure: " << endChord->measure();
qInfo() << "startChord->tick() + startChord->ticks(): " << (startChord->tick() + startChord->ticks()).toString();
qInfo() << "endChord->tick(): " << endChord->tick().toString();
if (startMeasure == endChord->measure() || startChord->tick() + startChord->actualTicks() == endChord->tick()) {
if (startMeasure == endChord->measure()
|| (startChord && startChord->tick() + startChord->measure()->ticks() >= endChord->tick())) {
// only connect if they're in the same bar, or there are no notes/rests in the same voice between them
qInfo() << "Connect";
currTie->setEndNote(note);
Expand Down
185 changes: 185 additions & 0 deletions mtest/musicxml/io/importTie5.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 4.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
<score-partwise version="4.0">
<work>
<work-title>Arpeggio ties</work-title>
</work>
<identification>
<creator type="composer">K. Rettinghaus</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>Piano</part-name>
<part-abbreviation>Pno.</part-abbreviation>
<score-instrument id="P1-I1">
<instrument-name>Piano</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>1</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>C</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<tie type="start"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="start"/>
</notations>
</note>
<note>
<pitch>
<step>E</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<tie type="start"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="start"/>
</notations>
</note>
<note>
<pitch>
<step>G</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<tie type="start"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="start"/>
</notations>
</note>
<note>
<pitch>
<step>C</step>
<octave>5</octave>
</pitch>
<duration>1</duration>
<tie type="start"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="start"/>
</notations>
</note>
</measure>
<measure number="2">
<note>
<pitch>
<step>C</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<tie type="stop"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="stop"/>
</notations>
</note>
<note>
<chord/>
<pitch>
<step>E</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<tie type="stop"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="stop"/>
</notations>
</note>
<note>
<chord/>
<pitch>
<step>G</step>
<octave>4</octave>
</pitch>
<duration>1</duration>
<tie type="stop"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="stop"/>
</notations>
</note>
<note>
<chord/>
<pitch>
<step>C</step>
<octave>5</octave>
</pitch>
<duration>1</duration>
<tie type="stop"/>
<voice>1</voice>
<type>quarter</type>
<stem>up</stem>
<notations>
<tied type="stop"/>
</notations>
</note>
<note>
<rest/>
<duration>1</duration>
<voice>1</voice>
<type>quarter</type>
</note>
<note>
<rest/>
<duration>2</duration>
<voice>1</voice>
<type>half</type>
</note>
<barline location="right">
<bar-style>light-heavy</bar-style>
</barline>
</measure>
</part>
</score-partwise>
1 change: 1 addition & 0 deletions mtest/musicxml/io/tst_mxml_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ private slots:
void importTie2() { mxmlImportTestRef("importTie2"); }
void importTie3() { mxmlImportTestRef("importTie3"); }
void importTie4() { mxmlImportTestRef("importTie4"); }
void importTie5() { mxmlIoTest("importTie5"); }
void timesig1() { mxmlIoTest("testTimesig1"); }
void timesig3() { mxmlIoTest("testTimesig3"); }
void timesig4() { mxmlIoTest("testTimesig4"); }
Expand Down
Loading