Skip to content

Commit

Permalink
Fixed the behaviour for negative tpc
Browse files Browse the repository at this point in the history
  • Loading branch information
looptailG committed May 1, 2024
1 parent 0f62ff2 commit ab04fb6
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions source/31EdoTuner.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MuseScore
{
menuPath: "Plugins.Tuner.31EDO";
description: "Retune the selection, or the whole score if nothing is selected, to 31EDO.";
version: "1.5.1-alpha.5";
version: "1.5.1-alpha.6";

Component.onCompleted:
{
Expand Down Expand Up @@ -429,26 +429,32 @@ MuseScore
break;

case 2:
case -5:
tpcNoteName = "D";
break;

case 4:
case -3:
tpcNoteName = "E";
break;

case 6:
case -1:
tpcNoteName = "F";
break;

case 1:
case -6:
tpcNoteName = "G";
break;

case 3:
case -4:
tpcNoteName = "A";
break;

case 5:
case -2:
tpcNoteName = "B";
break;
}
Expand Down Expand Up @@ -607,27 +613,29 @@ MuseScore
case 0:
return "C";

case 1:
return "G";

case 2:
case -5:
return "D";

case 3:
return "A";

case 4:
case -3:
return "E";

case 5:
return "B";

case -1:
case 6:
case -1:
return "F";

default:
throw "Could not resolve the tpc: " + note.tpc;
case 1:
case -6:
return "G";

case 3:
case -4:
return "A";

case 5:
case -2:
return "B";
}
}

Expand Down

0 comments on commit ab04fb6

Please sign in to comment.