Error: no such theme PatternSkinTheme
You are here: Foswiki>Main Web>CSAndRobotsExco>ExcoLab3>SongExample (2013-02-26, KateIngersoll)EditAttach
from myro import *

low_b = 493.9
low_c = 554.4
low_d = 587.3
low_e = 659.3
low_f = 740
g = 784
a = 880
b = 987.8
c = 1046.5
d = 1174.7
e = 1318.5
high_g = 1568
high_a = 1760
high_b = 1975.5

half = 1
quarter = (half/2.0)
eighth = (quarter/2.0)
three_sixteenth = (eighth/2.0)*3
sixteenth = (eighth/2.0)


def verse_partA():
wait(eighth)
beep(eighth, b)
beep(eighth, b)
beep(eighth, b)
beep(eighth, b)
beep(eighth, b)
beep(eighth, a)
beep(eighth, b)
wait(eighth)

def verse_partB():
wait(eighth)
beep(eighth, b)
beep(eighth, b)
beep(eighth, b)
beep(eighth, b)
beep(eighth, b)
beep(eighth, a)
beep(eighth, b)

def verse_partC():
wait(eighth)
beep(eighth, a)
beep(eighth, a)
beep(eighth, g)
beep(three_sixteenth, g)
beep(three_sixteenth, d)
beep(eighth, b)

def verse_intro():
verse_partA()
verse_partA()
verse_partB()
verse_partC()

def verse():
verse_intro()
verse_intro()

def bridge_partA():
wait(quarter)
beep(quarter, d)
beep(eighth, d)
beep(sixteenth, b)
beep(eighth, a)
beep(three_sixteenth, g)

def bridge_partB():
beep(quarter, d)
beep(quarter, d)
beep(eighth, d)
beep(sixteenth, b)
beep(eighth, a)
beep(three_sixteenth, g)

def bridge_partC():
beep(eighth, high_g)
beep(eighth, high_g)
beep(eighth, high_g)
beep(eighth, high_g)
beep(eighth, high_g)
beep(eighth, high_g)
beep(eighth, high_a)
beep(eighth, high_b)

def bridge():
bridge_partA()
bridge_partB()
bridge_partB()
bridge_partC()

def chorus_partA():
beep(quarter, g)
beep(sixteenth, low_b)
beep(eighth, low_d)
beep(eighth, g)
beep(three_sixteenth, low_d)

def chorus_partB():
wait(quarter)
wait(eighth)
beep(eighth, low_b)
beep(sixteenth, low_b)
beep(eighth, low_d)
beep(three_sixteenth, b)
beep(eighth, g)

def chorus_partC():
wait(eighth)
beep(eighth, g)
beep(eighth, b)
beep(eighth, c)
beep(eighth, b)
beep(eighth, g)

def chorus_partD():
wait(quarter)
wait(eighth)
beep(eighth, g)
beep(eighth, b)
beep(eighth, a)
beep(eighth, a)
beep(quarter, g)

def chorus_partE():
beep(eighth, low_b)
beep(eighth, low_d)
beep(three_sixteenth, b)
beep(eighth, g)

def chorus():
wait(quarter)
chorus_partA()
chorus_partB()

wait(quarter)
chorus_partC()
chorus_partD()
chorus_partA()

wait(half)
chorus_partE()
chorus_partC()
chorus_partD()

def cmm():
verse()
bridge()
chorus()
Topic revision: r1 - 2013-02-26, KateIngersoll
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback