5

So, I'm planning on trying out making a light organ with an Arduino and Python, communicating over serial to control the brightness of several LEDs. The computer will use the microphone or a playing MP3 to generate the data.

I'm not so sure how to handle the audio processing. What's a good option for python that can take either a playing audio file or microphone data (I'd prefer the microphone), and then split it into different frequency ranges and write the intensity to variables? Do I need to worry about overtones if I use the microphone?

TVarmy
  • 75
  • 1
  • 5

3 Answers3

1

If you're not committed to using Python, you should also look at using PureData (PD) to handle the audio analysis. Interfacing PD to the Arduino is already a solved problem, and there are a lot of pre-existing components that make working with audio easy.

bgporter
  • 33,237
  • 8
  • 58
  • 65
0

Try http://wiki.python.org/moin/Audio for links to various Python audio processing packages.

The audioop package has some basic waveform manipulation functions.

See also:

Community
  • 1
  • 1
patrickmdnet
  • 3,274
  • 1
  • 28
  • 31
0

Portaudio has a Python interface that would let you read data off the microphone.

For the band splitting, you could use something like a band-pass filter feeding into an envelope follower -- one filter+follower for each frequency band of interest.

Russell Borogove
  • 17,663
  • 3
  • 38
  • 47