add euclid

This commit is contained in:
Felix Roos 2022-03-17 15:03:57 +01:00
parent eaa250a962
commit 91c0a46ba9
10 changed files with 100 additions and 21 deletions

View file

@ -39,3 +39,6 @@ export const getPlayableNoteValue = (event) => {
}
return note;
};
// rotate array by n steps (to the left)
export const rotate = (arr, n) => arr.slice(n).concat(arr.slice(0, n));