-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
490 lines (481 loc) · 18.6 KB
/
index.html
File metadata and controls
490 lines (481 loc) · 18.6 KB
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
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Complete Metronome</title>
<meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)" />
<meta name="theme-color" content="#000000" media="(prefers-color-scheme: dark)" />
<link rel="icon" href="assets/icon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="styles.css" />
<link rel="manifest" href="manifest.webmanifest" />
</head>
<body>
<main class="app-shell">
<section class="panel controls">
<div class="theme-toggle">
<button class="theme-toggle-button" id="theme-toggle" type="button" aria-label="Toggle theme">
Theme
</button>
</div>
<div class="tempo-block" id="tempo-block" aria-label="Tempo control">
<div class="tempo-display" id="tempo-display">
<div class="tempo-value" id="tempo-value">120</div>
<input
class="tempo-input"
id="tempo-input"
type="number"
inputmode="numeric"
min="20"
max="300"
aria-label="Tempo value"
/>
</div>
<div class="tempo-wheel-row">
<div class="tempo-stepper">
<button
class="tempo-step"
id="tempo-step-plus"
type="button"
aria-label="Increase tempo"
>
+
</button>
<button
class="tempo-step"
id="tempo-step-minus"
type="button"
aria-label="Decrease tempo"
>
-
</button>
</div>
<div
class="tempo-wheel"
id="tempo-wheel"
role="slider"
aria-label="Tempo"
aria-valuemin="20"
aria-valuemax="300"
aria-valuenow="120"
>
<div class="wheel-track" aria-hidden="true"></div>
<div class="wheel-center">
<div class="tempo-value" id="tempo-wheel-value">120</div>
<div class="wheel-unit">BPM</div>
</div>
</div>
</div>
<p class="tempo-hint tempo-hint--desktop">Drag, scroll or click to adjust tempo.</p>
</div>
<div class="transport transport-main">
<button class="transport-button" id="toggle-play" type="button">Start</button>
</div>
<div class="transport transport-tools">
<div class="tool-group tool-group--trainer">
<button
class="trainer-disclosure"
id="trainer-disclosure"
type="button"
aria-expanded="false"
aria-controls="trainer-panel"
>
Trainer
</button>
<div class="trainer-panel" id="trainer-panel">
<div class="trainer-controls">
<div class="trainer-row">
<div class="wheel-field">
<button
class="wheel-trigger"
id="trainer-bpm-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="trainer-bpm" aria-label="Trainer tempo increment"></select>
<div
class="wheel-picker"
id="trainer-bpm-picker"
role="listbox"
aria-label="Trainer BPM increment"
></div>
</div>
<span class="trainer-separator" aria-hidden="true">BPM</span>
<div class="wheel-field">
<button
class="wheel-trigger"
id="trainer-bars-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="trainer-bars" aria-label="Trainer bars interval"></select>
<div
class="wheel-picker"
id="trainer-bars-picker"
role="listbox"
aria-label="Trainer bars interval"
></div>
</div>
<span class="trainer-separator" aria-hidden="true">bars</span>
</div>
<div class="trainer-row">
<div class="wheel-field">
<button
class="wheel-trigger"
id="trainer-seconds-bpm-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select
id="trainer-seconds-bpm"
aria-label="Trainer tempo increment per seconds"
></select>
<div
class="wheel-picker"
id="trainer-seconds-bpm-picker"
role="listbox"
aria-label="Trainer BPM increment seconds"
></div>
</div>
<span class="trainer-separator" aria-hidden="true">BPM</span>
<div class="wheel-field">
<button
class="wheel-trigger"
id="trainer-seconds-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="trainer-seconds" aria-label="Trainer seconds interval"></select>
<div
class="wheel-picker"
id="trainer-seconds-picker"
role="listbox"
aria-label="Trainer seconds interval"
></div>
</div>
<span class="trainer-separator" aria-hidden="true">secs</span>
</div>
</div>
</div>
</div>
<div class="tool-group tool-group--random-mute">
<button
class="random-mute-disclosure"
id="random-mute-disclosure"
type="button"
aria-expanded="false"
aria-controls="random-mute-panel"
>
Random mute
</button>
<div class="random-mute-panel" id="random-mute-panel">
<div class="random-mute-controls">
<div class="random-mute-row random-mute-row--percent">
<div class="wheel-field">
<button
class="wheel-trigger"
id="random-mute-percent-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="random-mute-percent" aria-label="Random mute percentage"></select>
<div
class="wheel-picker"
id="random-mute-percent-picker"
role="listbox"
aria-label="Random mute percentage"
></div>
</div>
<div class="random-mute-countin" id="random-mute-countin-controls">
<button
class="random-mute-countin-disclosure"
id="random-mute-countin-disclosure"
type="button"
aria-expanded="false"
aria-controls="random-mute-countin-panel"
>
Count-in
</button>
<div class="random-mute-countin-panel" id="random-mute-countin-panel">
<div class="random-mute-countin-inner">
<div class="wheel-field wheel-field--countin" id="random-mute-countin-field">
<button
class="wheel-trigger"
id="random-mute-countin-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select
id="random-mute-countin-bars"
aria-label="Random mute count-in bars"
></select>
<div
class="wheel-picker"
id="random-mute-countin-picker"
role="listbox"
aria-label="Random mute count-in bars"
></div>
</div>
<span class="trainer-separator" aria-hidden="true">bars</span>
</div>
</div>
</div>
</div>
<label
class="random-mute-option random-mute-option--slider"
title="Ramp speed"
>
<span class="ramp-tag" aria-hidden="true">
<svg viewBox="0 0 16 16" aria-hidden="true" focusable="false">
<path d="M2 12h12M3 12l7-7" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</span>
<input
id="random-mute-ramp"
type="range"
min="1"
max="100"
step="1"
value="100"
/>
<span class="random-mute-ramp-value" id="random-mute-ramp-value">16 bars</span>
</label>
</div>
</div>
</div>
</div>
<div class="selectors" id="selectors">
<label class="select-field select-field--subdivision">
<span class="label">Time signature</span>
<div class="time-signature-controls">
<div class="wheel-field">
<button
class="wheel-trigger"
id="numerator-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="time-signature-numerator" aria-label="Time signature numerator"></select>
<div
class="wheel-picker"
id="numerator-picker"
role="listbox"
aria-label="Time signature numerator"
></div>
</div>
<span class="time-signature-separator" aria-hidden="true">/</span>
<div class="wheel-field">
<button
class="wheel-trigger"
id="denominator-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select
id="time-signature-denominator"
aria-label="Time signature denominator"
></select>
<div
class="wheel-picker"
id="denominator-picker"
role="listbox"
aria-label="Time signature denominator"
></div>
</div>
</div>
</label>
<label class="select-field">
<span class="label">Subdivision</span>
<div class="wheel-field">
<button
class="wheel-trigger"
id="subdivision-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="subdivision"></select>
<div
class="wheel-picker"
id="subdivision-picker"
role="listbox"
aria-label="Subdivision"
></div>
</div>
</label>
<label class="select-field select-field--sound">
<span class="label">Sound</span>
<div class="wheel-field">
<button
class="wheel-trigger"
id="sound-profile-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="sound-profile"></select>
<div
class="wheel-picker"
id="sound-profile-picker"
role="listbox"
aria-label="Sound profile"
></div>
</div>
<div class="volume-control">
<input
id="volume"
type="range"
min="0"
max="1000"
step="1"
value="500"
aria-label="Volume"
/>
</div>
</label>
<div class="select-field select-field--accent accent-block" id="accent-block">
<span class="label">Accent</span>
<div class="accent-controls" id="accent-controls">
<button
class="accent-disclosure"
id="accent-disclosure"
type="button"
aria-expanded="false"
aria-controls="accent-panel"
>
Accent
</button>
<div class="accent-panel" id="accent-panel">
<div class="accent-panel-inner">
<span class="accent-label">Every</span>
<div class="wheel-field wheel-field--accent" id="accent-wheel-field">
<button
class="wheel-trigger"
id="accent-bars-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select id="accent-bars" aria-label="Accent every X bars"></select>
<div
class="wheel-picker"
id="accent-bars-picker"
role="listbox"
aria-label="Accent bars"
></div>
</div>
<span class="accent-label">bars</span>
</div>
</div>
<div class="accent-countin" id="accent-countin-controls">
<button
class="accent-countin-disclosure"
id="accent-countin-disclosure"
type="button"
aria-expanded="false"
aria-controls="accent-countin-panel"
>
Count-in
</button>
<div class="accent-countin-panel" id="accent-countin-panel">
<div class="accent-countin-inner">
<span>Count-in</span>
<div class="wheel-field wheel-field--accent-countin" id="accent-countin-field">
<button
class="wheel-trigger"
id="accent-countin-trigger"
type="button"
aria-haspopup="listbox"
aria-expanded="false"
></button>
<select
id="accent-countin-bars"
aria-label="Accent count-in bars"
></select>
<div
class="wheel-picker"
id="accent-countin-picker"
role="listbox"
aria-label="Accent count-in"
></div>
</div>
<span>bars</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="grid-panel">
<div class="grid-header">
<div class="accent-host" id="accent-host"></div>
</div>
<div class="subdivision-grid" id="subdivision-grid" aria-live="polite"></div>
<div class="beat-grid" id="beat-grid" aria-hidden="true"></div>
</div>
</section>
</main>
<footer class="app-footer">
<div class="footer-links">
<button class="footer-link footer-link--button" id="faq-toggle" type="button">FAQ</button>
<span class="footer-dot" aria-hidden="true">·</span>
<a
class="footer-link"
href="https://github.com/mojasp/CompleteMetronome"
target="_blank"
rel="noreferrer"
>
Source
</a>
<span class="footer-dot" aria-hidden="true">·</span>
<a class="footer-link footer-link--install" href="install.html">Install</a>
<span class="footer-dot footer-dot--install" aria-hidden="true">·</span>
<a
class="footer-link"
href="https://github.com/mojasp/CompleteMetronome/blob/master/LICENSE"
target="_blank"
rel="noreferrer"
>
AGPL
</a>
<button class="footer-hide" id="footer-hide" type="button">Hide</button>
</div>
</footer>
<div class="faq-panel" id="faq-panel" aria-hidden="true">
<div class="faq-panel__backdrop" data-faq-dismiss></div>
<div class="faq-panel__content" role="dialog" aria-modal="true" aria-labelledby="faq-title">
<div class="faq-panel__header">
<h2 class="faq-panel__title" id="faq-title">FAQ</h2>
<button class="faq-panel__close" type="button" data-faq-dismiss>Close</button>
</div>
<dl class="faq-panel__list">
<dt>How to accent the first beat of every bar?</dt>
<dd>Click the buttons highlighting each beat in the bar to accent or mute a beat.</dd>
<dt>How to set the wheel to a specific BPM?</dt>
<dd>There are small +/- buttons left to the wheel.</dd>
<dt>How to make the metronome run while the screen is locked, or the app is in the background?</dt>
<dd>
This is only possible with the Android app. As of now, there is no iOS app
because Apple mandates a 100 EUR/year subscription to publish apps on the App Store.
</dd>
</dl>
</div>
</div>
<script type="module" src="app.js"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("./sw.js");
});
}
</script>
</body>
</html>