gnosisguild / wand-nft

wand-nft.vercel.app
8 stars 6 forks source link

Audio glitches #108

Open cedricwaxwing opened 1 year ago

cedricwaxwing commented 1 year ago

I still get quite a bit of audio glitches, even on my fast machine. Through my tests, it correlates with audio changes, and even more glaringly so when I move the actual dials (as opposed to hitting random). NOTE: I let the audio play for 10mn straight without moving anything, and it played just fine. I also pressed the random button nearly 20 times in quick succession with minimal glitching (and 0 sustained glitching). But as soon as I played with the dials again, the glitches came out, oftentimes never going away. All anecdotal, could use some better testing if this continues.

-Marv

cedricwaxwing commented 1 year ago

@samepant I get this error when I spin the colorPicker, but not the stonePicker:

image

It looks like the synth is set up in the exact same way, so I'm not sure what could be causing it to happen only on the color picker. Perhaps the useDragRotates are delaying the triggerAttack somehow?

samepant commented 1 year ago

@cedricwaxwing i found the same thing and have got a fix for it locally. turns out using the same synth for the lightness and hue wheels is the issue.

The remaining issue i'm seeing is failure of the midi synth. if i hit the random button a bunch i eventually see something like 'Max polyphony reached, noted dropped' and then the midi synth stops playing. still trying to figure out what's causing it.

cedricwaxwing commented 1 year ago

@samepant I'm not sure if you already were aware, but I was getting that error again so I tried just commenting out the midSynth and that seemed to resolve it. I'm wondering if we have to set the PolySynth voices to monoSynth somehow https://github.com/Tonejs/Tone.js/issues/939

samepant commented 1 year ago

@cedricwaxwing oh ya lol i'm deep down this debug hole. the Polysynth uses Tone.Synth (which is single voiced) by default, so that doesn't seem to be the issue.