News for hackers. Stuff that matters.
Re:Show HN: Are you playing your violin (viola, guitar, etc.... by jtanderson on Tuesday January 26, 2021 @04:28PM (#25921285)
Very nice work! There seem to be some issues for me with the lower strings on guitar: the low E registers as a B, for example. Higher strings seem to work well though. Not totally sure what's going on, but could probably be attributed to mic quality :)

Edit: after more playing around (heh) it does start to pick up the almost-E notes, F, G, etc. but is a little inconsistent. I tried monitoring the mic and even recording to play back what got picked up, and it sounds just as clear as the higher notes. Maybe something numerical happening in the Javascript fft?

Re:Show HN: Are you playing your violin (viola, guitar, etc.... by InitialLastName on Tuesday January 26, 2021 @05:42PM (#25921907)
You need a longer FFT window to discern lower frequencies. Assuming a 44.1k sample rate and the default window size of 4096, you only get 10Hz buckets. Given that the low E is 82Hz, you effectively can't distinguish it from the D# at 78Hz and the F at 87Hz
Re:Show HN: Are you playing your violin (viola, guitar, etc.... by ctrager on Tuesday January 26, 2021 @05:47PM (#25921953)
FFT is configurable at the bottom of the page, but for me it gets unpleasantly laggy if I make it bigger than 4096
Re:Show HN: Are you playing your violin (viola, guitar, etc.... by InitialLastName on Tuesday January 26, 2021 @05:49PM (#25921964)
Yep, that's the tradeoff. As with seemingly everything else, you can thank Claude Shannon for that.