speaker and a switch problem

I would like to make a song with a grove speaker. When the switch is “high” the speaker makes the song and when you put “Low” the speaker don’t make sound.
I have a program but when I make the switch in the position “Low” he makes a little song. I don’t know how to fix it.
I put the program in attachment.
Please help me.

switch_buzzer_sav.ino (937 Bytes)

How are the switches wired? You don’t seem to be adding the internal pull up resistor, have you got an external resistor?

What do you mean by “he makes a little song”?