-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmcc_icons_music.py
111 lines (93 loc) · 2.43 KB
/
mcc_icons_music.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
from pybricks.hubs import PrimeHub
from pybricks.tools import Matrix, wait
from mcc_primebot_classes import *
from pybricks.parameters import Icon
# Music
def star_wars_func(bot:PrimeRobot):
hub = bot.hub_base
x0 = ["D4/12", "D4/12", "D4/12"]
x1 = ["G4/2", "D5/2"]
x2 = ["C5/12", "B4/12", "A4/12", "G5/2", "D5/4"]
x3 = ["C5/12", "B4/12", "C5/12", "A4/2", "D4/6", "D4/12"]
x4 = ["E4/4.", "E4/8", "C5/8", "B4/8", "A4/8", "G4/8"]
x5 = ["G4/12", "A4/12", "B4/12", "A4/6", "E4/12", "F#4/4", "D4/6", "D4/12"]
x6 = ["D5/4", "A4/2", "D4/6", "D4/12"]
x7 = ["G4/12", "A4/12", "B4/12", "A4/6", "E4/12", "F#4/4", "D5/6", "D5/12"]
x8 = ["G5/6", "F5/12", "Eb5/6", "D5/12", "C5/6", "Bb4/12", "A4/6", "G4/12"]
x9 = ["D5/2."]
x10 = ["G5/12", "F5/12", "Eb5/12", "Bb5/2", "A5/4", "G5/8", "R/8", "G4/12", "G4/12", "G4/12", "G4/4"]
test = x0 + x1 + x2 + x2 + x3 + x1 + x2 + x2 + x3 + x4 + x5 + x4 + x6 + x4 + x7 + x8 + x9 + x0 + x1 + x2 + x2 + x3 + x1 + x2 + x10
hub.speaker.play_notes(test)
# Custom Icons
REBEL = Matrix(
[
[0, 0, 100, 0, 0],
[100, 0, 100, 0, 100],
[100, 0, 100, 0, 100],
[100, 100, 100, 100, 100],
[0, 100, 100, 100, 0],
]
)
XWING = Matrix(
[
[0, 0, 100, 0, 0],
[100, 0, 100, 0, 100],
[100, 0, 100, 0, 100],
[100, 100, 100, 100, 100],
[0, 100, 0, 100, 0],
]
)
SMILE = Matrix(
[
[0, 100, 0, 100, 0],
[0, 100, 0, 100, 0],
[0, 0, 0, 0, 0],
[100, 0, 0, 0, 100],
[0, 100, 100, 100, 0],
]
)
CONCENTRATE = Matrix(
[
[0, 100, 0, 100, 0],
[0, 100, 0, 100, 0],
[0, 0, 0, 0, 0],
[0, 0, 0, 100, 100],
[1000, 100, 100, 100, 100],
]
)
WINK = Matrix(
[
[0, 100, 0, 0, 0],
[0, 100, 0, 100, 100],
[0, 0, 0, 0, 0],
[100, 0, 0, 0, 100],
[0, 100, 100, 100, 0],
]
)
WORRIED = Matrix(
[
[0, 0, 0, 0, 0],
[100, 100, 0, 100, 100],
[0, 0, 0, 0, 0],
[0, 0, 0, 0, 0],
[100, 100, 100, 100, 100],
]
)
RIGHT_SMILE = Matrix(
[
[0, 0, 100, 0, 100],
[0, 0, 100, 0, 100],
[0, 0, 0, 0, 0],
[100, 0, 0, 0, 100],
[0, 100, 100, 100, 0],
]
)
LEFT_SMILE = Matrix(
[
[100, 0, 100, 0, 0],
[100, 0, 100, 0, 0],
[0, 0, 0, 0, 0],
[100, 0, 0, 0, 100],
[0, 100, 100, 100, 0],
]
)