Fix: Cast numbers to int with .scale function

This commit is contained in:
2024-02-28 12:14:49 +01:00
parent 47534a0724
commit 8940bf3505

View File

@ -442,7 +442,7 @@ Array.prototype.scale = function (
return this.map((value) => {
const octaveShift = Math.floor(value / selected_scale.length) * 12;
return (
selected_scale[mod(value, selected_scale.length)] +
selected_scale[mod(Math.floor(value), selected_scale.length)] +
base_note +
octaveShift
);