forked from Brinckstah/VirtualVirtuoso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
single_string.py
40 lines (27 loc) · 1.05 KB
/
single_string.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
import config
import sound
import gesture_recognition
import gestures
from chord_strum import hello_from_the_other_side
def single_tone(left_hand_gesture, result):
if gestures.is_picking(result):
if not hello_from_the_other_side(result, "Index"):
return
y_coordinate = gesture_recognition.find_y_coordinate(result, "Index")
if left_hand_gesture == 'Victory':
sound.channel1.play(sound.C_2)
elif left_hand_gesture == 'ILoveYou':
sound.channel1.play(sound.D_3)
elif gestures.is_pinky_up(result):
sound.channel1.play(sound.C_3)
elif left_hand_gesture == 'Closed_Fist':
sound.channel1.play(sound.F_3)
elif left_hand_gesture == 'Pointing_Up':
sound.channel1.play(sound.C_4)
elif left_hand_gesture == 'Open_Palm':
sound.channel1.play(sound.D_4)
elif gestures.is_gesture_L(result):
sound.channel1.play(sound.E_5)
else:
return
config.last_played_y_coordinate = y_coordinate