mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 13:48:34 +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;
|
||||
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') {
|
||||
return note;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user