-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
83 lines (73 loc) · 2.53 KB
/
Copy pathindex.html
File metadata and controls
83 lines (73 loc) · 2.53 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Swaram Trainer</title>
<link rel="stylesheet" href="css/style.css" />
</head>
<body>
<h1>Swaram Trainer</h1>
<p class="subtitle">Pick your shruti, ragam, and sarali varisai, then sing along with the metronome.</p>
<section class="keyboard-section">
<h2>Reference keyboard</h2>
<p class="hint">Tap a key to hear that swara (uses your sung register once you've started, otherwise the default shruti octave).</p>
<div class="keyboard" id="keyboard"></div>
</section>
<section class="controls">
<label>
Shruti
<select id="shruti"></select>
</label>
<label>
Ragam
<select id="ragam"></select>
</label>
<label>
Varisai
<select id="varisai"></select>
</label>
<label>
BPM
<input type="number" id="bpm" value="40" min="20" max="180" />
</label>
<label>
Reaction delay (ms)
<input type="number" id="reactionDelay" value="300" min="0" max="1000" step="50" />
</label>
<button id="startStopBtn">Start</button>
<button id="toggleColorsBtn">Hide result colors</button>
</section>
<p id="micError" class="error" hidden></p>
<section class="beat-row" id="beatRow"></section>
<section class="live-status">
<div>Detected pitch: <span id="liveFreq">—</span></div>
<div>Nearest swara: <span id="liveNote">—</span></div>
</section>
<div id="completeBanner" class="banner banner-success" hidden>
<p>Exercise complete! 🎉</p>
</div>
<div id="countIn" class="count-in" hidden></div>
<section class="spectrogram-section">
<h2>Live spectrogram</h2>
<div class="spectrogram-wrap">
<div class="freq-axis" id="freqAxis"></div>
<div class="spectrogram-scroll" id="spectrogramScroll">
<div class="spectrogram-stack">
<canvas id="spectrogram" width="900" height="240"></canvas>
<canvas id="spectrogramGrid" width="900" height="240"></canvas>
<div class="spectrogram-swara-labels" id="spectrogramSwaraLabels"></div>
</div>
</div>
</div>
</section>
<section class="mistakes-section">
<div class="mistakes-header">
<h2>Mistakes <span id="mistakeCount">(0)</span></h2>
<button id="downloadSessionBtn" hidden>⬇ Download session recording (WAV)</button>
</div>
<div id="mistakesLog" class="mistakes-log"></div>
</section>
<script type="module" src="js/app.js"></script>
</body>
</html>