-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbeat.html
77 lines (76 loc) · 2.75 KB
/
beat.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
76
77
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>Beat tracking</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/alertbox.css">
<script src="js/forSafari.js"></script>
<script src="lib/IndexedDB-getAll-shim.js"></script>
<script src="js/storage.js"></script>
<script src="lib/fft.js"></script>
<script src="js/beat.js"></script>
</head>
<body>
<!-- alert box -->
<div class="center-of-screen grayed-out" id='prompt' style='visibility: hidden; align-items: baseline;'>
<!--[if IE]>
<form class='prompt-box prompt-box-ie' action="javascript:void 3">
<![endif]-->
<!--[if !IE]> -->
<form class='prompt-box' action="javascript:void 3">
<!-- <![endif]-->
<div class='description' id='promptMessage'></div>
<div class='input'><input id='promptInput'></div>
<div class='yesno'>
<button onclick="promptCallback(true)" id='promptOK'>OK</button>
<button onclick="promptCallback(false)" id='promptCancel'>Cancel</button>
</div>
</form>
</div>
<!--[if IE]>
<div id='alert' class='alert-box alert-box-ie'>
<![endif]-->
<!--[if !IE]> -->
<div id='alert' class='alert-box' style='visibility: hidden;'>
<!-- <![endif]-->
<div class='title'>
<span>Error</span>
<input id='close' class='x' value='X' type='button'>
</div>
<!--[if IE]>
<pre class='description' id='description'>This program does not support IE. Please use Firefox or Chrome.</pre>
<![endif]-->
<!--[if !IE]> -->
<pre class='description' id='description'>An error occured when trying to show the error message</pre>
<!-- <![endif]-->
</div>
<script src='lib/alertbox.js'></script>
<!-- end of alert box -->
<h1>Beat tracking</h1>
<p>
<label for="file">Upload a music file: </label>
<input type="file" name="fin" id="fin">
<button type="button" id="btnAnalyze" onclick="analyzeFile()">Analyze</button>
</p>
<p>
<label for="sound-clips">Or choose a sound in browser:</label>
<select class="sound-clips" name="sound-clips">
<option value="loading">Loading...</option>
</select>
<button id="btnAnalyzeClip" onclick="analyzeClip()">Analyze</button>
</p>
<p>
</p>
<p>Status: <span id="lblStatus">Please choose a sound file</span></p>
<p>Spectrogram</p>
<canvas id="canvas" width="300" height="128" style="background-color: black;"></canvas><br>
<canvas id="canvas2" width="300" height="60" style="background-color: black;"></canvas><br>
<canvas id="canvas3" width="300" height="60" style="background-color: black;"></canvas>
<p>
<label for="scrTime">Time: </label>
<input type='range' name="scrTime" id='scrTime' oninput="drawSpectrogram()">
</p>
</body>
</html>