commit
f6352d9940
9 changed files with 3 additions and 973 deletions
|
@ -252,12 +252,9 @@ Chord::Chord(const Chord& c, bool link)
|
|||
if (link)
|
||||
a->linkTo(c._arpeggio);
|
||||
}
|
||||
if (c._tremolo
|
||||
&& (!c._tremolo->twoNotes() || c._tremolo->chord1() == &c)) {
|
||||
if (c._tremolo && !c._tremolo->twoNotes()) {
|
||||
Tremolo* t = new Tremolo(*(c._tremolo));
|
||||
t->setChords(this,0);
|
||||
//add(t);
|
||||
_tremolo = t;
|
||||
add(t);
|
||||
if (link)
|
||||
t->linkTo(c._tremolo);
|
||||
}
|
||||
|
|
|
@ -2365,10 +2365,6 @@ void Score::connectTies()
|
|||
else {
|
||||
nc->setTremolo(tremolo);
|
||||
tremolo->setChords(c, nc);
|
||||
// remove 2 note tremolos
|
||||
// which have chords in two different measures
|
||||
if(c->measure() != nc->measure())
|
||||
c->remove(tremolo);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -521,62 +521,6 @@ QByteArray Selection::mimeData() const
|
|||
return a;
|
||||
}
|
||||
|
||||
QList<Segment*> cloneRange(Segment* fs, Segment* ls)
|
||||
{
|
||||
QList<Segment*> segments;
|
||||
Segment* prev = 0;
|
||||
for (Segment* segment = fs; segment && segment != ls; segment = segment->next1()) {
|
||||
Segment* newSegment = segment->clone();
|
||||
newSegment->setPrev(prev);
|
||||
if(prev != 0)
|
||||
prev->setNext(newSegment);
|
||||
segments.append(newSegment);
|
||||
prev = newSegment;
|
||||
}
|
||||
segments.last()->setNext(ls); //HACK
|
||||
return segments;
|
||||
}
|
||||
|
||||
std::multimap<int, Spanner*> spannerMapCopy(Segment* seg1, Segment* seg2, Segment* destSegment, std::multimap<int, Spanner*> scoreSpannerMap)
|
||||
{
|
||||
// pairing up elements with clones
|
||||
std::map<Element*,Element*> paired_elements;
|
||||
for (Segment* sourceSegment = seg1; sourceSegment && sourceSegment != seg2; sourceSegment = sourceSegment->next1()) {
|
||||
if (sourceSegment->segmentType() == Segment::Type::ChordRest) {
|
||||
for (int i = 0; i < sourceSegment->elist().size(); i++) {
|
||||
if (sourceSegment->element(i) != 0) {
|
||||
paired_elements.insert(std::pair<Element*,Element*>(sourceSegment->element(i),destSegment->element(i)));
|
||||
if (sourceSegment->element(i)->type() == Element::Type::CHORD) {
|
||||
Chord* schord = static_cast<Chord*>(sourceSegment->element(i));
|
||||
Chord* dchord = static_cast<Chord*>(destSegment->element(i));
|
||||
QList<Chord*>& graceNotes = schord->graceNotes();
|
||||
for (int i = 0; i < graceNotes.size(); i++) {
|
||||
paired_elements.insert(std::pair<Element*,Element*>(graceNotes.at(i),dchord->graceNotes().at(i)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
destSegment = destSegment->next1();
|
||||
}
|
||||
|
||||
std::multimap<int, Spanner*> sp_copy;
|
||||
std::map<Element*,Element*>::iterator it;
|
||||
|
||||
// replace start and end element pointers with clones
|
||||
for (auto i : scoreSpannerMap) {
|
||||
Spanner* spanner = i.second;
|
||||
Spanner* spannerCopy = static_cast<Spanner*>(spanner->clone());
|
||||
sp_copy.insert(std::pair<int,Spanner*>(i.first,spannerCopy));
|
||||
|
||||
it = paired_elements.find(spanner->startElement());
|
||||
if (it != paired_elements.end()) spannerCopy->setStartElement(paired_elements[spanner->startElement()]);
|
||||
it = paired_elements.find(spanner->endElement());
|
||||
if (it != paired_elements.end()) spannerCopy->setEndElement(paired_elements[spanner->endElement()]);
|
||||
}
|
||||
return sp_copy;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// staffMimeData
|
||||
//---------------------------------------------------------
|
||||
|
@ -595,23 +539,6 @@ QByteArray Selection::staffMimeData() const
|
|||
Segment* seg1 = _startSegment;
|
||||
Segment* seg2 = _endSegment;
|
||||
|
||||
QList<Segment*> segments = cloneRange(seg1, seg2);
|
||||
|
||||
//Remove 2-note tremolo if at last segment
|
||||
Segment* last = segments.last();
|
||||
if (last->segmentType() == Segment::Type::ChordRest) {
|
||||
foreach (Element* e, last->elist()) {
|
||||
if(e && e->type() == Element::Type::CHORD) {
|
||||
Chord* c = static_cast<Chord*>(e);
|
||||
if (c->tremolo() && c->tremolo()->twoNotes())
|
||||
c->remove(c->tremolo());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::multimap<int, Spanner*> sp_copy = spannerMapCopy(seg1,seg2,segments.first(),score()->spanner());
|
||||
sp_copy.swap(score()->spannerMap().mapModify());
|
||||
|
||||
for (int staffIdx = staffStart(); staffIdx < staffEnd(); ++staffIdx) {
|
||||
xml.stag(QString("Staff id=\"%1\"").arg(staffIdx));
|
||||
int startTrack = staffIdx * VOICES;
|
||||
|
@ -623,17 +550,10 @@ QByteArray Selection::staffMimeData() const
|
|||
xml.tag("transposeChromatic", interval.chromatic);
|
||||
if (interval.diatonic)
|
||||
xml.tag("transposeDiatonic", interval.diatonic);
|
||||
|
||||
score()->writeSegments(xml, startTrack, endTrack, segments.first(), seg2, false, true, true);
|
||||
//score()->writeSegments(xml, startTrack, endTrack, seg1, seg2, false, true, true);
|
||||
score()->writeSegments(xml, startTrack, endTrack, seg1, seg2, false, true, true);
|
||||
xml.etag();
|
||||
}
|
||||
|
||||
sp_copy.swap(score()->spannerMap().mapModify());
|
||||
for (auto i : sp_copy) {
|
||||
delete i.second;
|
||||
}
|
||||
|
||||
xml.etag();
|
||||
buffer.close();
|
||||
return buffer.buffer();
|
||||
|
|
|
@ -36,7 +36,6 @@ class SpannerMap : std::multimap<int, Spanner*> {
|
|||
const std::vector< ::Interval<Spanner*> >& findContained(int start, int stop);
|
||||
const std::vector< ::Interval<Spanner*> >& findOverlapping(int start, int stop);
|
||||
const std::multimap<int, Spanner*>& map() const { return *this; }
|
||||
std::multimap<int, Spanner*>& mapModify() { return *this; }
|
||||
std::multimap<int,Spanner*>::const_reverse_iterator crbegin() const { return std::multimap<int, Spanner*>::crbegin(); }
|
||||
std::multimap<int,Spanner*>::const_reverse_iterator crend() const { return std::multimap<int, Spanner*>::crend(); }
|
||||
std::multimap<int,Spanner*>::const_iterator cbegin() const { return std::multimap<int, Spanner*>::cbegin(); }
|
||||
|
|
|
@ -1,188 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="1.24">
|
||||
<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">copypaste13</metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>Standard</name>
|
||||
</StaffType>
|
||||
<bracket type="-1" span="0"/>
|
||||
</Staff>
|
||||
<trackName>Violin</trackName>
|
||||
<Instrument>
|
||||
<longName pos="0">Violin</longName>
|
||||
<shortName pos="0">Vln.</shortName>
|
||||
<trackName>Violin</trackName>
|
||||
<minPitchP>55</minPitchP>
|
||||
<maxPitchP>103</maxPitchP>
|
||||
<minPitchA>55</minPitchA>
|
||||
<maxPitchA>88</maxPitchA>
|
||||
<StringData>
|
||||
<frets>24</frets>
|
||||
<string>55</string>
|
||||
<string>62</string>
|
||||
<string>69</string>
|
||||
<string>76</string>
|
||||
</StringData>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="40"/>
|
||||
</Channel>
|
||||
<Channel name="pizzicato">
|
||||
<program value="45"/>
|
||||
</Channel>
|
||||
<Channel name="tremolo">
|
||||
<program value="44"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<VBox>
|
||||
<height>10</height>
|
||||
<Text>
|
||||
<style>Title</style>
|
||||
<text>copypaste13</text>
|
||||
</Text>
|
||||
</VBox>
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>G</concertClefType>
|
||||
<transposingClefType>G</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>0</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
<Tremolo>
|
||||
<subtype>c16</subtype>
|
||||
</Tremolo>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="2">
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="3">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="4">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -1,179 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="1.24">
|
||||
<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">copypaste13</metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>Standard</name>
|
||||
</StaffType>
|
||||
<bracket type="-1" span="0"/>
|
||||
</Staff>
|
||||
<trackName>Violin</trackName>
|
||||
<Instrument>
|
||||
<longName pos="0">Violin</longName>
|
||||
<shortName pos="0">Vln.</shortName>
|
||||
<trackName>Violin</trackName>
|
||||
<minPitchP>55</minPitchP>
|
||||
<maxPitchP>103</maxPitchP>
|
||||
<minPitchA>55</minPitchA>
|
||||
<maxPitchA>88</maxPitchA>
|
||||
<StringData>
|
||||
<frets>24</frets>
|
||||
<string>55</string>
|
||||
<string>62</string>
|
||||
<string>69</string>
|
||||
<string>76</string>
|
||||
</StringData>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="40"/>
|
||||
</Channel>
|
||||
<Channel name="pizzicato">
|
||||
<program value="45"/>
|
||||
</Channel>
|
||||
<Channel name="tremolo">
|
||||
<program value="44"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<VBox>
|
||||
<height>10</height>
|
||||
<Text>
|
||||
<style>Title</style>
|
||||
<text>copypaste13</text>
|
||||
</Text>
|
||||
</VBox>
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>G</concertClefType>
|
||||
<transposingClefType>G</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>0</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
<Tremolo>
|
||||
<subtype>c16</subtype>
|
||||
</Tremolo>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="2">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="3">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="4">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -1,222 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="1.24">
|
||||
<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">copypaste14</metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>Standard</name>
|
||||
</StaffType>
|
||||
<bracket type="-1" span="0"/>
|
||||
</Staff>
|
||||
<trackName>Violin</trackName>
|
||||
<Instrument>
|
||||
<longName pos="0">Violin</longName>
|
||||
<shortName pos="0">Vln.</shortName>
|
||||
<trackName>Violin</trackName>
|
||||
<minPitchP>55</minPitchP>
|
||||
<maxPitchP>103</maxPitchP>
|
||||
<minPitchA>55</minPitchA>
|
||||
<maxPitchA>88</maxPitchA>
|
||||
<StringData>
|
||||
<frets>24</frets>
|
||||
<string>55</string>
|
||||
<string>62</string>
|
||||
<string>69</string>
|
||||
<string>76</string>
|
||||
</StringData>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="40"/>
|
||||
</Channel>
|
||||
<Channel name="pizzicato">
|
||||
<program value="45"/>
|
||||
</Channel>
|
||||
<Channel name="tremolo">
|
||||
<program value="44"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<VBox>
|
||||
<height>10</height>
|
||||
<Text>
|
||||
<style>Title</style>
|
||||
<text>copypaste14</text>
|
||||
</Text>
|
||||
</VBox>
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>G</concertClefType>
|
||||
<transposingClefType>G</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>0</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
<Tremolo>
|
||||
<subtype>c16</subtype>
|
||||
</Tremolo>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="2">
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="3">
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="4">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="5">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -1,209 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<museScore version="1.24">
|
||||
<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">copypaste14</metaTag>
|
||||
<PageList>
|
||||
<Page>
|
||||
<System>
|
||||
</System>
|
||||
<System>
|
||||
</System>
|
||||
</Page>
|
||||
</PageList>
|
||||
<Part>
|
||||
<Staff id="1">
|
||||
<StaffType group="pitched">
|
||||
<name>Standard</name>
|
||||
</StaffType>
|
||||
<bracket type="-1" span="0"/>
|
||||
</Staff>
|
||||
<trackName>Violin</trackName>
|
||||
<Instrument>
|
||||
<longName pos="0">Violin</longName>
|
||||
<shortName pos="0">Vln.</shortName>
|
||||
<trackName>Violin</trackName>
|
||||
<minPitchP>55</minPitchP>
|
||||
<maxPitchP>103</maxPitchP>
|
||||
<minPitchA>55</minPitchA>
|
||||
<maxPitchA>88</maxPitchA>
|
||||
<StringData>
|
||||
<frets>24</frets>
|
||||
<string>55</string>
|
||||
<string>62</string>
|
||||
<string>69</string>
|
||||
<string>76</string>
|
||||
</StringData>
|
||||
<Articulation>
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="staccato">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>50</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="tenuto">
|
||||
<velocity>100</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Articulation name="sforzato">
|
||||
<velocity>120</velocity>
|
||||
<gateTime>100</gateTime>
|
||||
</Articulation>
|
||||
<Channel>
|
||||
<program value="40"/>
|
||||
</Channel>
|
||||
<Channel name="pizzicato">
|
||||
<program value="45"/>
|
||||
</Channel>
|
||||
<Channel name="tremolo">
|
||||
<program value="44"/>
|
||||
</Channel>
|
||||
</Instrument>
|
||||
</Part>
|
||||
<Staff id="1">
|
||||
<VBox>
|
||||
<height>10</height>
|
||||
<Text>
|
||||
<style>Title</style>
|
||||
<text>copypaste14</text>
|
||||
</Text>
|
||||
</VBox>
|
||||
<Measure number="1">
|
||||
<Clef>
|
||||
<concertClefType>G</concertClefType>
|
||||
<transposingClefType>G</transposingClefType>
|
||||
</Clef>
|
||||
<KeySig>
|
||||
<accidental>0</accidental>
|
||||
</KeySig>
|
||||
<TimeSig>
|
||||
<sigN>4</sigN>
|
||||
<sigD>4</sigD>
|
||||
<showCourtesySig>1</showCourtesySig>
|
||||
</TimeSig>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
<Tremolo>
|
||||
<subtype>c16</subtype>
|
||||
</Tremolo>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>half</durationType>
|
||||
<duration z="1" n="4"/>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>half</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="2">
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>72</pitch>
|
||||
<tpc>14</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>74</pitch>
|
||||
<tpc>16</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Chord>
|
||||
<durationType>quarter</durationType>
|
||||
<Note>
|
||||
<pitch>76</pitch>
|
||||
<tpc>18</tpc>
|
||||
</Note>
|
||||
</Chord>
|
||||
<Rest>
|
||||
<durationType>quarter</durationType>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="3">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="4">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>normal</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
<Measure number="5">
|
||||
<Rest>
|
||||
<durationType>measure</durationType>
|
||||
<duration z="4" n="4"/>
|
||||
</Rest>
|
||||
<BarLine>
|
||||
<subtype>end</subtype>
|
||||
<span>1</span>
|
||||
</BarLine>
|
||||
</Measure>
|
||||
</Staff>
|
||||
</Score>
|
||||
</museScore>
|
|
@ -50,9 +50,6 @@ class TestCopyPaste : public QObject, public MTest
|
|||
void copypaste11() { copypaste("11"); } // grace notes
|
||||
void copypaste12() { copypaste("12"); } // voices
|
||||
|
||||
void copyPaste2NoteTremolo();
|
||||
void copyPaste2NoteTremolo2();
|
||||
|
||||
void copypastestaff50() { copypastestaff("50"); } // staff & slurs
|
||||
|
||||
void copyPastePartial();
|
||||
|
@ -176,87 +173,6 @@ void TestCopyPaste::copyPastePartial() {
|
|||
delete score;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// copypaste
|
||||
// copy first note which has a 2 note tremolo after into measure 2
|
||||
//---------------------------------------------------------
|
||||
|
||||
void TestCopyPaste::copyPaste2NoteTremolo()
|
||||
{
|
||||
Score* score = readScore(DIR + QString("copypaste13.mscx"));
|
||||
score->doLayout();
|
||||
Measure* m1 = score->firstMeasure();
|
||||
Measure* m2 = m1->nextMeasure();
|
||||
|
||||
QVERIFY(m1 != 0);
|
||||
QVERIFY(m2 != 0);
|
||||
|
||||
Segment* s = m1->first(Segment::Type::ChordRest);
|
||||
score->select(s->element(0));
|
||||
|
||||
QVERIFY(score->selection().canCopy());
|
||||
QString mimeType = score->selection().mimeType();
|
||||
QVERIFY(!mimeType.isEmpty());
|
||||
QMimeData* mimeData = new QMimeData;
|
||||
mimeData->setData(mimeType, score->selection().mimeData());
|
||||
QApplication::clipboard()->setMimeData(mimeData);
|
||||
|
||||
score->select(m2->first(Segment::Type::ChordRest)->element(0));
|
||||
|
||||
score->startCmd();
|
||||
score->cmdPaste(mimeData,0);
|
||||
score->endCmd();
|
||||
|
||||
score->doLayout();
|
||||
|
||||
QVERIFY(saveCompareScore(score, QString("copypaste13.mscx"),
|
||||
DIR + QString("copypaste13-ref.mscx")));
|
||||
delete score;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// copypaste
|
||||
// copy 2 chords with a 2 note tremolo to the end of measure 2
|
||||
//---------------------------------------------------------
|
||||
|
||||
void TestCopyPaste::copyPaste2NoteTremolo2()
|
||||
{
|
||||
Score* score = readScore(DIR + QString("copypaste14.mscx"));
|
||||
score->doLayout();
|
||||
Measure* m1 = score->firstMeasure();
|
||||
Measure* m2 = m1->nextMeasure();
|
||||
|
||||
QVERIFY(m1 != 0);
|
||||
QVERIFY(m2 != 0);
|
||||
|
||||
// select 2 chord rests with a 2 note tremolo inbetween
|
||||
Segment* s = m1->first(Segment::Type::ChordRest);
|
||||
score->select(static_cast<Ms::Chord*>(s->element(0))->notes().at(0));
|
||||
s = s->next(Segment::Type::ChordRest);
|
||||
score->select(s->element(0), SelectType::RANGE);
|
||||
|
||||
QVERIFY(score->selection().canCopy());
|
||||
QString mimeType = score->selection().mimeType();
|
||||
QVERIFY(!mimeType.isEmpty());
|
||||
QMimeData* mimeData = new QMimeData;
|
||||
mimeData->setData(mimeType, score->selection().mimeData());
|
||||
QApplication::clipboard()->setMimeData(mimeData);
|
||||
|
||||
// paste into last CR of second measure
|
||||
Segment* lastCRSeg = m2->last()->prev1(Segment::Type::ChordRest);
|
||||
score->select(lastCRSeg->element(0));
|
||||
|
||||
score->startCmd();
|
||||
score->cmdPaste(mimeData,0);
|
||||
score->endCmd();
|
||||
|
||||
score->doLayout();
|
||||
|
||||
QVERIFY(saveCompareScore(score, QString("copypaste14.mscx"),
|
||||
DIR + QString("copypaste14-ref.mscx")));
|
||||
delete score;
|
||||
}
|
||||
|
||||
QTEST_MAIN(TestCopyPaste)
|
||||
#include "tst_copypaste.moc"
|
||||
|
||||
|
|
Loading…
Reference in a new issue