Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve music note detection below 100Hz and #28

Open
tymbark opened this issue Jan 8, 2022 · 1 comment
Open

Improve music note detection below 100Hz and #28

tymbark opened this issue Jan 8, 2022 · 1 comment

Comments

@tymbark
Copy link

tymbark commented Jan 8, 2022

Hi. Thank you for giving this cool project to the community.

I have compiled it and used the app with my piano to see how note detection works. I've seen two problems.

  1. Notes below G2 (~98Hz) are not recognised.
  2. Often one note is mistaken for the same note one octave higher. For example Im pressing A3 on the keyboard and app says A4.

I'm thinking if note recognition could be improved. So A3 is not shown as A4 and few more low frequency notes are recognised. Can you suggest some improvement that I can do? I'm using stft.maxAmpFreq to see what note is it.

@bewantbe
Copy link
Owner

Hi, tymbark. Thank you for using the app.

In my experience, the environmental noise & thermal noise (roughly brown noise, i.e. 6 dB per octave) will interference the peak detection algorithm. Because the algorithm detect only the highest point in the spectrum. In a typical brown noise, the highest point is the lowest frequency.

In my mind, we have two ways to overcome it:

(a) auto or manually draw a line of noise, then feed the peak detection algorithm only the signal spectrum, i.e. the spectrum subtracted by the noise line.
(b) let the algorithm detect only the local maximum.

But, as a "workaround", we can actually pick the dBA mode (the "dB" button below), which will strongly suppress the spectrum below 100Hz, and the peak measurement will be slightly more reliable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants