Open ntoll opened 3 years ago
I think there is a library for this in Python. We wrote something at the Reading Python Dojo where if you whistle it a note it would whistle it back. I'll have to dig up what the library was.
Reading Python Dojo episode 9; we used a library called analyse
which I think is https://pypi.org/project/SoundAnalyse/
Our code:
https://gist.github.com/lordmauve/4bcbbc2ae478473e8f302edf7647dc8d
Ooh.... nice find. I'll take a look :eyes: later and play around. I want to be able to sing a note, and have the computer play another one in harmony. ;-)
This looks promising; it has several implementations: https://aubio.org/manual/latest/py_analysis.html#aubio.pitch
Basically, FFT (http://www.dspguide.com/ch12/2.htm) that outputs something both meaningful at an audio and musical level. :-)