Audio as a Consistent Analog Input

So I am trying to get an exact reading on the Audio Input, I really am a newbie. But Im trying to make a christmas light display. I need to know how to hook up the audio cable to the arduino. Because with my way I get a lot of 0's and if I use a tone generator its still as random as with music. PLEASE HELP!

First - You should NOT connect audio directly to the Arduino. An audio signal is AC. It has a positive & negative half-cycle, and the Arduino can be damaged if you connect a negative voltage (or any voltage above 5V). Those negative half-cycles are probably reading zero, so I assume about half your readings are zero..

Since it's a constantly varying sine wave or audio signal, of course, you are going to get random-looking values. Every time you read the ADC, you are taking a "snapshot reading" somewhere unknown between the negative & positive peaks.

The easiest & most common way of dealing with the negative half-cycle is to bias the input at 2.5V. This is done with two equal value resistors (typically ~10K) and a capacitor (typically ~0.1uF or more). If you search, you can find the schematic & examples. With the 2.5V bias and the default 5V reference, silence will read about 512 on the ADC. When you apply an AC signal, you'll get readings above and below 2.5V.

The easiest way to deal with the constantly-changing "random" signal would be to "grab" the biggest peak every 1/10th of a second or so. Or, you can take a short-term moving-average. (Look for the "Smoothing Example".) But since the true average of an AC signal is always zero (or 512 if biased), you need to either throw-away the negative readings or use the absolute value.

I actually deal with both issues by using a [u]Peak Detector Circuit[/u]. It converts the AC signal to a more-slowly changing DC signal the follows the peak loudness. (A half-wave peak detector like this throws-away the negative half-cycle.)