Skip to content

Instantly share code, notes, and snippets.

@sweinberg
Created January 23, 2014 01:37
Show Gist options
  • Save sweinberg/8571186 to your computer and use it in GitHub Desktop.
Save sweinberg/8571186 to your computer and use it in GitHub Desktop.
# Play a short melody
import sound
import time
notes = 'E3', 'E3', 'F3', 'G3', 'G3', 'F3', 'E3', 'D3', 'C3', 'C3', 'D3', 'E3', 'E3', 'D3', 'D3', 'E3', 'E3', 'F3', 'G3', 'G3', 'F3', 'E3', 'D3', 'C3', 'C3', 'D3', 'E3', 'D3', 'C3', 'C3'
for note in notes:
sound.play_effect('Piano_' + note)
time.sleep(0.5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment