4 button tone keyboard

helllo
im having trouble with my code.
I have 4 pushbuttons wired on digital pins 13,12,11,10
and a speaker on pin 7

i want each button to play a different tone when pressed

here is my code,
it compiles
but i get no sound

#include <Tone.h>

int switch1 = 13; //The four button input pins
int switch2 = 12;
int switch3 = 11;
int switch4 = 10;
int speakerPin = 7;
int input1 = LOW;
int input2 = LOW;
int input3 = LOW;
int input4 = LOW;



void setup() {
  
  Serial.begin(9600);
  
  pinMode(switch1, INPUT);
  pinMode(switch2, INPUT);
  pinMode(switch3, INPUT);
  pinMode(switch4, INPUT);
  pinMode(speakerPin, OUTPUT);
  
  
  }
  
  
  void input() {
    
    input1 = digitalRead(switch1);
    input2 = digitalRead(switch2);
    input3 = digitalRead(switch3);
    input4 = digitalRead(switch4);
    
    if (input1 == HIGH){
      playTone(1915, 200);
      delay(200);
    }
    
       if (input2 == HIGH){
      playTone(1519, 200);
      delay(200);
    }
    
       if (input3 == HIGH){
      playTone(1275, 200);
      delay(200);
    }
    
       if (input4 == HIGH){
      playTone(956, 200);
      delay(200);
    }
  }
    
    void playTone(int tone, int duration) {

    digitalWrite(speakerPin, HIGH);
    delayMicroseconds(tone);
    digitalWrite(speakerPin, HIGH);
    delayMicroseconds(tone);
  }


void loop() { //Unused void loop(), though for some reason it doesn't compile without this /shrug
}

When the sketch is compiled, a main function is added that calls setup and then calls loop in an infinite loop.

Your code needs to be in setup, in loop, or in a function called from setup or loop. It is not.

Also, I think that in the playTone function, you'll get better results if you turn the speaker on and off, not on and on.

as of now here is my current code

id like each switch to play a different code
i still get no sound

#include <Tone.h>

int switch1 = 13;
int switch2 = 12;
int switch3 = 11;
int switch4 = 10;

int speakerpin = 7;




void setup() {
  pinMode(switch1, INPUT);
  pinMode(switch2, INPUT);
  pinMode(switch3, INPUT);
  pinMode(switch4, INPUT);
  
  pinMode(speakerpin, OUTPUT);
  
}


void loop() {
  switch1 = analogRead(switch1);
   switch2 = analogRead(switch2);
    switch3 = analogRead(switch3);
     switch4 = analogRead(switch4);
  
   if (switch1 == HIGH){
      playTone(1915, 200);
      delay(200);
    }
    
       if (switch2 == HIGH){
      playTone(1519, 200);
      delay(200);
    }
    
       if (switch3 == HIGH){
      playTone(1275, 200);
      delay(200);
    }
    
       if (switch4 == HIGH){
      playTone(956, 200);
      delay(200);
}
}
    
  
void playTone(int tone, int duration) {

    digitalWrite(speakerpin, HIGH);
    delay(200);
    digitalWrite(speakerpin, LOW);
    delay(200);
  }

The analogRead function is used to read analog pins. There are no analog pins numbered 10, 11, 12, or 13.

Those are digital pin numbers, so you should be using digitalRead to read them.

What is the purpose of passing arguments to the playTone function when you do not use them?