4 ms·
The graphics are directly rendered on an HTML Canvas. It took a little bit of optimization (and a performance-conscious design to begin with) to get there but i
by rodw 7y ago
The graphics are directly rendered on an HTML Canvas. It took a little bit of optimization (and a performance-conscious design to begin with) to get there but it seems to consistently get 60 FPS even with all of the graphics, audio streaming and signal processing.
Actually the graphics are the easy part, the bulk of the time in the "inner loop" is in the audio analysis. Not to give away any secret sauce but in my experience naively using `AnalyserNode.getFloatFrequencyData` does not provide adequate performance or even accuracy when under "noisy" conditions. FATpick uses a "proprietary" (custom) pitch detection algorithm, but, other than a few domain-specific insights maybe, there's nothing particularly groundbreaking about it -- it's doing the same kind of things you'll find in academic literature on the topic, just judiciously selected and tuned by endless (and ongoing) lab-testing.