Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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