         if (max_value < fft_lin_out[i]) {
             // peak index determines frequency
             peak_index = i;
+            // max value determines brightness
             max_value = fft_lin_out[i];
         }
         if (i > 0) {
-            // sum of all bins determines brightness
+            /* 
+             * maybe an alternate way to control brightness
+             * would be the sum of all non-zero bins, i.e. 
+             * the total power in the sample. However, I don't
+             * have a handle on what the maximum sum would be.
+             */
             sum_fft += fft_lin_out[i];
         }
     }
 
     frequency = (peak_index * (SAMPLE_RATE / SKIP_MULT)) / (FFT_N / 4);
-    brightness_mult = floor(95 * max_value / MAX_FFT_BIN);
+    brightness = round(1.0 * MAX_BRIGHTNESS * sum_fft / MAX_FFT_BIN);
     
-    if (max_value < 80 || sum_fft < 400 || peak_index == 0) {
+    if (max_value < 80 || sum_fft < 3000 || peak_index == 0) {
         // signal too weak or we got the 1st peak (0Hz), no lights
         setColor(strip.Color(0, 0, 0));
     } else if (frequency > 0 && frequency < base_freak * 2) {
         // red
-        setColor(strip.Color(brightness_mult,   0,   0));
+        setColor(strip.Color(brightness, 0, 0));
     }
     else if (frequency >= base_freak * 2 && frequency < (base_freak * 3)) {
         // yellow
-        setColor(strip.Color( brightness_mult, brightness_mult,   0));
+        setColor(strip.Color(brightness, brightness, 0));
     }
     else if (frequency >= base_freak * 3 && frequency < (base_freak * 4)) {
         // green
-        setColor(strip.Color(  0, brightness_mult,   0));
+        setColor(strip.Color(0, brightness, 0));
     }
     else if (frequency >= base_freak * 4 && frequency < base_freak * 5) {
         // cyan
-        setColor(strip.Color(  0, brightness_mult, brightness_mult));
+        setColor(strip.Color(0, brightness, brightness));
     }
     else if (frequency >= base_freak * 5 && frequency < base_freak * 6) {
         // blue
-        setColor(strip.Color(  0,   0, brightness_mult));
+        setColor(strip.Color(0, 0, brightness));
     }
     else if (frequency >= base_freak * 6 && frequency < SAMPLE_RATE/4) {
         // violence!!!
-        setColor(strip.Color(brightness_mult,   0, brightness_mult));
+        setColor(strip.Color(brightness, 0, brightness));
     }
     
-    Serial.print("FFT sum: ");
-    Serial.print(sum_fft);
-    Serial.print("\tPeak index: ");
-    Serial.print(peak_index);
-    Serial.print("\tMax value: ");
-    Serial.print(max_value);
-    Serial.print("\tFrequency: ");
-    Serial.println(frequency);
-//    delay(30);
+    if (DEBUG) {
+        Serial.print("FFT sum: ");
+        Serial.print(sum_fft);
+        Serial.print("\tPeak index: ");
+        Serial.print(peak_index);
+        Serial.print("\tMax value: ");
+        Serial.print(max_value);
+        Serial.print("\tFrequency: ");
+        Serial.print(frequency);
+        Serial.print("\tBrightness: ");
+        Serial.println(brightness);
+    }
 }
 
 

int sum_fft;
float frequency;
float SAMPLE_RATE = 9600.0;
int SKIP_MULT = 16;
int MAX_FFT_BIN = 16383;
int brightness_mult;

float base_freak = SAMPLE_RATE / FFT_N / 2;


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
