MSGEQ7 IC Input Timing

Hey, im using an MSGEQ7 IC to receive audio inputs and display the 63Hz frequency on an WS2812B addressable LED strip. Though i am receiving my inputs fine and my circuits work, i just wanted to know if i could have some help when it comes to timing for receiving the values from my IC. My main goal is to have the LED strip react to music and it works but it is not quite as responsive as i would like it to be. That and some LEDs stay on when the LEDs need to turn off from top to bottom when there are no frequencies being received in the 63Hz range or no music is playing. I know this happens because of the delays in my audioRead() function, and i know to avoid this I would need to use millis() or micros() for timing, but im struggling with actually implementing it. I struggle with understanding how to keep the timing tight and accurate. In my code you can see my attempt at trying to use micros() to make an equivalent piece of code in the audioRead() function. I’m using the FastLED library for this project too. Thanks in advance!

My code below:

#include <FastLED.h>
#define NUM_LEDS 144
#define DATA_PIN 9
#define RESET 6
#define STROBE 5
#define AUDIOPIN A0
int i = 0;
int col = 0;
int inputArray[7];
int led63hz = 0;
int downMillis();
unsigned long currentMicros = 0;
unsigned long previousMicros = 0;
unsigned long holdMicros = 0;
int downcount = 15;

//for IC data
int p1 = LOW;
int p2 = LOW;
int p3 = LOW;
int p4 = LOW;
int start = HIGH;
//Code for LED strip functionality
CRGB leds[NUM_LEDS];



void setup() {
  // put your setup code here, to run once:

  //IC related pin setup
  pinMode(RESET, OUTPUT);
  pinMode(STROBE, OUTPUT);
  pinMode(AUDIOPIN, INPUT);

  //LED related pin setup
  pinMode(DATA_PIN, OUTPUT);
  FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
  FastLED.setMaxPowerInVoltsAndMilliamps(5, 700);
  FastLED.setBrightness(50);

  //Serial
  Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
  currentMicros = micros();
  //Function to read analog values from IC MSQEQ7
  audioRead();

  //Function(s) to control LEDs based on Frequency band
  mapFunction();
  lightUp();
  //63HzLightDown();
  if ((currentMicros - previousMicros) > 500)
  {

    leds[downcount].setRGB(0, 0, 0);
    if (downcount < 0)
    {
      downcount = 15;
    }

    downcount--;
  }
}

//Function to Read Analog Values
void audioRead()
{

  digitalWrite(RESET, HIGH);
  digitalWrite(RESET, LOW);
  delayMicroseconds(75);

  for (int i = 0; i < 7; i++)
  {
    digitalWrite(STROBE, LOW);
    delayMicroseconds(40);

    inputArray[i] = analogRead(AUDIOPIN);
    //Serial.print("\nThis is box ");
    //Serial.print(i);
    //Serial.print(":");
    //Serial.print(inputArray[i]);
    // Serial.print("\n");
    digitalWrite(STROBE, HIGH);
    delayMicroseconds(40);
  }
  //My attempt at re-implementing the code above:
  /*
    if(start == HIGH)
    {
      digitalWrite(RESET, HIGH);
      digitalWrite(RESET, LOW);
      start == LOW;
      p1 = HIGH;
    }

    //make p1 low at start
    else if( ( (micros() - currentMicros >= 0.075) && p1 == HIGH) || ( (micros() - holdMicros >= 0.04) && (micros() - holdMicros <= 0.075) ) )
    {
      digitalWrite(STROBE, LOW);
      p2 = HIGH;
      p1 = LOW;
    }

    else if( (micros() - currentMicros >= 0.04) && p2 == HIGH)
    {
      inputArray[i] = analogRead(AUDIOPIN);
      digitalWrite(STROBE, HIGH);
      p2 = LOW;
      p3 = HIGH;
    }

    else if( (micros() - currentMicros >= 0.04) && p3 == HIGH)
    {
      if (i >= 6)
      {
        i = 0;
        p1 = LOW;
        p2 = LOW;
        p3 = LOW;
        p4 = LOW;
        start = HIGH;
      }

      i++;
      holdMicros = micros();

    }
  */
}
//Dont really need this down here, just for my understanding's sake;
void mapFunction()
{

  //Or we could use a map
  led63hz = map(inputArray[0], 0, 1023, 0, 14);
  //downcount = led63hz;

}

void lightUp()
{
  fill_solid(leds, led63hz, CRGB(0, 210, 100));
  FastLED.show();
}


//END OF PRGRAM

Why are you reading in 7 values from analogRead() when all you ever use is the first once you read? An easier fix would be not avoid the useless extra reads.

You are also trying to set leds that are out of bounds. Your downcount variable is used first and then you check to see if it is less than zero, that means at one point you are trying to set leds[-1].

You also never clear the leds that where set on the previous call to lightUp() so that is why you may be getting a stray led or two staying on. If led64hz = 10, then 10 leds get lit up. The next time through loop(), led64hz could be 8 but lightUp() will just set the first 8 leds, leaving the 9th and 10th leds lit.