fix: ignore haps that error at getFrequency
This commit is contained in:
parent
539160630d
commit
c7f811e14d
1 changed files with 6 additions and 1 deletions
|
|
@ -65,7 +65,12 @@ export function pitchwheel({
|
|||
|
||||
let shape = [];
|
||||
haps.forEach((hap) => {
|
||||
const freq = getFrequency(hap);
|
||||
let freq;
|
||||
try {
|
||||
freq = getFrequency(hap);
|
||||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
const angle = freq2angle(freq, root);
|
||||
const [x, y] = circlePos(centerX, centerY, radius, angle);
|
||||
const hapColor = hap.value.color || color;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue