going from 1 switch to many

Hello,

i wrote a small program with whom I can controll a sound using a switch an a LED,
now I wanna use this programm to controll 2 (for now) LED/switches.
First I thought I could use a switch/case structure, but realized that isnt it.

this is my main loop, currentSwitchState1 is button1, the other will be called currentSwitchState2 and so on,
how can i make the valid for 2-8 switches?

void loop() {


  currentSwitchState1 = digitalRead(switchPin1);
  currentTimeState = digitalRead(timePin1);
      if (currentTimeState == 1) {
        currentTime = currentTime + 1000;
      }


  if (currentSwitchState1 == 1) {

      play(currentTime);
      aktiv = 1;
      buttonCounter++;
  } else {
      playoff(lastNotePlayed);
      buttonCounter = 0;
    } 
 
}

cheers

Sorry your explanation of what you are trying to do is not very understandable. You haven't posted all your code so it is difficult to read.
How about posting the code that does what you want for one and have another go at trying to explain what you are trying to do.

I have an example of what you may need here:

Look in the middle for example01. A series of if statements will switch the program. You can put your speakers and leds inside of the if statements.

Hello,

thnx for the reply.
I did solve this with multiple if like in the example.

greetings