-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
220 lines (187 loc) · 17.4 KB
/
index.html
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Groove Craft - Craft Amazing Drum Loops</title>
<link rel="icon" type="image/png" href="/favicon.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu+Condensed&display=swap" rel="stylesheet">
<script src="js/playerControls.js"></script>
<script src="js/bpm.js"></script>
<script src="js/utils.js"></script>
<script src="js/index.js"></script>
<link rel="stylesheet" href="styles/index.css">
</head>
<body>
<header id="title">
<img src="favicon.png" alt="">
<strong>Groove Craft</strong>
</header>
<div id="loop-pads">
Beat
<div id="beat">
<button name="first" id="beat-T1.1" class="deactivated"></button>
<button id="beat-T1.2" class="deactivated"></button>
<button id="beat-T1.3" class="deactivated"></button>
<button id="beat-T1.4" class="deactivated"></button>
<button name="first" id="beat-T2.1" class="deactivated"></button>
<button id="beat-T2.2" class="deactivated"></button>
<button id="beat-T2.3" class="deactivated"></button>
<button id="beat-T2.4" class="deactivated"></button>
<button name="first" id="beat-T3.1" class="deactivated"></button>
<button id="beat-T3.2" class="deactivated"></button>
<button id="beat-T3.3" class="deactivated"></button>
<button id="beat-T3.4" class="deactivated"></button>
<button name="first" id="beat-T4.1" class="deactivated"></button>
<button id="beat-T4.2" class="deactivated"></button>
<button id="beat-T4.3" class="deactivated"></button>
<button id="beat-T4.4" class="deactivated"></button>
</div>
Kick
<div id="kick">
<button name="first" id="kick-T1.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T1.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T1.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T1.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="kick-T2.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T2.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T2.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T2.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="kick-T3.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T3.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T3.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T3.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="kick-T4.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T4.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T4.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="kick-T4.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
</div>
Snare
<div id="snare">
<button name="first" id="snare-T1.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T1.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T1.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T1.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="snare-T2.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T2.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T2.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T2.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="snare-T3.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T3.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T3.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T3.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="snare-T4.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T4.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T4.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="snare-T4.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
</div>
Clap
<div id="clap">
<button name="first" id="clap-T1.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T1.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T1.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T1.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="clap-T2.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T2.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T2.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T2.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="clap-T3.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T3.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T3.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T3.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="clap-T4.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T4.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T4.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="clap-T4.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
</div>
Closed Hi-Hat
<div id="closedHihat">
<button name="first" id="closedHihat-T1.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T1.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T1.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T1.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="closedHihat-T2.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T2.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T2.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T2.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="closedHihat-T3.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T3.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T3.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T3.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="closedHihat-T4.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T4.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T4.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="closedHihat-T4.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
</div>
Open Hi-Hat
<div id="openHihat">
<button name="first" id="openHihat-T1.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T1.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T1.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T1.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="openHihat-T2.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T2.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T2.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T2.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="openHihat-T3.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T3.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T3.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T3.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="openHihat-T4.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T4.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T4.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="openHihat-T4.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
</div>
Crash
<div id="crash">
<button name="first" id="crash-T1.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T1.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T1.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T1.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="crash-T2.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T2.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T2.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T2.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="crash-T3.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T3.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T3.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T3.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button name="first" id="crash-T4.1" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T4.2" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T4.3" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
<button id="crash-T4.4" class="deactivated" onclick="scheduleElement(this)"><div class="statusOff"></div></button>
</div>
</div>
<div id="util-buttons">
<button onclick="play()">Play</button>
<button onclick="pause()">Pause</button>
<button onclick="stop()">Stop</button>
<button onclick="decreaseBpm(5)">- 5</button>
<span>BPM: </span> <input id="actualBpm" value=60 type="number" min="1" max="400" onchange="updateBpmFromTextElement(this)" onkeypress="this.onchange();" onpaste="this.onchange();" oninput="this.onchange();" />
<button onclick="increaseBpm(5)">+ 5</button>
</div>
<div id="project-info">
<p>Esta aplicação foi desenvolvida utilizando HTML, Javascript e CSS, e tem como objetivo ser um simples playground de acesso rápido para a criação de loops de bateria.</p>
<a href="https://github.com/henriqueritter/groove-craft" alt="Link to Github Page">O Código deste projeto está disponível sob a licença MIT e pode ser consultado aqui.</a>
</div>
<footer>
<div id="contact">
<a href="https://github.com/henriqueritter" alt="Link to my Github Repository">
<svg height="32" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default">
<path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>
</svg>
</a>
<a href="https://www.linkedin.com/in/henrique-ritter/" alt="Link to my Linkedin page">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" data-supported-dps="24x24" fill="currentColor" class="mercado-match" width="24" height="24" focusable="false">
<path d="M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z"></path>
</svg>
</a>
</div>
<p>© 2024
<a href="https://www.henriqueritter.com" alt="Link para meu site pessoal">Henrique Ritter.</a> Todos os direitos reservados.
</p>
</footer>
</body>
</html>