Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Simple Piano Note Detector (github.com/apankrat)
14 points by apankrat on Oct 10, 2020 | hide | past | favorite | 3 comments



You might want to try this one too

https://github.com/aguaviva/GuitarTuner

It uses a bank filter and it also works in the browser


Thanks, I haven't heard of the Goertzel algorithm.

It's a spectrum-based detection though, so it will have the same issues as other spectrum detectors. Lower notes tend to have harmonics that are stronger than the base frequency. At least on a piano. Similar issue with mid-range notes that are fading - the fundamental frequency will fade quicker than the harmonics. There's also a separate issue with detecting higher-pitch notes, because the spectrum response to these is very weak.

That is, spectrum alone is not enough to do any sort of reliable note detection. That's where I started too, but none of simple approaches worked well.

[1] https://en.wikipedia.org/wiki/Goertzel_algorithm





Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: