-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
330 lines (307 loc) · 11.4 KB
/
Copy pathindex.html
File metadata and controls
330 lines (307 loc) · 11.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- Primary Meta Tags -->
<title>ÆTHERWAVES</title>
<meta name="title" content="ÆTHERWAVES" />
<meta
name="description"
content="Make eerie, ethereal music with your bare hands through this no-touch instrument. Perfect for aspiring electronic musicians, sci-fi enthusiasts, and anyone who's ever wanted to look like they're casting spells while making music!"
/>
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content="https://aether.layogtima.com/" />
<meta property="og:title" content="ÆTHERWAVES" />
<meta
property="og:description"
content="Make eerie, ethereal music with your bare hands through this no-touch instrument. Perfect for aspiring electronic musicians, sci-fi enthusiasts, and anyone who's ever wanted to look like they're casting spells while making music!"
/>
<meta
property="og:image"
content="https://aether.layogtima.com/screenshot.png?burssst"
/>
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://aether.layogtima.com/" />
<meta property="twitter:title" content="ÆTHERWAVES" />
<meta
property="twitter:description"
content="Make eerie, ethereal music with your bare hands through this no-touch instrument. Perfect for aspiring electronic musicians, sci-fi enthusiasts, and anyone who's ever wanted to look like they're casting spells while making music!"
/>
<meta
property="twitter:image"
content="https://aether.layogtima.com/screenshot.png?burssst"
/>
<!-- Meta Tags Generated with https://metatags.io -->
<meta
name="author"
content="Amartha [Absurd Industries' CAI], Claude 3.7 Sonnet and Amit [amit@absurd.industries]"
/>
<link
rel="icon"
type="image/png"
href="https://aether.layogtima.com/favicon/favicon-96x96.png"
sizes="96x96"
/>
<link
rel="icon"
type="image/svg+xml"
href="https://aether.layogtima.com/favicon/favicon.svg"
/>
<link
rel="shortcut icon"
href="https://aether.layogtima.com/favicon/favicon.ico"
/>
<link
rel="apple-touch-icon"
sizes="180x180"
href="https://aether.layogtima.com/favicon/apple-touch-icon.png"
/>
<meta name="apple-mobile-web-app-title" content="ÆTHER" />
<link
rel="manifest"
href="https://aether.layogtima.com/favicon/site.webmanifest"
/>
<script src="https://cdn.tailwindcss.com"></script>
<!-- MediaPipe dependencies -->
<script
src="https://cdn.jsdelivr.net/npm/@mediapipe/camera_utils/camera_utils.js"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/@mediapipe/control_utils/control_utils.js"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/@mediapipe/drawing_utils/drawing_utils.js"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/@mediapipe/hands/hands.js"
crossorigin="anonymous"
></script>
<!-- Web Audio API helper library -->
<script
src="https://cdnjs.cloudflare.com/ajax/libs/tone/15.1.5/Tone.min.js"
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<link rel="stylesheet" href="styles.css" />
</head>
<body class="h-screen w-screen overflow-hidden bg-black text-white">
<!-- Loading Screen -->
<div id="loadingScreen" class="loading-screen">
<div class="loading-spinner"></div>
<h2 class="text-2xl mb-4 tracking-widest" id="loadingMessage">
INITIALIZING AUDIO-VISUAL THEREMIN
</h2>
<p class="text-sm opacity-50" id="loadingSubMessage">
Loading MediaPipe...
</p>
</div>
<!-- Main Container -->
<div class="relative h-full w-full">
<!-- Webcam Video Feed -->
<video id="webcam" class="webcam-feed" autoplay playsinline></video>
<!-- Output Canvas for MediaPipe -->
<canvas id="output" class="output-canvas"></canvas>
<div id="coordinates" class="coordinates-container"></div>
<!-- Grid Overlay -->
<div class="grid-overlay">
<svg
width="100%"
height="100%"
viewBox="0 0 100 100"
preserveAspectRatio="none"
id="gridSvg"
>
<!-- Grid lines will be added via JavaScript -->
</svg>
</div>
<!-- Control Zones -->
<div id="pitchZone" class="control-zone pitch-zone hidden"></div>
<div id="volumeZone" class="control-zone volume-zone hidden"></div>
<!-- Title -->
<h1
class="absolute top-8 w-full text-center text-5xl tracking-widest z-10 opacity-80"
>
ÆTHERWAVES
</h1>
<!-- Status Panel -->
<div class="absolute left-8 bottom-8 z-10 flex flex-col items-start">
<div
class="text-6xl font-light tracking-widest mb-2 hidden"
id="noteDisplay"
>
-
</div>
<div class="flex items-center space-x-2 opacity-70 hidden">
<div class="status-indicator"></div>
<div class="text-sm tracking-wider">
FREQUENCY: <span id="frequencyDisplay">0.00</span> HZ
</div>
</div>
<div class="text-sm tracking-wider opacity-70 hidden">
VOLUME: <span id="volumeDisplay">0</span>%
</div>
<div class="waveform-container mt-6 opacity-70 w-64">
<canvas id="waveform" class="w-full h-full"></canvas>
</div>
</div>
<!-- Control Panel -->
<div class="absolute right-8 top-8 z-10 flex flex-col items-end">
<button
id="startButton"
class="w-48 py-3 mb-6 text-center tracking-widest hover:bg-white hover:text-black transition-all text-sm border border-white/30"
>
INITIATE THEREMIN
</button>
<div class="mb-6 w-48">
<div class="text-xs tracking-wider opacity-70 mb-2">WAVEFORM</div>
<div class="select-wrapper">
<select id="waveformSelect" class="text-sm">
<option value="sine">SINE WAVE</option>
<option value="triangle" selected>TRIANGLE WAVE</option>
<option value="sawtooth">SAWTOOTH WAVE</option>
<option value="square">SQUARE WAVE</option>
</select>
</div>
</div>
<div class="mb-6 w-48">
<div class="text-xs tracking-wider opacity-70 mb-2">REVERB</div>
<input
type="range"
id="reverbRange"
min="0"
max="1"
step="0.01"
value="0.7"
/>
</div>
<div class="mb-6 w-48">
<div class="text-xs tracking-wider opacity-70 mb-2">FILTER</div>
<input
type="range"
id="filterRange"
min="20"
max="5000"
step="1"
value="3000"
/>
</div>
<div class="mb-6 w-48">
<div class="text-xs tracking-wider opacity-70 mb-2">
VISUALIZATION
</div>
<div class="flex flex-col space-y-2">
<label class="flex items-center">
<input type="checkbox" id="showLandmarks" checked class="mr-2" />
<span class="text-sm">Show Landmarks</span>
</label>
<label class="flex items-center">
<input type="checkbox" id="showConnectors" checked class="mr-2" />
<span class="text-sm">Show Connectors</span>
</label>
<label class="flex items-center">
<input type="checkbox" id="showCoordinates" class="mr-2" />
<span class="text-sm">Show Coordinates</span>
</label>
<label class="flex items-center">
<input type="checkbox" id="showAura" class="mr-2" />
<span class="text-sm">Show Audio Aura</span>
</label>
</div>
</div>
<div class="mb-6 w-48">
<div class="text-xs tracking-wider opacity-70 mb-2">
HAND TRACKING
</div>
<div class="flex flex-col space-y-2">
<label class="flex items-center">
<input type="checkbox" id="filterResults" class="mr-2" />
<span class="text-sm">Smooth Tracking</span>
</label>
<div class="flex items-center justify-between mt-2">
<span class="text-sm">Smoothing:</span>
<input
type="range"
id="smoothingRange"
min="0"
max="0.95"
step="0.05"
value="0.5"
class="w-24"
/>
</div>
</div>
</div>
</div>
<!-- Theremin Readings -->
<div id="thereminReadings" class="readings hidden">
<div id="currentNote" class="current-note">-</div>
<div class="text-sm">
<div>FREQ: <span id="frequencyValue">0.00</span> Hz</div>
<div>VOL: <span id="volumeValue">0</span>%</div>
<div>ROT: <span id="rotationValue">0</span>°</div>
</div>
</div>
<!-- Hand Data Panel (Debug) -->
<div
id="handData"
class="absolute left-8 bottom-8 z-10 bg-black/50 p-4 rounded-lg max-w-xs hidden"
>
<h2 class="text-xl mb-4 tracking-widest opacity-70">HAND DATA</h2>
<pre
id="handDataText"
class="text-xs font-mono opacity-80 max-h-48 overflow-y-auto"
>
Waiting for hand detection...</pre
>
</div>
<!-- Key Points Label -->
<div
class="absolute right-8 bottom-8 z-10 bg-black/50 p-4 rounded-lg hidden"
>
<h3 class="text-sm mb-2 tracking-widest opacity-70">HAND LANDMARKS</h3>
<div class="grid grid-cols-2 gap-x-4 gap-y-2">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-pink-500 mr-2"></div>
<span class="text-xs">Wrist</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-red-500 mr-2"></div>
<span class="text-xs">Thumb</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-orange-500 mr-2"></div>
<span class="text-xs">Index</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
<span class="text-xs">Middle</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
<span class="text-xs">Ring</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-blue-500 mr-2"></div>
<span class="text-xs">Pinky</span>
</div>
</div>
</div>
<!-- Keyboard Shortcuts -->
<div class="keyboard-shortcuts hidden">
<div><span class="key">T</span> Toggle Theremin</div>
<div><span class="key">D</span> Toggle Debug</div>
</div>
<!-- Debug Button -->
<button id="toggleDebugPanel" class="debug-button">
TOGGLE DEBUG PANEL
</button>
</div>
<script src="script.js"></script>
</body>
</html>