Skip to content

Commit

Permalink
Added support for local key signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
looptailG committed Nov 30, 2024
1 parent d2def68 commit 9a422e8
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions source/22EdoTuner.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MuseScore
{
menuPath: "Plugins.Tuner.22EDO";
description: "Retune the selection, or the whole score if nothing is selected, to 22EDO.";
version: "1.1.6";
version: "1.6.0";

// Size in cents of an EDO step.
property var stepSize: 1200.0 / 22;
Expand Down Expand Up @@ -367,7 +367,20 @@ MuseScore
// signature change.
for (var i = 0; i < cursor.segment.annotations.length; i++)
{
var annotationText = cursor.segment.annotations[i].text;
var annotation = cursor.segment.annotations[i];
if (annotation.type === Element.STAFF_TEXT)
{
// Staff text changes the key signature for the
// current staff only.
var annotationPart = annotation.staff.part;
if (!(
(4 * staff >= annotationPart.startTrack) && (4 * staff < annotationPart.endTrack)
)) {
continue;
}
}

var annotationText = annotation.text;
if (annotationText)
{
annotationText = annotationText.replace(/\s*/g, "");
Expand Down

0 comments on commit 9a422e8

Please sign in to comment.