-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpythonFolderTest(3).py
More file actions
34 lines (20 loc) · 837 Bytes
/
pythonFolderTest(3).py
File metadata and controls
34 lines (20 loc) · 837 Bytes
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
from ble_emmaPORTS import *
from ble_MIDI import *
test()
while not done():
if Force_Sensor_Activated(port.A):
play_note("Force S", "Low Tom", .25, "ffff", port.A)
elif Force_Sensor_Activated(port.C):
play_note("Force S", "High Tom", .25, "ffff", port.C)
elif Force_Sensor_Activated(port.E):
play_note("Force S", "Rim Shot", .25, "ffff", port.E)
elif Color_Sensor_Activated(port.B):
play_note("Color S", "Crash Cymbal", 1, "p", port.B)
elif Color_Sensor_Activated(port.D):
play_note("Color S", "Closed Hi-Hat", .25, "ffff", port.D)
elif Color_Sensor_Activated(port.F):
play_note("Color S", "Hand Clap", .25,"pp", port.F)
else:
print("Nothing")
time.sleep(.25)
#disconnect()