Pretty cool, but a Fourier transform is overkill! Many commercial hand-held tuners use a cool trick that works exceptionally well: zero-crossing.<p>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.<p>Regardless, nice job.