This commit is contained in:
alex 2022-05-02 21:27:02 +01:00
parent c23f9b8629
commit 53d82e5126
4 changed files with 10 additions and 8 deletions

View file

@ -33,7 +33,7 @@ export const fromMidi = (n) => {
// modulo that works with negative numbers e.g. mod(-1, 3) = 2
// const mod = (n: number, m: number): number => (n < 0 ? mod(n + m, m) : n % m);
export const mod = (n, m) => (n % m + m) % m;
export const mod = (n, m) => ((n % m) + m) % m;
export const getPlayableNoteValue = (event) => {
let { value: note, context } = event;