lordmauve / pyfxr

Sound effects generation for Python, in fast Cython code, compatible with Pygame and Pyglet.
https://pyfxr.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
18 stars 4 forks source link

Given a waveform, I want to know the constituent notes / frequencies expressed as a data structure. #6

Open ntoll opened 3 years ago

ntoll commented 3 years ago

Basically, FFT (http://www.dspguide.com/ch12/2.htm) that outputs something both meaningful at an audio and musical level. :-)

lordmauve commented 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.

lordmauve commented 3 years ago

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

ntoll commented 3 years ago

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. ;-)

lordmauve commented 3 years ago

This looks promising; it has several implementations: https://aubio.org/manual/latest/py_analysis.html#aubio.pitch