Pin high Arduino play track.

Hi can one play a pre-recorded sound track like an mp3 file that’s on a SD card by changing one pin high to low.

If digital pin 2 goes high the Arduino accesses the SD card and plays track 2 once. If digital pin 2 goes low the Arduino accesses the SD card and plays track 3 once.

So if a door is opened a switch will send digital pin 2 high, Arduino accesses track 2 and plays, (Door open) then stops and waits. When the door is closed a switch will send digital pin 2 low telling the Arduino to play track 3, (Door closed) then stops and waits.

I do understand I will need some kind of mp3 shield to play the audio file but how to make the Arduino play a pacific file im lost. So im asking is it possible. If so can anyone point me in the right direction?

Thanks

I do understand I will need some kind of mp3 shield to play the audio file but how to make the Arduino play a pacific file im lost.

Once you get the mp3 shield, with library, I think all your questions will be answered.