-
Notifications
You must be signed in to change notification settings - Fork 14
/
hs-hauntedhouse.py
44 lines (32 loc) · 1.12 KB
/
hs-hauntedhouse.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/python
# HeadSpace HRTF Library
# Haunted House Demo
# Author: Christopher Rabl
# Modified: April 24, 2012
from pyo import *
from headspace import *
# Create a PYO server and start it
s = Server().boot()
s.start()
# Create a new UI object
ui = HeadSpaceUI("Haunted House")
backgroundWav = SfPlayer("testfiles/horrorbg.wav", loop=True)
background = HeadSpace(backgroundWav, 0, 0).out()
ui.add("Background", background)
footstepsWav = SfPlayer("testfiles/footsteps.wav", loop=True)
footsteps = HeadSpace(footstepsWav, 180, -40).out()
ui.add("Footsteps", footsteps)
owlsWav = SfPlayer("testfiles/owls.wav", loop=True)
owls = HeadSpace(owlsWav, -20, 50).out()
ui.add("Owls", owls)
skitterWav = SfPlayer("testfiles/skitter.wav", loop=True)
skitter = HeadSpace(skitterWav, 0, 90).out()
ui.add("Mice", skitter)
screamWav = SfPlayer("testfiles/scream.wav", loop=True)
scream = HeadSpace(screamWav, 50, -30).out()
ui.add("Scream", scream)
# Don't add this to the UI... we want to scare the user ;-)
laughWav = SfPlayer("testfiles/laugh.wav", loop=True)
laugh = HeadSpace(laughWav, -140, -20).out()
# Show the UI to the user
ui.show()