Play Melody

There is no need for two speakers, just one will do but connect the output to an amplifier.

The code is complex and might be found on line but I cover this in my book Arduino Music and Audio Projects | SpringerLink

Unfortunately due to my deal with the publishers I can't post it here.