              pin13_state=LOW;
            digitalWrite(13, pin13_state);
          }
-      if((abs(sequence[(10+seq_index-4)%10]-20)<=1) &&
-         (abs(sequence[(10+seq_index-3)%10]-18)<=1) &&
-         (abs(sequence[(10+seq_index-2)%10]-20)<=1) &&
-         (abs(sequence[(10+seq_index-1)%10]-18)<=1))
+      if((abs(sequence[(10+seq_index-4)%10]-19)<=1) &&
+         (abs(sequence[(10+seq_index-3)%10]-17)<=1) &&
+         (abs(sequence[(10+seq_index-2)%10]-19)<=1) &&
+         (abs(sequence[(10+seq_index-1)%10]-17)<=1))
          {
            Serial.println("SPELL!");
            if(pin12_state==LOW)

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

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