-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
60 lines (58 loc) · 3.97 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
<!DOCTYPE html>
<html lang="en" class="dark-mode">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Binaural Beats Generator</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Binaural Beats Generator</h1>
<div class="mode-toggle">
<input type="checkbox" id="darkModeToggle" class="toggle-checkbox" aria-labelledby="darkModeLabel">
<label for="darkModeToggle" class="toggle-label" id="darkModeLabel">
<span class="visually-hidden">Toggle dark mode</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="moon-icon" aria-hidden="true"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="sun-icon" aria-hidden="true"><circle cx="12" cy="12" r="5"></circle><line x1="12" y1="1" x2="12" y2="3"></line><line x1="12" y1="21" x2="12" y2="23"></line><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line><line x1="1" y1="12" x2="3" y2="12"></line><line x1="21" y1="12" x2="23" y2="12"></line><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line></svg>
</label>
</div>
<div class="brainwave-state">
<div class="brainwave-state-header">
<label for="brainwaveState">Brainwave State:</label>
<button id="infoButton" class="info-button" aria-label="Show brainwave state information">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
</button>
</div>
<select id="brainwaveState">
<option value="delta">Delta (0.5 - 4 Hz)</option>
<option value="theta">Theta (4 - 8 Hz)</option>
<option value="alpha" selected>Alpha (8 - 13 Hz)</option>
<option value="beta">Beta (13 - 30 Hz)</option>
<option value="gamma">Gamma (30 - 100 Hz)</option>
<option value="custom">Custom</option>
</select>
</div>
<div>
<label for="baseFrequency">Base Frequency: <span id="baseFrequencyValue">200</span> Hz</label>
<input type="range" id="baseFrequency" min="20" max="500" value="200" step="1" aria-describedby="baseFrequencyValue">
</div>
<div>
<label for="beatFrequency">Beat Frequency: <span id="beatFrequencyValue">10</span> Hz</label>
<input type="range" id="beatFrequency" min="0.5" max="100" value="10" step="0.1" aria-describedby="beatFrequencyValue">
</div>
<button id="toggleButton" aria-pressed="false">Start</button>
</div>
<div id="infoModal" class="modal" aria-hidden="true">
<div class="modal-content">
<button id="closeModal" class="close-button" aria-label="Close modal">×</button>
<h2>Brainwave States</h2>
<div id="modalContent"></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tone/15.1.3/Tone.js" integrity="sha512-l/S587UA2X7JyCkDqZiEX+4OC6Hp8FC0PE1MFi3+KFLk3n1lxQAtSq8YTZ4ig2YFpJal2Jhz3H3iIFyv3KScFA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="audio.js"></script>
<script src="darkMode.js"></script>
<script src="modal.js"></script>
</body>
</html>