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

    {
      sequence[seq_index]=current_note;
      seq_index=(seq_index+1)%10;
      if((abs(sequence[(10+seq_index-4)%10]-24)<=1) &&
         (abs(sequence[(10+seq_index-3)%10]-27)<=1) &&
         (abs(sequence[(10+seq_index-2)%10]-30)<=1) &&
         (abs(sequence[(10+seq_index-1)%10]-24)<=1))
         {
           Serial.println("SPELL!");
           if(pin13_state==LOW)

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