Arduino vu meter freaking out

Ok so I am working on making a portable vu meter using the arduino. Last week I had a basic one running using standard LED's and this code

/*
|| A simple VU meter using arduino with analog input smoothing
 ||
 || Contributed:
 || Alexander Brevig
 */

//defines
#define NUMBER_OF_LEDS 8
#define NUMBER_OF_SAMPLES 20

#define DEBUG true

#define VU_METER_DISPLAY_DELAY 10

//analog in pins
byte voltageReferencePin = 0;
byte voltagePin = 2;

//digital out pins
//store the leds in an array, this way changing them later wont be a hazzle
byte ledPins[NUMBER_OF_LEDS] = { 
  6 , 7, 8 , 9 , 10 , 11 , 12 , 13 };

//convert analogRead to VU ledscale
byte voltageComparisonThresholds[] = { 
  0 , 10 , 20 , 30 , 40 , 50, 60, 70 };

int voltageReference = 0; //contain analogRead(voltageReferencePin);

//sample variables
int samples[NUMBER_OF_SAMPLES] = {
  0};
int sample = 0;
int sampleTotal = 0;
byte sampleIndex  = 0;


void setup() {
  for (byte i=0; i<NUMBER_OF_LEDS; i++){
    pinMode(ledPins[i],OUTPUT);
  }
  pinMode(voltageReferencePin,INPUT);
  pinMode(voltagePin,INPUT);

  if(DEBUG){
    Serial.begin(9600);
  }
}

void loop(){
  //SMOOTH See Examples->Analog->Smoothing
  sampleTotal -= samples[sampleIndex];
  samples[sampleIndex] = analogRead(voltageReferencePin);//read value
  sampleTotal += samples[sampleIndex++];  
  if (sampleIndex >= NUMBER_OF_SAMPLES) {
    sampleIndex = 0;
  }
  sample = sampleTotal / NUMBER_OF_SAMPLES;

  if(DEBUG){
    Serial.print("virtual vu: ");
  }

  //DISPLAY_RESULT
  //see Examples->Digital->Loop
  for (byte i=0; i<NUMBER_OF_LEDS; i++){
    if ( analogRead(voltagePin) >= voltageReference + voltageComparisonThresholds[i] ) {
      digitalWrite(ledPins[i],HIGH); 
      if(DEBUG){
        Serial.print("|");
      }
    }
    else{
      digitalWrite(ledPins[i],LOW);  
      if(DEBUG){
        Serial.print(" ");
      }
    }
    delay(VU_METER_DISPLAY_DELAY);
  }

  if(DEBUG){ 
    Serial.println(" "); 
  }

}

I then moved on to use a digitally addressable RGB LED strip I purchased from adafruit.

Working with a friend of mine we came up with this code.

#include "HL1606strip.h"


#define STRIP_D 4
#define STRIP_C 3
#define STRIP_L 2

#define NUMBER_OF_LEDS 16
#define NUMBER_OF_SAMPLES 10

#define DEBUG true

#define VU_METER_DISPLAY_DELAY 10

byte voltageReferencePin = 0;
byte voltagePin = 2;

byte voltageComparisonThresholds[] = {0, 5, 10, 15, 20, 25, 30, 35,
                                      40, 45, 50, 55, 60, 65, 70, 75};
  
int voltageReference = 0;
int temp = 0;
int samples[NUMBER_OF_SAMPLES] = {0};
int sample = 0;
int sampleTotal = 0;
byte sampleIndex  = 0;

HL1606strip strip = HL1606strip(STRIP_D, STRIP_L, STRIP_C, 16);

void setup(void)
{
  pinMode(voltageReferencePin,INPUT);
  pinMode(voltagePin,INPUT);
  if(DEBUG)
  {
    Serial.begin(9600);
  }
  
  for(int i=1; i<=NUMBER_OF_LEDS; i++)
  {
    strip.setLEDcolor(i, BLACK);
  }
  strip.writeStrip();
}

void loop(void)
{ 
  //SMOOTH See Examples->Analog->Smoothing
  sampleTotal -= samples[sampleIndex];
  samples[sampleIndex] = analogRead(voltageReferencePin);//read value
  sampleTotal += samples[sampleIndex++];  
  if (sampleIndex >= NUMBER_OF_SAMPLES)
  {
    sampleIndex = 0;
  }
  sample = sampleTotal / NUMBER_OF_SAMPLES;
  
  if(DEBUG)
  {
    Serial.print("virtual vu: ");
  }
  
  //DISPLAY_RESULT
  //see Examples->Digital->Loop
  for (byte i=0; i<NUMBER_OF_LEDS; i++)
  {
    if(analogRead(voltagePin) >= voltageReference + voltageComparisonThresholds[i])
    {
      strip.setLEDcolor(i, GREEN);
      if(DEBUG)
      {
        Serial.print("|");
      }
    }
    else
    {
      strip.setLEDcolor(i, BLACK);
      if(DEBUG)
      {
        Serial.print(" ");
      }
    }
    delay(VU_METER_DISPLAY_DELAY);
  }
  
  if(DEBUG)
  {
    Serial.println(" "); 
  }
  strip.writeStrip();
}

Several problems have arisen though.
One the LED strip likes to strobe blue when it should be off.
Two the basic vu meter program no longer works, instead of displaying a smooth bar it will have gaps in the middle of it amd generally make no sense at all.

Let me know what you guys think, I am generally new at working with arduino's and programming so I am a bit lost and over my head with this project. :~

im using the same strip but with 38 leds!

yesterday i wrote a nice prog, that worked well. but a friend had to change somthing.. no idea what he did but i commented out what was changed.. well i think its that ;D

#include "HL1606strip.h"

#define STRIP_D 22
#define STRIP_C 24
#define STRIP_L 26

const int numReadings = 10;
int readings[numReadings];      // the readings from the analog input
int index = 0;                  // the index of the current reading
int total = 0;                  // the running total
int average = 0;  

HL1606strip strip = HL1606strip(STRIP_D, STRIP_L, STRIP_C, 38);

const int analogPin = A0;

void setup ()
{
    for (int thisReading = 0; thisReading < numReadings; thisReading++)
    readings[thisReading] = 0;  
}


void loop() 

{
    // subtract the last reading:
  total= total - readings[index];         
  // read from the sensor:  
  readings[index] = analogRead(analogPin); 
  // add the reading to the total:
  total= total + readings[index]; 
  // advance to the next position in the array:
  index = index + 1;                    

  // if we're at the end of the array...
  if (index >= numReadings)              
    // ...wrap around to the beginning: 
    index = 0;                           

  // calculate the average:
  average = total / numReadings/ 35;    
  
for (int thisLed = 0; thisLed < 38; thisLed++) {
  
    if (average > thisLed) {
      strip.setLEDcolor(thisLed, GREEN);
  strip.writeStrip();
      //strip.setLEDcolor(thisLed+1, GREEN);
    } 
    // turn off all pins higher than the ledLevel:h
    else {
   strip.setLEDcolor(thisLed,BLACK);
 strip.writeStrip();
   //strip.setLEDcolor(thisLed+1,BLACK); 
    }
  }
  strip.writeStrip(); 
}

the problem is, its not working with the sound i hear.. i found an old post, where the grumpy mike says it has to be converted in the db we hear. no idea how