paahaa:
When pressing a button, it should work like this://this goes in the loop
player.play(supermario.melody, supermario.tempo);
Be warned that the 'player' object has no way of knowing how many notes are in the melody. I expect you will find that you have to get that value from somewhere and pass it to the player. The Songs object will have to store the number of notes because it is the only place that the value is easily determined.