Skip to content

Commit

Permalink
fix #64251: crash on playback of ornament on tab staff
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella authored and lasconic committed Jun 22, 2015
1 parent 95b0e6f commit 799dd87
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions libmscore/rendermidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,10 +935,16 @@ int articulationExcursion(Note *noteL, Note *noteR, int deltastep)
}
}
if (!done) {
AccidentalVal acciv2 = measureR->findAccidental(chordR->segment(), chordR->staff()->idx(), lineR2);
int acci2 = int(acciv2);
// we have to add ( note->ppitch() - noteL->epitch() ) which is the delta for transposing instruments.
halfsteps = line2pitch(lineL-deltastep, clefL, Key::C) + noteL->ppitch() - noteL->epitch() + acci2 - pitchL;
if (staffL->isPitchedStaff()) {
AccidentalVal acciv2 = measureR->findAccidental(chordR->segment(), chordR->staff()->idx(), lineR2);
int acci2 = int(acciv2);
// we have to add ( note->ppitch() - noteL->epitch() ) which is the delta for transposing instruments.
halfsteps = line2pitch(lineL-deltastep, clefL, Key::C) + noteL->ppitch() - noteL->epitch() + acci2 - pitchL;
}
else {
// cannot rely on accidentals or key signatures
halfsteps = deltastep;
}
}
}
return halfsteps;
Expand Down

0 comments on commit 799dd87

Please sign in to comment.