-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
75 lines (75 loc) · 3.25 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="title" content="Pianolizer">
<meta name="description" content="An easy-to-use toolkit for music exploration and visualization, an audio spectrum analyzer helping you turn sounds into piano notes">
<meta name="keywords" content="DSP, Web Assembly, music visualizer, spectrogram, Fourier transform, Audio Worklet, music transcription, sliding DFT, signal processing">
<meta name="robots" content="index, follow">
<meta name="language" content="English">
<meta name="author" content="Stanislaw Pusep">
<title>Pianolizer</title>
<link rel="icon" href="favicon.ico" sizes="any" />
<link rel="stylesheet" href="app.css" />
<script type="module" src="js/app.js"></script>
</head>
<body>
<audio id="input" src="audio/mazurka.mp3" loop></audio>
<table id="controls">
<tr>
<td class="label">Source:</td>
<td colspan="3">
<select id="source">
<option value="?" disabled id="drop-label">Drag&Drop file</option>
<option value="audio/mazurka.mp3" selected="selected">Chopin Mazurka in F minor, op. 68 no. 4 (by Pianotomy)</option>
<option value="audio/chromatic.mp3">Chromatic scale on a piano, ascending</option>
<option value="audio/sin.flac">Sine wave, 440 Hz</option>
<option value="audio/saw.flac">Sawtooth wave, 110 Hz</option>
<option value="audio/squ.flac">Square wave, 110 Hz</option>
<option value="audio/noise.flac">Pink noise</option>
</select>
<button id="play-toggle">Play</button>
<button id="play-restart">Restart</button>
</td>
</tr>
<tr>
<td class="label">Palette rotation:</td>
<td><input id="rotation" type="range" min="0" max="11" step="1" value="0"/></td>
<td class="label">Smoothing:</td>
<td>
<input id="smoothing" type="range" min="0" max="1" step="any" value="0.04"/>
<span id="smoothing-value"></span>
</td>
</tr>
<tr>
<td class="label">Threshold:</td>
<td>
<input id="threshold" type="range" min="0" max="1" step="any" value="0.05"/>
<span id="threshold-value"></span>
</td>
<td class="label">Implementation:</td>
<td>
<input type="radio" name="implementation" id="implementation-wasm" value="wasm">
<label for="implementation-wasm">WASM</label>
<input type="radio" name="implementation" id="implementation-purejs" value="purejs">
<label for="implementation-purejs">PureJS</label>
</td>
</tr>
</table>
<div id="pianolizer">
<div id="help">
<h1>Drop audio file here or select the Source from the menu and press Play.</h1>
<h2>Chrome browser is recommended for the best experience :)</h2>
<h2>(Safari kind of works but the performance is terrible!)</h2>
</div>
<canvas id="spectrogram"></canvas>
<br>
<svg id="keyboard"></svg>
</div>
<div id="footer">
MIT License -
Copyright © 2023 Stanislaw Pusep -
<a href="https://github.com/creaktive/pianolizer" target="_blank">github.com/creaktive/pianolizer</a>
</div>
</body>
</html>