Making a Guitar Tuner with HTML5
jonathan.bergknoff.com
jonathan.bergknoff.com
While far less accurate than your implementation, it can still help nail the note (I've written an implementation in awk before... disgusting, but worked!). Simply look at the raw data, and see when it crosses over from negative to positive (or vice-versa). Count the number of crossings in some interval, and now you have the frequency. Usually a little input fuzzing is required, but it works exceptionally well.
Regardless, nice job.
I may have to play around with the code here and see if I can get it to pick out multiple notes being played simultaneously, and maybe get it to measure how fast I can do chord changes (like Justin Sandercoe's "1 minute changes" practice method[1]).