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.
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?