 int sum_fft;
 float frequency;
 float SAMPLE_RATE = 9600.0;
-int SKIP_MULT = 16;
+int SKIP_MULT = 4;
 int MAX_FFT_BIN = 16383;
-int brightness_mult;
+int brightness;  // controls the LED brightness based on dB level
+// LEDs can be set up to 127, but it seems too bright so we tone it down a bit
+int MAX_BRIGHTNESS = 95;
 
 float base_freak = SAMPLE_RATE / FFT_N / 2;
 


// Fill the dots progressively along the strip.
void setColor(uint32_t c) {
    int i;

    for (i=0; i < strip.numPixels(); i++) {
        strip.setPixelColor(i, c);
        strip.show();
    }
}

void loop() {
    //cli();  
    calculateFFT();  // result is placed in fft_log_out
    //sei();

    peak_index = 0;
    max_value = 0;

void calculateFFT() {
    for (int i = 0 ; i < FFT_N * 2; i += 2) { // save samples
        /* 
         * A hack to sample at a slower rate. 
         * The minimum sample rate is 9.6 kHz, so reduce sample rate 
         * by skipping ADC read cycles, essentially spreading out our
         * sample over time. Reducing the sample rate increases our
         * frequency resolution, so we can differentiate frequencies 
         * close to one another, but at the expense of not detecting higher 
         * frequencies.
         * 
         * The effective sample rate would then be:
         * SAMPLE_RATE / SKIP_MULT
         */
        for (int j = 0; j < SKIP_MULT; j++) {
            while(!(ADCSRA & 0x10)); // wait for adc to be ready
            ADCSRA = 0xf5;           // restart adc
        }

        byte m = ADCL;             // fetch ADC data (low byte)
        byte j = ADCH;             // fetch ADC data (high byte)
        int k = (j << 8) | m;      // combine low/high bytes to form into an int
        k -= 0x0200;               // form into a signed int
        k <<= 6;                   // form into a 16b signed int
        fft_input[i] = k;          // put real data into even bins
