Skip to content

Commit 7561b78

Browse files
authored
Merge pull request #46 from Lab-Lab-Lab/main
fixes #45
2 parents a0cdce2 + 38e84b7 commit 7561b78

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/flat.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,24 @@ const pitchesToRests = (pieceScoreJSON) => {
7575
},
7676
}),
7777
);
78+
79+
// last step of theoretical for Bb Melody Freedom 20240 Band wouldn't load.
80+
// looks like comparing Concert Pitch TC to Bb for this part,
81+
// the Bb version has 2 harmonies notated in a single measure,
82+
// but the Concert Pitch TC never has 2 harmonies
83+
// current hypothesis: in the steps above we potentially change
84+
// the duration of the measures. this could be the issue: only in measures
85+
// that have multiple harmonies, the second harmony would have
86+
// its timePos > 0 but we don't currently re-compute it,
87+
// so it ends up out of bounds in some cases
88+
if (measure?.harmony?.length > 1) {
89+
const harmonyDuration = currentTimeSig.duration;
90+
measure.harmony.forEach((harmony, j) => {
91+
measuresRef[i].harmony[j]['$adagio-location'] = {
92+
timePos: j * harmonyDuration,
93+
};
94+
});
95+
}
7896
});
7997
return composeScoreJSON;
8098
};

0 commit comments

Comments
 (0)