Output selection with DIP switch

Hey folks! First time posting so apologies if this is in the wrong place!

I am currently building a system that outputs a predefined MIDI note on receiving a HIGH on a pin, fairly simple and all works fine.

Now, this is great and all, but my aim is to make the output note selectable with a 7-way DIP switch. My question is whether or not it's possible to have a state for every one of the 128 possible combinations without having a separate IF statement for each one? It should be doable, as I want the output note to correspond directly to the DIP value ie. DIP reads 36, MIDI note 36 output.

Also, I have plenty spare pins so each switch can have its own, I'm not bothered about using Shift Registers.

Thanks in advance of any and all help!

Quite possible.

Read the state of 8 pins. Set the appropriate bit of a byte variable to the state of the corresponding pin. You now have a number in the byte to do anything you want with, such as using it as the index to an array.

Neater, use a shift register to read 8 inputs then shiftIn() to a byte.