Add files via upload

三倍增六度 bug。
This commit is contained in:
Wiwi Kuan
2024-11-25 09:58:18 +08:00
committed by GitHub
parent daf63f55c3
commit 70cac8f25f

View File

@@ -113,10 +113,17 @@
})
.slice(0, 2);
// 把完全一度改成完全八度。
let result = Tonal.Interval.distance(firstTwoNotes[0], firstTwoNotes[1]);
if (result == "1P") {
result = "8P";
}
// Tonal.js 在三倍增六度以上會輸出「-1」硬改回「6」。
if (result.startsWith('-1')) {
result = '6' + result.slice(2);
}
console.log(convertToChineseInterval(result));
let resultWithOctave = [];
resultWithOctave[0] = firstTwoNotes[0] + "4";