-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsegment.html
80 lines (79 loc) · 2.8 KB
/
segment.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
78
79
80
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<title>Segment each word</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/pitch.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>Segment each word</h1>
<p>Choose a sound in browser:</p>
<p>
<select id="selClips">
<option value="loading">Loading...</option>
</select>
<button id="btnOpenClip" onclick="openClip()">Open</button>
<button id="btnSave" onclick="saveSegments()">Save</button>
</p>
<p id=''>
<span id="lblStatus"></span>
<button type="button" id="btnEditRange" onclick="editRange()" hidden>Confirm</button>
<button type="button" id="btnAddRange" onclick="addRange()" disabled>Add segment</button>
</p>
<p style="margin: 0px 10px;">
<canvas id="canvas" class="visualizer" height="60"></canvas>
</p>
<p>
<button type="button" onclick="zoomIn()">Zoom in</button>
<button type="button" onclick="zoomOut()">Zoom out</button>
<button type="button" onclick="playVisible()">Play</button>
<button type="button" onclick="playSelected()">Play selected</button>
<button type="button" onclick="stopSound()">Stop</button>
</p>
<section class="sound-clips">
</section>
<script src="js/segment.js"></script>
</body>
</html>