Buttons and melodies

Hi so I'm trying to program my arduino uno to play a melody after a certain pattern of buttons are pressed. I'm using digital Pins or if another way is better that'll be great too!

Example:

I press buttons 1,2,8,5,4 = melody 1

I press buttons 2,6,7,5,1 = melody 2

And etc. for four melodies

I was wondering on how I do start that?

Thanks so much for the help!

sounds like a digital combination lock.

but instead of activating a lock, code it to play your melodies.

searching the forum will get you several examples.

here is one I ran across recently: Digital code lock using arduino

Hope that helps :)