     sei();
     note=maxi;
     
-    // Evaluate a window around the detected note
+    /*// Evaluate a window around the detected note
     float notef = 0;
     int accum=0;
     int win = 10;

        accum += v;
      }
    }
    //note = notef/accum;
}



 pinMode(12, OUTPUT);
}

int sound_buffer[FHT_N];

void detect_note(float& note, float& volume)
{
    cli();
    volume=0;
    for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples
      sound_buffer[i] = analogRead(A0);
    }

    for (int i = 0 ; i < FHT_N ; i++) { // save 256 samples
      int k = 512-sound_buffer[i];
      volume += abs(k);
      k -= 0x0200;
      k <<= 6;
      fht_input[i] = k ; // put real data into bins
    }
    
    volume = volume/FHT_N;
    fht_window(); // window the data for better frequency response
    fht_reorder(); // reorder the data before doing the fht
