Skip to content

Commit

Permalink
Removed code that was necessary for compatibility with Musescore4
Browse files Browse the repository at this point in the history
  • Loading branch information
looptailG committed Oct 12, 2024
1 parent bedbe23 commit 09fbdf5
Showing 1 changed file with 6 additions and 47 deletions.
53 changes: 6 additions & 47 deletions source/31EdoTuner.qml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,6 @@ MuseScore
menuPath: "Plugins.Tuner.31EDO";
description: "Retune the selection, or the whole score if nothing is selected, to 31EDO.";
version: "1.5.5";

Component.onCompleted:
{
if (mscoreMajorVersion >= 4)
{
title = qsTr("31EDO Tuner");
thumbnailName = "31EdoThumbnail.png";
categoryCode = "playback";
}
}

// Size in cents of an EDO step.
property var stepSize: 1200.0 / 31;
Expand Down Expand Up @@ -397,15 +387,8 @@ MuseScore
curScore.endCmd();

debugLogger.showLogMessages();

if (mscoreMajorVersion >= 4)
{
quit();
}
else
{
Qt.quit();
}

Qt.quit();
}

/**
Expand Down Expand Up @@ -465,23 +448,6 @@ MuseScore
var defaultAccidentalOffset = supportedAccidentals[accidentalName]["DEFAULT_OFFSET"];
if (defaultAccidentalOffset !== undefined)
{
// Undo the default tuning offset which is applied to certain
// accidentals.
// The default tuning offset is applied only if an actual microtonal
// accidental is applied to the current note. For this reason, we
// must check getAccidentalName() on the current note, it is not
// sufficient to check the value saved in accidentalName.
if (mscoreMajorVersion >= 4)
{
var actualAccidentalName = getAccidentalName(note);
var actualAccidentalOffset = supportedAccidentals[actualAccidentalName]["DEFAULT_OFFSET"];
if (actualAccidentalOffset !== undefined)
{
logMessage("Undoing the default tuning offset of: " + actualAccidentalOffset);
tuningOffset -= actualAccidentalOffset;
}
}

// Apply the tuning offset for this specific accidental.
var edoSteps = getAccidentalEdoSteps(accidentalName);
logMessage("Offsetting the tuning by the following amount of EDO steps: " + edoSteps);
Expand Down Expand Up @@ -721,22 +687,15 @@ MuseScore
{
isErrorMessage = false;
}
if (mscoreMajorVersion >= 4)

if (isErrorMessage)
{
console.error(message);
debugLogger.log(message, isErrorMessage);
}
else
{
if (isErrorMessage)
{
console.error(message);
debugLogger.log(message, isErrorMessage);
}
else
{
console.log(message);
}
console.log(message);
}
}
}

0 comments on commit 09fbdf5

Please sign in to comment.