Fix: Cast numbers to int with .scale function
This commit is contained in:
@ -442,7 +442,7 @@ Array.prototype.scale = function (
|
|||||||
return this.map((value) => {
|
return this.map((value) => {
|
||||||
const octaveShift = Math.floor(value / selected_scale.length) * 12;
|
const octaveShift = Math.floor(value / selected_scale.length) * 12;
|
||||||
return (
|
return (
|
||||||
selected_scale[mod(value, selected_scale.length)] +
|
selected_scale[mod(Math.floor(value), selected_scale.length)] +
|
||||||
base_note +
|
base_note +
|
||||||
octaveShift
|
octaveShift
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user