Project 7: Keyboard Instrument, Arduino Making Static on HIghest key

For my keyboard, it makes a static on the highest key. Can someone please help me? My other 3 keys are working fine, but my highest key is just static. Here is my code. My notes values are for a C Arpeggio Scale.

int notes[] = {262, 330, 392, 531};
void setup() {
  Serial.begin(9600);
}

void loop() {
  int keyVal = analogRead(A0);
  if(keyVal == 1023){
    tone(8, notes[0]);
  }
  else if(keyVal >= 990 && keyVal <= 1010){
    tone(8, notes[1]);
  }
  else if(keyVal >= 505 && keyVal <= 515){
    tone(8, notes[2]);
  }
  else if(keyVal >= 5 && keyVal <= 10){
    tone(8, notes[3]);
  }
  else{
    noTone(8);
  }
}

Also, my wiring is here:


Please help!

It would be more useful if you used your Serial.print() to show the value being used for tone in each of your cases. Remember the tone is a square wave and when quite high in frequency may sound like static.

Thanks! I checked the values and fixed my code.