6

I'm wondering if I can extract a sequence of musical notes from a recorded sound using Python.

It is the first time I'm considering using Python for this.


Help would be truly awesome :)

casperOne
  • 72,334
  • 18
  • 180
  • 242
RadiantHex
  • 23,687
  • 47
  • 145
  • 240

1 Answers1

11

What you would want to do is take your audio samples, convert them into the frequency domain with a Fast Fourier Transform (FFT), find the most powerful frequency in the sample, and convert that frequency into a note.

See FFT for Spectrograms in Python for pointers to libraries to help with the first two items. See http://80.68.92.234/sigproc.html for some sample code to get you started.

Community
  • 1
  • 1
Gabe
  • 82,547
  • 12
  • 135
  • 231
  • 2
    This tuner seems like it has a great implementation of this: https://github.com/mzucker/python-tuner/blob/master/tuner.py – Pro Q May 24 '19 at 19:20