fix last commit
This commit is contained in:
parent
d280091f22
commit
4532ce17a0
6 changed files with 20 additions and 13 deletions
|
@ -2424,7 +2424,7 @@ Measure* Chord::measure() const
|
|||
|
||||
void Chord::sortNotes()
|
||||
{
|
||||
printf("Chord::sortNotes\n");
|
||||
// printf("Chord::sortNotes\n");
|
||||
std::sort(notes().begin(), notes().end(),
|
||||
[](const Note* a,const Note* b)->bool { return b->line() < a->line(); }
|
||||
// [](const Note* a,const Note* b)->bool { return a->pitch() < b->pitch(); }
|
||||
|
|
|
@ -286,6 +286,7 @@ inline int Note::concertPitchIdx() const
|
|||
void Note::setPitch(int val)
|
||||
{
|
||||
_pitch = restrict(val, 0, 127);
|
||||
#if 0
|
||||
int pitchOffset = 0;
|
||||
if (score()) {
|
||||
Part* part = staff() ? staff()->part() : 0;
|
||||
|
@ -298,13 +299,16 @@ void Note::setPitch(int val)
|
|||
if (chord()->measure())
|
||||
chord()->measure()->updateAccidentals(chord()->staffIdx());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Note::setPitch(int pitch, int tpc1, int tpc2)
|
||||
{
|
||||
setPitch(pitch);
|
||||
Q_ASSERT(tpcIsValid(tpc1));
|
||||
Q_ASSERT(tpcIsValid(tpc2));
|
||||
_tpc[0] = tpc1;
|
||||
_tpc[1] = tpc2;
|
||||
setPitch(pitch);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
@ -334,6 +338,8 @@ void Note::setTpcFromPitch()
|
|||
{
|
||||
_tpc[0] = tpcFromPitch(_pitch);
|
||||
_tpc[1] = tpcFromPitch(_pitch - transposition());
|
||||
Q_ASSERT(tpcIsValid(_tpc[0]));
|
||||
Q_ASSERT(tpcIsValid(_tpc[1]));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -414,13 +414,6 @@
|
|||
<Chord>
|
||||
<lid>7</lid>
|
||||
<durationType>whole</durationType>
|
||||
<Note>
|
||||
<lid>8</lid>
|
||||
<pitch>53</pitch>
|
||||
<tpc>13</tpc>
|
||||
<fret>8</fret>
|
||||
<string>4</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<lid>9</lid>
|
||||
<pitch>50</pitch>
|
||||
|
@ -428,6 +421,13 @@
|
|||
<fret>0</fret>
|
||||
<string>3</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<lid>8</lid>
|
||||
<pitch>53</pitch>
|
||||
<tpc>13</tpc>
|
||||
<fret>8</fret>
|
||||
<string>4</string>
|
||||
</Note>
|
||||
<Note>
|
||||
<lid>10</lid>
|
||||
<pitch>57</pitch>
|
||||
|
|
0
mtest/guitarpro/updateReference
Normal file → Executable file
0
mtest/guitarpro/updateReference
Normal file → Executable file
|
@ -161,8 +161,8 @@
|
|||
<measure number="2">
|
||||
<note>
|
||||
<pitch>
|
||||
<step>A</step>
|
||||
<octave>4</octave>
|
||||
<step>C</step>
|
||||
<octave>5</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
|
@ -172,8 +172,8 @@
|
|||
<note>
|
||||
<chord/>
|
||||
<pitch>
|
||||
<step>C</step>
|
||||
<octave>5</octave>
|
||||
<step>A</step>
|
||||
<octave>4</octave>
|
||||
</pitch>
|
||||
<duration>1</duration>
|
||||
<voice>1</voice>
|
||||
|
|
|
@ -146,6 +146,7 @@ Score* MTest::readCreatedScore(const QString& name)
|
|||
delete score;
|
||||
return 0;
|
||||
}
|
||||
score->updateNotes();
|
||||
return score;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue