Mp3 audio into arduino

Hi, I was planning to make a single light bar that would increase the amount of LED's turned on, brightness and maybe change color based on audio input. (A simpler version of audio spectrum analyzer).I was wondering if I could directly connect the audio from an audio jack to the Arduino and process the audio and change it into light. Which library should I use?

I was wondering if I could directly connect the audio from an audio jack to the Arduino

Yes, you can connect a line-level or headphone-level audio signal to an Arduino analog input but you have to bias the signal because the Arduino can't read the negative half of the AC audio waveform. In fact, it can be damaged by negative voltages and/or you can "damage" (distort) the audio signal.

A "loud" line-level or headphone signal will work best.

There is a bias circuit attached to [u]this post[/u], and there is also some code which should help get you started.

Of course, you'll want a [u]Y-Splitter[/u] or you can put two audio jacks on your gizmo you to make a pass-through connection.

Which library should I use?

From what you've described you may not need a library. FFT/FHT libraries are used to get frequency information (for a spectrum analyzer or color organ, etc.). It depends on what you want... You can also use the MSGEQ7 chip to get 7 frequency bands without a library. (That chip also takes care of the bias problem.) ...I've made several effects that simply use the loudness and the "beat" (no frequency information).

Mp3 audio into Arduino

Since you are feeding the Arduino an analog signal, this has nothing to do with MP3.. :wink: