Skip to content

Commit

Permalink
fix #8360: Transpose by Key doesn't transpose by perfect octaves (whe…
Browse files Browse the repository at this point in the history
…n transposing up or down)
  • Loading branch information
Fyrult authored and lasconic committed Mar 24, 2016
1 parent 447a712 commit 17158f6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion libmscore/transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,17 @@ bool Score::transpose(TransposeMode mode, TransposeDirection direction, Key trKe
break;
}
}
interval = keydiff2Interval(key, trKey, direction);
if (key != trKey) {
interval = keydiff2Interval(key, trKey, direction);
}
else { //same key, which direction?
if (direction == TransposeDirection::UP)
interval = Interval(12);
else if (direction == TransposeDirection::DOWN)
interval = Interval(-12);
else //don't do anything for same key and closest direction
return true;
}
}
else {
interval = intervalList[transposeInterval];
Expand Down

0 comments on commit 17158f6

Please sign in to comment.