A Web Audio experiment: detecting piano notes
David Gilbertson
805

Hey, good read. The web audio API looks fun to play in. The keyboard also looks nice. Here’s a few nitpicks I found:

You should be able to more accurately get frequency information as the peak in `getByteFrequencyData` (https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData). This comes directly from the FFT in browser nativeland so it should be more efficient.

For SmartArray, mean, median and mode can be computed more efficiently on streaming data. If you’re accessing these values upon every iteration, it may be more efficient to maintain them rather than recompute them on every access. Food for thought!

Keep playing!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.