Song Playlist

From IPRE Wiki
Jump to: navigation, search
from myro import *
robot = Scribbler()
def shaveHaircut():
    shave = makeSong("g 3/4; d 1/4; d 1/4; e 1/2; d 1/2; rest 1/2; f# 1/2; g 1/2;")
    robot.playSong(shave)

def yankeeDoodle():
    yankeedoodle = makeSong("c 1/2; c 1/2; d 1/2; e 1/2; c 1/2; e 1/2; d 1/2; g4 1/2; c 1/2; c 1/2; d 1/2; e 1/2; c 1; b4 1;")
    robot.playSong(yankeedoodle)

def silentTone():
    silent = makeSong("rest 1; rest 1;")
    robot.playSong(silent)

def beethovensFifth():
    beethoven = makeSong("g 1/4; g 1/4; g 1/4; e 1; rest 1/2; f 1/4; f 1/4; f 1/4; d 1;")
    robot.playSong(beethoven)

def camptownRaces():
    camptownraces = makeSong("g 1/4; g 1/4; e 1/4; g 1/4; a 1/4; g 1/4; e 1/2; e 1/4; d 3/4; rest 1/8; e 1/4; d 3/4;")
    robot.playSong(camptownraces)

def tetrisTheme():
    tetris = makeSong("e 1/2; b4 1/4; c 1/4; d 1/2; d 1/4; c 1/4; a4 1/2; a4 1/4; c 1/4; e 1/2; d 1/4; c 1/4; b4 1/2; b4 1/4; c 1/4; d 1/2; e 1/2; c 1/2; a4 1/2; a4 1/2;")
    robot.playSong(tetris)

def main():
    shaveHaircut()
    wait(1)
    yankeeDoodle()
    wait(1)
    beethovensFifth()
    wait(1)
    camptownRaces()
    wait(1)
    tetrisTheme()
main()