Skip to content

Commit

Permalink
Merge pull request #46 from Lab-Lab-Lab/main
Browse files Browse the repository at this point in the history
fixes #45
  • Loading branch information
hcientist authored Nov 2, 2024
2 parents a0cdce2 + 38e84b7 commit 7561b78
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/flat.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ const pitchesToRests = (pieceScoreJSON) => {
},
}),
);

// last step of theoretical for Bb Melody Freedom 20240 Band wouldn't load.
// looks like comparing Concert Pitch TC to Bb for this part,
// the Bb version has 2 harmonies notated in a single measure,
// but the Concert Pitch TC never has 2 harmonies
// current hypothesis: in the steps above we potentially change
// the duration of the measures. this could be the issue: only in measures
// that have multiple harmonies, the second harmony would have
// its timePos > 0 but we don't currently re-compute it,
// so it ends up out of bounds in some cases
if (measure?.harmony?.length > 1) {
const harmonyDuration = currentTimeSig.duration;
measure.harmony.forEach((harmony, j) => {
measuresRef[i].harmony[j]['$adagio-location'] = {
timePos: j * harmonyDuration,
};
});
}
});
return composeScoreJSON;
};
Expand Down

0 comments on commit 7561b78

Please sign in to comment.