Arduino Color Organ

I know this topic has been posted dozens of times, but I couldn't find exactly what I needed. I am not a very good coder at all. I can understand what is going on by reading code, not so good at implementing it myself. I would love any help or suggestions anyone can provide. I am using this code currently for my project:

int analogPin=0;
int strobePin=2;
int resetPin=3;
int ledred=9;
int ledblue=10;
int ledgreen=11;
int spectrumValue[7];
int filter=220;

void setup(){

Serial.begin(9600);
pinMode(analogPin, INPUT);
pinMode(strobePin, OUTPUT);
pinMode(resetPin, OUTPUT);
pinMode(ledred, OUTPUT);
pinMode(ledblue, OUTPUT);
pinMode(ledgreen, OUTPUT);
digitalWrite(resetPin, LOW);
digitalWrite(strobePin, HIGH);
}

void loop(){

digitalWrite(resetPin, HIGH);
digitalWrite(resetPin, LOW);
for (int i=0;i<7;i++){
digitalWrite(strobePin, LOW);
delay(30);
spectrumValue*=analogRead(analogPin);*
spectrumValue_=constrain(spectrumValue*, filter, 1023);
spectrumValue=map(spectrumValue, filter,1023,0,255);
Serial.print(spectrumValue);
Serial.print(" ");
digitalWrite(strobePin, HIGH);
}
Serial.println();
analogWrite(ledred,spectrumValue[0]);
analogWrite(ledred,spectrumValue[1]);
analogWrite(ledblue,spectrumValue[3]);
analogWrite(ledblue,spectrumValue[4]);
analogWrite(ledgreen,spectrumValue[5]);
analogWrite(ledgreen,spectrumValue[6]);
}[/quote]*

The issue that I run into is that I have to raise the filter the beginning because I kept picking up background noise, causing the lights to flicker with no sound playing. Is there anyway to filter out the noise that doesn't compromise the sensitivity of my lights?
Also, is there anyway to be able to calibrate the lights to the volume of the input? I use this with my records and Xbox, but the Xbox puts out a much louder signal. Therefore, I have to throw a headphone amp in between to regulate the output level._

  analogWrite(ledred,spectrumValue[0]);
  analogWrite(ledred,spectrumValue[1]);

The first write is useless. The second one trumps it.

    spectrumValue=map(spectrumValue, filter,1023,0,255);

That's an expensive way to divide by 4.

Is there anyway to filter out the noise that doesn't compromise the sensitivity of my lights?

You are compensating for that in the map.

Also, is there anyway to be able to calibrate the lights to the volume of the input?

If you could read the lowest and highest values before actually getting real input, yes. Since that seems unlikely, no.

You could add a potentiometer, and use the reading from that to determine a scale factor from say 0.5 to 2.0, and apply the scale factor to what you read from the analog pin after the constrain and map operations.