-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (79 loc) · 3.54 KB
/
index.html
File metadata and controls
86 lines (79 loc) · 3.54 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pattern Metronome</title>
<link rel="stylesheet" href="index.css">
</head>
<body>
<div class="container">
<div class="header">
<h1>Metronome</h1>
<button class="theme-toggle" aria-label="Toggle theme">
<!-- Sun icon (shown in dark mode) -->
<svg class="sun-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<circle cx="12" cy="12" r="4"></circle>
<path d="M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M4.93 19.07l1.41-1.41m11.32-11.32l1.41-1.41"></path>
</svg>
<!-- Moon icon (shown in light mode) -->
<svg class="moon-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" style="display: none;">
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path>
</svg>
</button>
</div>
<div class="header">
<select id="soundPacks" class="pattern-presets">
<option selected disabled hidden value="">Sound</option>
<option value="woodblock">Woodblock</option>
<option value="electronic">Electronic</option>
<option value="dry">Dry</option>
<option value="cowbell">Cowbell</option>
<option value="dropplets">Dropplets</option>
<option value="beep">Beep</option>
<option value="xylo">Xylo</option>
<option value="deep">Deep</option>
</select>
<select id="patternPresets" class="pattern-presets">
<option selected disabled hidden value="">Presets</option>
<option value="standard">Standard 4/4</option>
<option value="waltz">Waltz 3/4</option>
<option value="clave">Clave</option>
<option value="clave32">Clave 3-2</option>
<option value="clave23">Clave 2-3</option>
<option value="practice">Practice</option>
<option value="bossa">Bossa Nova</option>
</select>
</div>
<div class="control-group control-group-sliders">
<div class="slider-container">
<label for="beats">Beats:</label>
<input type="range" id="beats" class="top-slider-input input" min="1" max="16" value="4" step="1">
<span id="beats-value">4</span>
</div>
<div class="slider-container">
<label for="subdivisions">Subdivisions:</label>
<input type="range" id="subdivisions" class="top-slider-input input" min="1" max="8" value="3" step="1">
<span id="subdivisions-value">3</span>
</div>
</div>
<div class="control-group control-group-patterns">
<div class="beat-grid" id="beatGrid"></div>
</div>
<div class="tempo-container">
<div class="tempo-button-row">
<button id="minusFiveBpm" class="tempo-button">-5</button>
<button id="minusOneBpm" class="tempo-button">-1</button>
<span id="bpm-value" class="bpm-value">120</span>
<button id="plusOneBpm" class="tempo-button">+1</button>
<button id="plusFiveBpm" class="tempo-button">+5</button>
</div>
<div class="tempo-slider-container">
<input type="range" id="bpm" class="tempo-slider-input input" min="20" max="320" value="120" step="1">
</div>
</div>
<button id="playButton" class="play-button">Play</button>
</div>
<script src="metronome.js"></script>
</body>
</html>