mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-27 13:38:40 +00:00
fix: catch errors in pianoroll getValue
This commit is contained in:
parent
dfd22b5e44
commit
1043baf08a
@ -18,7 +18,13 @@ const getValue = (e) => {
|
|||||||
}
|
}
|
||||||
note = note ?? n;
|
note = note ?? n;
|
||||||
if (typeof note === 'string') {
|
if (typeof note === 'string') {
|
||||||
return noteToMidi(note);
|
try {
|
||||||
|
// TODO: n(run(32)).scale("D:minor") fails when trying to query negative time..
|
||||||
|
return noteToMidi(note);
|
||||||
|
} catch (err) {
|
||||||
|
// console.warn(`error converting note to midi: ${err}`); // this spams to crazy
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (typeof note === 'number') {
|
if (typeof note === 'number') {
|
||||||
return note;
|
return note;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user