caseif / vis.js

Monstercat visualizer in Javascript and three.js.
GNU Lesser General Public License v2.1
83 stars 37 forks source link

Spectrum Odd in Safari and Other Browsers with fftSize of 2048 #15

Closed DahliaWitt closed 8 years ago

DahliaWitt commented 8 years ago

Without modification, vis.js will not work in Safari. After converting ES6 down to ES5 and modifying a few other small changes, it will work on Safari. Safari has a max fftSize of 2048 and the visualizer looks really odd at this size, going around glitchy and such. Going back to old versions this did not occur as bad, the breaking changes occurred at commit 24c31c3b3a9feea833e5584268cb179341647844.

caseif commented 8 years ago

Unfortunately, this isn't something I'm able to easily fix. Because of the fftSize cap, the AudioNode simply doesn't provide enough resolution to display the spectrum in a desirable fashion. As such, I'm closing this as wontfix, although I'll add a note regarding this issue to the README. I'm genuinely sorry for any inconvenience this causes.

Also, for clarity: the commit referenced was made to implement a horizontal logarithmic scale, which entailed interpolating the spectrum's bins rather than simply using the raw bin data. This changed the particular data which was rendered and caused the glitchiness in Safari to become more apparent.

DahliaWitt commented 8 years ago

Alright, thanks.